File tree 2 files changed +23
-16
lines changed
2 files changed +23
-16
lines changed Original file line number Diff line number Diff line change 1
1
import { readFileSync } from 'node:fs' ;
2
2
import { env } from 'node:process' ;
3
3
import { parse } from 'postcss' ;
4
+ import plugin from 'tailwindcss/plugin.js' ;
4
5
5
6
const isProduction = env . NODE_ENV !== 'development' ;
6
7
@@ -98,4 +99,26 @@ export default {
98
99
} ) ) ,
99
100
} ,
100
101
} ,
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
+ ] ,
101
124
} ;
Original file line number Diff line number Diff line change @@ -35,22 +35,6 @@ Gitea's private styles use `g-` prefix.
35
35
.interact-bg : hover { background : var (--color-hover ) !important ; }
36
36
.interact-bg : active { background : var (--color-active ) !important ; }
37
37
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
-
54
38
@media (max-width : 767.98px ) {
55
39
/* double selector so it wins over .tw-flex (old .gt-df) etc */
56
40
.not-mobile .not-mobile {
You can’t perform that action at this time.
0 commit comments