Skip to content

Commit 1f4af15

Browse files
authored
Update README.md
1 parent 987d10f commit 1f4af15

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

README.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,31 @@ module.exports = {
2828
}
2929
```
3030

31-
## Usage
32-
33-
Add the class `debug-screens` to your `<body>` tag.
31+
3. Add the class `debug-screens` to your `<body>` tag:
3432

3533
```html
3634
<body class="debug-screens">
3735
```
3836

39-
Make sure the class is only present during development. Here's an example of how you could do that in Craft CMS:
37+
### Disable in production
38+
39+
#### Laravel
40+
41+
```twig
42+
<body class="{{ app()->isLocal() ? 'debug-screens' : '' }}">
43+
```
44+
45+
#### Craft CMS
4046

4147
```twig
4248
<body class="{{ devMode ? 'debug-screens' : '' }}">
4349
```
4450

45-
### Customization
51+
## Customization
4652

4753
You can customize this plugin in the `theme.debugScreens` section of your `tailwind.config.js` file.
4854

49-
#### Ignore screens
55+
### Ignore screens
5056

5157
To ignore a specific screen (for instance [dark mode](https://tailwindcss.com/docs/dark-mode)), add the screen name to the `ignore` configuration array. `dark` is ignored by default.
5258

@@ -64,7 +70,7 @@ module.exports = {
6470
}
6571
```
6672

67-
#### Position
73+
### Position
6874

6975
The first item of the position configuration array can be `top` or `bottom`, the second item can be `left` or `right`.
7076

@@ -82,7 +88,7 @@ module.exports = {
8288
}
8389
```
8490

85-
#### Styles
91+
### Styles
8692

8793
Take a look at the [index.js](index.js) file to see all the default styles.
8894

@@ -104,7 +110,7 @@ module.exports = {
104110
}
105111
```
106112

107-
#### Prefix
113+
### Prefix
108114

109115
Modify the debug label prefix with the `prefix` configuration option.
110116

@@ -122,7 +128,7 @@ module.exports = {
122128
}
123129
```
124130

125-
#### Selector
131+
### Selector
126132

127133
Modify the debug element selector with the `selector` configuration option.
128134

0 commit comments

Comments
 (0)