code.gitea.io/gitea@v1.21.7/web_src/css/helpers.css (about)

     1  /*
     2  Gitea's tailwind-style CSS helper classes have `gt-` prefix.
     3  Gitea's private styles use `g-` prefix.
     4  */
     5  .gt-df { display: flex !important; }
     6  .gt-dib { display: inline-block !important; }
     7  .gt-ac { align-items: center !important; }
     8  .gt-jc { justify-content: center !important; }
     9  .gt-je { justify-content: flex-end !important; }
    10  .gt-sb { justify-content: space-between !important; }
    11  .gt-fc { flex-direction: column !important; }
    12  .gt-f1 { flex: 1 !important; }
    13  .gt-fw { flex-wrap: wrap !important; }
    14  .gt-vm { vertical-align: middle !important; }
    15  .gt-w-100 { width: 100% !important; }
    16  .gt-h-100 { height: 100% !important; }
    17  
    18  .gt-mono {
    19    font-family: var(--fonts-monospace) !important;
    20    font-size: .95em !important; /* compensate for monospace fonts being usually slightly larger */
    21  }
    22  
    23  .gt-word-break {
    24    word-wrap: break-word !important;
    25    word-break: break-word; /* compat: Safari */
    26    overflow-wrap: anywhere;
    27  }
    28  
    29  .gt-ellipsis {
    30    overflow: hidden !important;
    31    white-space: nowrap !important;
    32    text-overflow: ellipsis !important;
    33  }
    34  
    35  .g-table-auto-ellipsis td.auto-ellipsis {
    36    position: relative;
    37  }
    38  
    39  .g-table-auto-ellipsis td.auto-ellipsis span {
    40    position: absolute;
    41    left: 0;
    42    right: 0;
    43    top: 0;
    44    bottom: 0;
    45    padding: inherit;
    46    white-space: nowrap;
    47    overflow: hidden;
    48    text-overflow: ellipsis;
    49  }
    50  
    51  .gt-max-width-12rem { max-width: 12rem !important; }
    52  .gt-max-width-24rem { max-width: 24rem !important; }
    53  
    54  /* below class names match Tailwind CSS */
    55  .gt-break-all { word-break: break-all !important; }
    56  .gt-content-center { align-content: center !important; }
    57  .gt-cursor-default { cursor: default !important; }
    58  .gt-cursor-pointer { cursor: pointer !important; }
    59  .gt-cursor-grab { cursor: grab !important; }
    60  .gt-invisible { visibility: hidden !important; }
    61  .gt-items-start { align-items: flex-start !important; }
    62  .gt-pointer-events-none { pointer-events: none !important; }
    63  .gt-relative { position: relative !important; }
    64  .gt-whitespace-nowrap { white-space: nowrap !important; }
    65  .gt-whitespace-pre { white-space: pre !important; }
    66  .gt-whitespace-pre-wrap { white-space: pre-wrap !important; }
    67  .gt-object-contain { object-fit: contain !important; }
    68  .gt-self-center { align-self: center !important; }
    69  .gt-self-start { align-self: flex-start !important; }
    70  .gt-self-end { align-self: flex-end !important; }
    71  .gt-no-underline { text-decoration-line: none !important; }
    72  .gt-w-auto { width: auto !important; }
    73  .gt-normal-case { text-transform: none !important; }
    74  .gt-italic { font-style: italic !important; }
    75  .gt-overflow-x-auto { overflow-x: auto !important; }
    76  .gt-overflow-x-scroll { overflow-x: scroll !important; }
    77  .gt-overflow-y-hidden { overflow-y: hidden !important; }
    78  
    79  .gt-w-screen { width: 100vw !important; }
    80  .gt-h-screen { height: 100vh !important; }
    81  
    82  .gt-float-left { float: left !important; }
    83  .gt-float-right { float: right !important; }
    84  .gt-clear-both { clear: both !important; }
    85  
    86  .gt-text-center { text-align: center !important; }
    87  .gt-text-left { text-align: left !important; }
    88  .gt-text-right { text-align: right !important; }
    89  
    90  .gt-font-light { font-weight: var(--font-weight-light) !important; }
    91  .gt-font-normal { font-weight: var(--font-weight-normal) !important; }
    92  .gt-font-medium { font-weight: var(--font-weight-medium) !important; }
    93  .gt-font-semibold { font-weight: var(--font-weight-semibold) !important; }
    94  .gt-font-bold { font-weight: var(--font-weight-bold) !important; }
    95  
    96  .gt-rounded { border-radius: var(--border-radius) !important; }
    97  .gt-rounded-top { border-radius: var(--border-radius) var(--border-radius) 0 0 !important; }
    98  .gt-rounded-bottom { border-radius: 0 0 var(--border-radius) var(--border-radius) !important; }
    99  .gt-rounded-left { border-radius: var(--border-radius) 0 0 var(--border-radius) !important; }
   100  .gt-rounded-right { border-radius: 0 var(--border-radius) var(--border-radius) 0 !important; }
   101  
   102  .gt-border-secondary { border: 1px solid var(--color-secondary) !important; }
   103  .gt-border-secondary-top { border-top: 1px solid var(--color-secondary) !important; }
   104  .gt-border-secondary-bottom { border-bottom: 1px solid var(--color-secondary) !important; }
   105  .gt-border-secondary-left { border-left: 1px solid var(--color-secondary) !important; }
   106  .gt-border-secondary-right { border-right: 1px solid var(--color-secondary) !important; }
   107  
   108  .gt-bg-red { background: var(--color-red) !important; }
   109  .gt-bg-orange { background: var(--color-orange) !important; }
   110  .gt-bg-yellow { background: var(--color-yellow) !important; }
   111  .gt-bg-olive { background: var(--color-olive) !important; }
   112  .gt-bg-green { background: var(--color-green) !important; }
   113  .gt-bg-teal { background: var(--color-teal) !important; }
   114  .gt-bg-blue { background: var(--color-blue) !important; }
   115  .gt-bg-violet { background: var(--color-violet) !important; }
   116  .gt-bg-purple { background: var(--color-purple) !important; }
   117  .gt-bg-pink { background: var(--color-pink) !important; }
   118  .gt-bg-brown { background: var(--color-brown) !important; }
   119  .gt-bg-grey { background: var(--color-grey) !important; }
   120  .gt-bg-gold { background: var(--color-gold) !important; }
   121  .gt-bg-transparent { background: transparent !important; }
   122  
   123  .gt-text-white { color: var(--color-white) !important; }
   124  
   125  .interact-fg { color: inherit !important; }
   126  .interact-fg:hover { color: var(--color-primary) !important; }
   127  .interact-fg:active { color: var(--color-primary-active) !important; }
   128  
   129  .interact-bg { background: transparent !important; }
   130  .interact-bg:hover { background: var(--color-hover) !important; }
   131  .interact-bg:active { background: var(--color-active) !important; }
   132  
   133  .gt-m-0 { margin: 0 !important; }
   134  .gt-m-1 { margin: .125rem !important; }
   135  .gt-m-2 { margin: .25rem !important; }
   136  .gt-m-3 { margin: .5rem !important; }
   137  .gt-m-4 { margin: 1rem !important; }
   138  .gt-m-5 { margin: 2rem !important; }
   139  
   140  .gt-ml-0 { margin-left: 0 !important; }
   141  .gt-ml-1 { margin-left: .125rem !important; }
   142  .gt-ml-2 { margin-left: .25rem !important; }
   143  .gt-ml-3 { margin-left: .5rem !important; }
   144  .gt-ml-4 { margin-left: 1rem !important; }
   145  .gt-ml-5 { margin-left: 2rem !important; }
   146  
   147  .gt-mr-0 { margin-right: 0 !important; }
   148  .gt-mr-1 { margin-right: .125rem !important; }
   149  .gt-mr-2 { margin-right: .25rem !important; }
   150  .gt-mr-3 { margin-right: .5rem !important; }
   151  .gt-mr-4 { margin-right: 1rem !important; }
   152  .gt-mr-5 { margin-right: 2rem !important; }
   153  
   154  .gt-mt-0 { margin-top: 0 !important; }
   155  .gt-mt-1 { margin-top: .125rem !important; }
   156  .gt-mt-2 { margin-top: .25rem !important; }
   157  .gt-mt-3 { margin-top: .5rem !important; }
   158  .gt-mt-4 { margin-top: 1rem !important; }
   159  .gt-mt-5 { margin-top: 2rem !important; }
   160  
   161  .gt-mb-0 { margin-bottom: 0 !important; }
   162  .gt-mb-1 { margin-bottom: .125rem !important; }
   163  .gt-mb-2 { margin-bottom: .25rem !important; }
   164  .gt-mb-3 { margin-bottom: .5rem !important; }
   165  .gt-mb-4 { margin-bottom: 1rem !important; }
   166  .gt-mb-5 { margin-bottom: 2rem !important; }
   167  
   168  .gt-mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
   169  .gt-mx-1 { margin-left: .125rem !important; margin-right: .125rem !important; }
   170  .gt-mx-2 { margin-left: .25rem !important; margin-right: .25rem !important; }
   171  .gt-mx-3 { margin-left: .5rem !important; margin-right: .5rem !important; }
   172  .gt-mx-4 { margin-left: 1rem !important; margin-right: 1rem !important; }
   173  .gt-mx-5 { margin-left: 2rem !important; margin-right: 2rem !important; }
   174  
   175  .gt-my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
   176  .gt-my-1 { margin-top: .125rem !important; margin-bottom: .125rem !important; }
   177  .gt-my-2 { margin-top: .25rem !important; margin-bottom: .25rem !important; }
   178  .gt-my-3 { margin-top: .5rem !important; margin-bottom: .5rem !important; }
   179  .gt-my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
   180  .gt-my-5 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
   181  
   182  .gt-m-auto  { margin: auto !important; }
   183  .gt-mx-auto { margin-left: auto !important; margin-right: auto !important; }
   184  .gt-my-auto { margin-top: auto !important; margin-bottom: auto !important; }
   185  .gt-mt-auto { margin-top: auto !important; }
   186  .gt-mr-auto { margin-right: auto !important; }
   187  .gt-mb-auto { margin-bottom: auto !important; }
   188  .gt-ml-auto { margin-left: auto !important; }
   189  
   190  .gt-p-0 { padding: 0 !important; }
   191  .gt-p-1 { padding: .125rem !important; }
   192  .gt-p-2 { padding: .25rem !important; }
   193  .gt-p-3 { padding: .5rem !important; }
   194  .gt-p-4 { padding: 1rem !important; }
   195  .gt-p-5 { padding: 2rem !important; }
   196  
   197  .gt-pl-0 { padding-left: 0 !important; }
   198  .gt-pl-1 { padding-left: .125rem !important; }
   199  .gt-pl-2 { padding-left: .25rem !important; }
   200  .gt-pl-3 { padding-left: .5rem !important; }
   201  .gt-pl-4 { padding-left: 1rem !important; }
   202  .gt-pl-5 { padding-left: 2rem !important; }
   203  
   204  .gt-pr-0 { padding-right: 0 !important; }
   205  .gt-pr-1 { padding-right: .125rem !important; }
   206  .gt-pr-2 { padding-right: .25rem !important; }
   207  .gt-pr-3 { padding-right: .5rem !important; }
   208  .gt-pr-4 { padding-right: 1rem !important; }
   209  .gt-pr-5 { padding-right: 2rem !important; }
   210  
   211  .gt-pt-0 { padding-top: 0 !important; }
   212  .gt-pt-1 { padding-top: .125rem !important; }
   213  .gt-pt-2 { padding-top: .25rem !important; }
   214  .gt-pt-3 { padding-top: .5rem !important; }
   215  .gt-pt-4 { padding-top: 1rem !important; }
   216  .gt-pt-5 { padding-top: 2rem !important; }
   217  
   218  .gt-pb-0 { padding-bottom: 0 !important; }
   219  .gt-pb-1 { padding-bottom: .125rem !important; }
   220  .gt-pb-2 { padding-bottom: .25rem !important; }
   221  .gt-pb-3 { padding-bottom: .5rem !important; }
   222  .gt-pb-4 { padding-bottom: 1rem !important; }
   223  .gt-pb-5 { padding-bottom: 2rem !important; }
   224  
   225  .gt-px-0 { padding-left: 0 !important; padding-right: 0 !important; }
   226  .gt-px-1 { padding-left: .125rem !important; padding-right: .125rem !important; }
   227  .gt-px-2 { padding-left: .25rem !important; padding-right: .25rem !important; }
   228  .gt-px-3 { padding-left: .5rem !important; padding-right: .5rem !important; }
   229  .gt-px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
   230  .gt-px-5 { padding-left: 2rem !important; padding-right: 2rem !important; }
   231  
   232  .gt-py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
   233  .gt-py-1 { padding-top: .125rem !important; padding-bottom: .125rem !important; }
   234  .gt-py-2 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
   235  .gt-py-3 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
   236  .gt-py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
   237  .gt-py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
   238  
   239  .gt-gap-0 { gap: 0 !important; }
   240  .gt-gap-1 { gap: .125rem !important; }
   241  .gt-gap-2 { gap: .25rem !important; }
   242  .gt-gap-3 { gap: .5rem !important; }
   243  .gt-gap-4 { gap: 1rem !important; }
   244  .gt-gap-5 { gap: 2rem !important; }
   245  
   246  .gt-gap-x-0 { column-gap: 0 !important; }
   247  .gt-gap-x-1 { column-gap: .125rem !important; }
   248  .gt-gap-x-2 { column-gap: .25rem !important; }
   249  .gt-gap-x-3 { column-gap: .5rem !important; }
   250  .gt-gap-x-4 { column-gap: 1rem !important; }
   251  .gt-gap-x-5 { column-gap: 2rem !important; }
   252  
   253  .gt-gap-y-0 { row-gap: 0 !important; }
   254  .gt-gap-y-1 { row-gap: .125rem !important; }
   255  .gt-gap-y-2 { row-gap: .25rem !important; }
   256  .gt-gap-y-3 { row-gap: .5rem !important; }
   257  .gt-gap-y-4 { row-gap: 1rem !important; }
   258  .gt-gap-y-5 { row-gap: 2rem !important; }
   259  
   260  .gt-shrink-0 { flex-shrink: 0 !important; }
   261  
   262  .gt-font-12 { font-size: 12px !important }
   263  .gt-font-13 { font-size: 13px !important }
   264  .gt-font-14 { font-size: 14px !important }
   265  .gt-font-15 { font-size: 15px !important }
   266  .gt-font-16 { font-size: 16px !important }
   267  .gt-font-17 { font-size: 17px !important }
   268  .gt-font-18 { font-size: 18px !important }
   269  
   270  /*
   271  gt-hidden must be placed after all other "display: xxx !important" classes to win the chance
   272  do not use:
   273  * "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex"
   274  * ".hidden" class: it has been polluted by Fomantic UI in many cases
   275  * inline style="display: none": it's difficult to tweak
   276  * jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important"
   277  only use:
   278  * this ".gt-hidden" class
   279  * showElem/hideElem/toggleElem functions in "utils/dom.js"
   280  */
   281  .gt-hidden { display: none !important; }