File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -103,3 +103,21 @@ module.exports = {
103
103
],
104
104
}
105
105
```
106
+
107
+ #### Prefix
108
+
109
+ Modify the debug label prefix with the ` prefix ` configuration option.
110
+
111
+ ``` js
112
+ // tailwind.config.js
113
+ module .exports = {
114
+ theme: {
115
+ debugScreens: {
116
+ prefix: ' screen: ' ,
117
+ },
118
+ },
119
+ plugins: [
120
+ require (' tailwindcss-debug-screens' ),
121
+ ],
122
+ }
123
+ ```
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ module.exports = function ({ addComponents, theme }) {
2
2
const screens = theme ( 'screens' ) ;
3
3
const userStyles = theme ( 'debugScreens.style' , { } ) ;
4
4
const ignoredScreens = theme ( 'debugScreens.ignore' , [ ] )
5
+ const prefix = theme ( 'debugScreens.prefix' , 'screen: ' ) ;
5
6
6
7
const defaultPosition = [ 'bottom' , 'left' ] ;
7
8
const position = theme ( 'debugScreens.position' , defaultPosition ) ;
@@ -21,7 +22,7 @@ module.exports = function ({ addComponents, theme }) {
21
22
backgroundColor : '#000' ,
22
23
color : '#fff' ,
23
24
boxShadow : '0 0 0 1px #fff' ,
24
- content : `'screen: _'` ,
25
+ content : `'${ prefix } _'` ,
25
26
} , userStyles ) ,
26
27
} ;
27
28
@@ -30,7 +31,7 @@ module.exports = function ({ addComponents, theme }) {
30
31
. forEach ( ( [ screen ] ) => {
31
32
components [ `@screen ${ screen } ` ] = {
32
33
'.debug-screens::before' : {
33
- content : `'screen: ${ screen } '` ,
34
+ content : `'${ prefix } ${ screen } '` ,
34
35
} ,
35
36
} ;
36
37
} ) ;
You can’t perform that action at this time.
0 commit comments