File tree Expand file tree Collapse file tree 2 files changed +23
-16
lines changed Expand file tree Collapse file tree 2 files changed +23
-16
lines changed Original file line number Diff line number Diff line change 11import { readFileSync } from 'node:fs' ;
22import { env } from 'node:process' ;
33import { parse } from 'postcss' ;
4+ import plugin from 'tailwindcss/plugin.js' ;
45
56const isProduction = env . NODE_ENV !== 'development' ;
67
@@ -98,4 +99,26 @@ export default {
9899 } ) ) ,
99100 } ,
100101 } ,
102+ plugins : [
103+ plugin ( ( { addUtilities} ) => {
104+ addUtilities ( {
105+ // tw-hidden must win all other "display: xxx !important" classes to get the chance to "hide" an element.
106+ // do not use:
107+ // * "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex"
108+ // * ".hidden" class: it has been polluted by Fomantic UI in many cases
109+ // * inline style="display: none": it's difficult to tweak
110+ // * jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important"
111+ // only use:
112+ // * this ".tw-hidden" class
113+ // * showElem/hideElem/toggleElem functions in "utils/dom.js"
114+ '.hidden.hidden' : {
115+ 'display' : 'none' ,
116+ } ,
117+ // proposed class from https://github.com/tailwindlabs/tailwindcss/pull/12128
118+ '.break-anywhere' : {
119+ 'overflow-wrap' : 'anywhere' ,
120+ } ,
121+ } ) ;
122+ } ) ,
123+ ] ,
101124} ;
Original file line number Diff line number Diff line change @@ -35,22 +35,6 @@ Gitea's private styles use `g-` prefix.
3535.interact-bg : hover { background : var (--color-hover ) !important ; }
3636.interact-bg : active { background : var (--color-active ) !important ; }
3737
38- /*
39- tw-hidden must win all other "display: xxx !important" classes to get the chance to "hide" an element.
40- do not use:
41- * "[hidden]" attribute: it's too weak, can not be applied to an element with "display: flex"
42- * ".hidden" class: it has been polluted by Fomantic UI in many cases
43- * inline style="display: none": it's difficult to tweak
44- * jQuery's show/hide/toggle: it can not show/hide elements with "display: xxx !important"
45- only use:
46- * this ".tw-hidden" class
47- * showElem/hideElem/toggleElem functions in "utils/dom.js"
48- */
49- .tw-hidden .tw-hidden { display : none !important ; }
50-
51- /* proposed class from https://github.com/tailwindlabs/tailwindcss/pull/12128 */
52- .tw-break-anywhere { overflow-wrap : anywhere !important ; }
53-
5438@media (max-width : 767.98px ) {
5539 /* double selector so it wins over .tw-flex (old .gt-df) etc */
5640 .not-mobile .not-mobile {
You can’t perform that action at this time.
0 commit comments