Migrate gt-hidden
to tw-hidden
(#30046)
We have to define this one in helpers.css because tailwind only generates a single class but certain things rely on this being double-class. Command ran: ```sh perl -p -i -e 's#gt-hidden#tw-hidden#g' web_src/js/**/* templates/**/* models/**/* web_src/css/**/* --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
0a2f973de9
commit
ec3d467f15
82 changed files with 195 additions and 192 deletions
|
@ -45,17 +45,17 @@ Gitea's private styles use `g-` prefix.
|
|||
.interact-bg:active { background: var(--color-active) !important; }
|
||||
|
||||
/*
|
||||
gt-hidden must win all other "display: xxx !important" classes to get the chance to "hide" an element.
|
||||
tw-hidden must win all other "display: xxx !important" classes to get the chance to "hide" an element.
|
||||
do not use:
|
||||
* "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex"
|
||||
* ".hidden" class: it has been polluted by Fomantic UI in many cases
|
||||
* inline style="display: none": it's difficult to tweak
|
||||
* jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important"
|
||||
only use:
|
||||
* this ".gt-hidden" class
|
||||
* this ".tw-hidden" class
|
||||
* showElem/hideElem/toggleElem functions in "utils/dom.js"
|
||||
*/
|
||||
.gt-hidden.gt-hidden { display: none !important; }
|
||||
.tw-hidden.tw-hidden { display: none !important; }
|
||||
|
||||
@media (max-width: 767.98px) {
|
||||
/* double selector so it wins over .tw-flex (old .gt-df) etc */
|
||||
|
|
|
@ -66,13 +66,14 @@ It needs some tricks to tweak the left/right borders with active state */
|
|||
border-left: 1px solid var(--color-secondary-dark-2);
|
||||
}
|
||||
|
||||
/* TODO: these "tw-hidden" selectors are only used by "blame.tmpl" buttons: Raw/Normal View/History/Unescape, need to be refactored to a clear solution later */
|
||||
.ui.buttons .button:first-child,
|
||||
.ui.buttons .button.gt-hidden:first-child + .button {
|
||||
.ui.buttons .button.tw-hidden:first-child + .button {
|
||||
border-left: 1px solid var(--color-light-border);
|
||||
}
|
||||
|
||||
.ui.buttons .button:last-child,
|
||||
.ui.buttons .button:nth-last-child(2):has(+ .button.gt-hidden) {
|
||||
.ui.buttons .button:nth-last-child(2):has(+ .button.tw-hidden) {
|
||||
border-right: 1px solid var(--color-light-border);
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
border-top: 1px solid var(--color-secondary);
|
||||
}
|
||||
|
||||
/* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly (there might also be some `gt-hidden` siblings).
|
||||
/* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly (there might also be some `tw-hidden` siblings).
|
||||
Developers could also use "flex-space-fitted" class to remove the first item's padding-top and the last item's padding-bottom */
|
||||
.flex-list.flex-space-fitted > .flex-item:first-child,
|
||||
.ui.segment > .flex-list > .flex-item:first-child {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue