Skip to content

Commit

Permalink
feat(media queries): with new range syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-berlin committed Apr 1, 2023
1 parent 3ba6314 commit a0a8a41
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions mixins/_breakpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ $breakpoints: (
}
}
@if $direction == 'min' {
@media (min-width: $get-breakpoints) {
@media (width >= $get-breakpoints) {
@content;
}
}
@if $direction == 'max' {
@media (max-width: $get-breakpoints - $max-overlap) {
@media (width <= $get-breakpoints - $max-overlap) {
@content;
}
}
Expand Down
8 changes: 4 additions & 4 deletions mixins/_font.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

@media
screen and (-webkit-min-device-pixel-ratio: 2),
screen and (min-resolution: 192dpi),
screen and (min-resolution: 2dppx) {
screen and (resolution >= 192dpi),
screen and (resolution >= 2dppx) {
-webkit-font-smoothing: antialiased; // Safari | Best of Retina displays
}
@media
not screen and (-webkit-min-device-pixel-ratio: 2),
not screen and (min-resolution: 192dpi),
not screen and (min-resolution: 2dppx) {
not screen and (resolution >= 192dpi),
not screen and (resolution >= 2dppx) {
-webkit-font-smoothing: subpixel-antialiased; // Best for non Retina displays
}
}
Expand Down
42 changes: 21 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
"sass-true": "7.0.0",
"sassdoc": "2.7.4",
"semantic-release": "21.0.0",
"stylelint": "15.3.0",
"stylelint": "15.4.0",
"stylelint-config-recommended-scss": "^9.0.1",
"stylelint-config-standard": "31.0.0",
"stylelint-config-standard": "32.0.0",
"stylelint-config-standard-scss": "7.0.1",
"stylelint-declaration-block-no-ignored-properties": "2.7.0",
"stylelint-order": "6.0.3"
Expand Down
10 changes: 5 additions & 5 deletions tests/breakpoint.spec.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $breakpoints-px: (
}
}
@include true.expect {
@media (min-width: 78.75rem) {
@media (width >= 78.75rem) {
.test {
padding: 12px;
}
Expand All @@ -42,7 +42,7 @@ $breakpoints-px: (
}
}
@include true.expect {
@media (max-width: 78.74rem) {
@media (width <= 78.74rem) {
.test {
padding: 12px;
}
Expand All @@ -60,7 +60,7 @@ $breakpoints-px: (
}
}
@include true.expect {
@media (max-width: 76.75rem) {
@media (width <= 76.75rem) {
.test {
padding: 12px;
}
Expand All @@ -78,7 +78,7 @@ $breakpoints-px: (
}
}
@include true.expect {
@media (max-width: 1023px) {
@media (width <= 1023px) {
.test {
padding: 12px;
}
Expand All @@ -96,7 +96,7 @@ $breakpoints-px: (
}
}
@include true.expect {
@media (max-width: 1019px) {
@media (width <= 1019px) {
.test {
padding: 12px;
}
Expand Down

0 comments on commit a0a8a41

Please sign in to comment.