Skip to content

Commit

Permalink
fix(deps): upgrade to stylelint 15 and fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-berlin committed Mar 31, 2023
1 parent 2ff0802 commit 7de1a7f
Show file tree
Hide file tree
Showing 6 changed files with 3,056 additions and 1,664 deletions.
31 changes: 16 additions & 15 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
{
"extends": [
"stylelint-config-standard",
"stylelint-config-standard-scss"
"stylelint-config-standard-scss",
"stylelint-config-recommended-scss"
],
"plugins": [
"stylelint-declaration-block-no-ignored-properties"
],
"plugins": ["stylelint-declaration-block-no-ignored-properties"],
"customSyntax": "postcss-scss",
"rules": {
"indentation": "tab",
"string-quotes": "single",
"max-line-length": null,
"max-empty-lines": [
1,
{
"ignore": ["comments"]
}
],
"selector-class-pattern": null,
"at-rule-empty-line-before": [
"always",
Expand All @@ -24,17 +18,24 @@
"blockless-after-blockless",
"first-nested"
],
"ignore": ["after-comment"],
"ignoreAtRules": ["else"]
"ignore": [
"after-comment"
],
"ignoreAtRules": [
"else"
]
}
],
"selector-type-no-unknown": [
true,
{
"ignore": ["custom-elements", "default-namespace"]
"ignore": [
"custom-elements",
"default-namespace"
]
}
],
"no-descending-specificity": null,
"plugin/declaration-block-no-ignored-properties": true
}
}
}
10 changes: 5 additions & 5 deletions mixins/_dark-mode-class.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
/// }
///
@mixin dark-mode-class($element: 'html', $parent: true, $class: 'dark') {
@if ($parent) {
@if $parent {
#{$element}[class~="#{$class}"] & {
@content;
}
@content;
}
} @else {
#{$element}[class~="#{$class}"] {
@content;
}
@content;
}
}
}
14 changes: 9 additions & 5 deletions mixins/_font.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* stylelint-disable media-feature-name-no-vendor-prefix */
@use 'sass:list';
@use 'sass:map';
@use 'sass:string';
Expand All @@ -11,13 +12,16 @@
@mixin font-smoothing {
-moz-osx-font-smoothing: grayscale; // Firefox

@media only screen and (min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dpi) {
@media
screen and (-webkit-min-device-pixel-ratio: 2),
screen and (min-resolution: 192dpi),
screen and (min-resolution: 2dppx) {
-webkit-font-smoothing: antialiased; // Safari | Best of Retina displays
}

@media not screen and (min-device-pixel-ratio: 2),
not screen and (min-resolution: 192dpi) {
@media
not screen and (-webkit-min-device-pixel-ratio: 2),
not screen and (min-resolution: 192dpi)
not screen and (min-resolution: 2dppx) {
-webkit-font-smoothing: subpixel-antialiased; // Best for non Retina displays
}
}
Expand Down
Loading

0 comments on commit 7de1a7f

Please sign in to comment.