Skip to content

Commit efb6861

Browse files
committed
enforce use of custom media queries
1 parent 73e5822 commit efb6861

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

css/global.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ pre[class^="language-"] {
416416
}
417417

418418
/* Dark syntax highlighting */
419-
@media (prefers-color-scheme: dark) {
419+
@media (--OSdark) {
420420
.language-css,
421421
.language-html {
422422
--token-punctuation: var(--indigo-2);

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,17 @@
2525
"stylelint": {
2626
"extends": "stylelint-config-standard",
2727
"plugins": [
28-
"stylelint-use-logical"
28+
"stylelint-use-logical",
29+
"stylelint-media-use-custom-media"
2930
],
3031
"rules": {
31-
"csstools/use-logical": "always"
32+
"csstools/use-logical": "always",
33+
"csstools/media-use-custom-media": [
34+
"always",
35+
{
36+
"importFrom": "./node_modules/open-props/media.min.css"
37+
}
38+
]
3239
}
3340
},
3441
"prettier": {
@@ -95,6 +102,7 @@
95102
"retext-spell": "^5.3.0",
96103
"stylelint": "^14.16.0",
97104
"stylelint-config-standard": "^29.0.0",
105+
"stylelint-media-use-custom-media": "^2.0.1",
98106
"stylelint-use-logical": "^2.0.0"
99107
}
100108
}

0 commit comments

Comments
 (0)