File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -85,3 +85,22 @@ module.exports = {
85
85
],
86
86
}
87
87
```
88
+
89
+ #### Ignoring Screens
90
+
91
+ In some cases, like a custom screen media query, it can be helpful to ignore a specific screen. In that case
92
+ add the screen name to the ` ignore ` configuration array.
93
+
94
+ ``` js
95
+ // tailwind.config.js
96
+ module .exports = {
97
+ theme: {
98
+ debugScreens: {
99
+ ignore: [" custom-screen-name" ],
100
+ },
101
+ },
102
+ plugins: [
103
+ require (' tailwindcss-debug-screens' ),
104
+ ],
105
+ }
106
+ ```
Original file line number Diff line number Diff line change 1
1
module . exports = function ( { addComponents, theme } ) {
2
2
const screens = theme ( 'screens' ) ;
3
3
const userStyles = theme ( 'debugScreens.style' , { } ) ;
4
+ const ignore = theme ( "debugScreens.ignore" , [ ] )
4
5
5
6
const defaultPosition = [ 'bottom' , 'left' ] ;
6
7
const position = theme ( 'debugScreens.position' , defaultPosition ) ;
@@ -24,7 +25,7 @@ module.exports = function ({ addComponents, theme }) {
24
25
} , userStyles ) ,
25
26
} ;
26
27
27
- Object . entries ( screens ) . forEach ( ( [ screen ] ) => {
28
+ Object . entries ( screens ) . filter ( ( [ screen ] ) => ignore . indexOf ( screen ) === - 1 ) . forEach ( ( [ screen ] ) => {
28
29
components [ `@screen ${ screen } ` ] = {
29
30
'.debug-screens::before' : {
30
31
content : `'screen: ${ screen } '` ,
You can’t perform that action at this time.
0 commit comments