Skip to content

Commit e2c4e0e

Browse files
committed
Tweak selector option
1 parent d9ac3d9 commit e2c4e0e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@ module.exports = function ({ addComponents, theme }) {
33
const userStyles = theme('debugScreens.style', {});
44
const ignoredScreens = theme('debugScreens.ignore', ['dark']);
55
const prefix = theme('debugScreens.prefix', 'screen: ');
6+
const selector = theme('debugScreens.selector', '.debug-screens');
67

78
const defaultPosition = ['bottom', 'left'];
89
const position = theme('debugScreens.position', defaultPosition);
910
const positionY = position[0] || defaultPosition[0];
1011
const positionX = position[1] || defaultPosition[1];
1112

12-
const selector = theme('debugScreens.selector', '.debug-screens::before');
13-
1413
const components = {
15-
[selector]: Object.assign({
14+
[`${selector}::before`]: Object.assign({
1615
position: 'fixed',
1716
zIndex: '2147483647',
1817
[positionY]: '0',
@@ -32,7 +31,7 @@ module.exports = function ({ addComponents, theme }) {
3231
.filter(([screen]) => !ignoredScreens.includes(screen))
3332
.forEach(([screen]) => {
3433
components[`@screen ${screen}`] = {
35-
[selector]: {
34+
[`${selector}::before`]: {
3635
content: `'${prefix}${screen}'`,
3736
},
3837
};

0 commit comments

Comments
 (0)