Skip to content

Commit 9006d6d

Browse files
committed
apply tailwind classes to .blink class
1 parent 9522266 commit 9006d6d

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

bun.lockb

422 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"eslint-plugin-react": "^7.33.2",
4848
"eslint-plugin-react-hooks": "^4.6.0",
4949
"postcss": "^8.4.38",
50+
"postcss-prefix-selector": "^1.16.1",
5051
"prettier": "^3.2.5",
5152
"prettier-plugin-organize-imports": "^3.2.4",
5253
"prettier-plugin-tailwindcss": "^0.5.13",

postcss.config.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
let prefixOverrideList = ['html', 'body'];
2+
13
export default {
24
plugins: {
35
tailwindcss: {},
46
autoprefixer: {},
7+
'postcss-prefix-selector': {
8+
prefix: '.blink',
9+
includeFiles: ['index.css'],
10+
transform: function (prefix, selector, prefixedSelector) {
11+
if (selector.startsWith('.blink')) {
12+
return selector;
13+
}
14+
if (prefixOverrideList.includes(selector)) {
15+
return prefix;
16+
} else {
17+
return prefixedSelector;
18+
}
19+
},
20+
},
521
},
6-
}
22+
};

0 commit comments

Comments
 (0)