Skip to content

Commit

Permalink
Remove usage of deprecated / operator.
Browse files Browse the repository at this point in the history
  • Loading branch information
apfelbox committed Aug 18, 2021
1 parent dba1d74 commit d7faa22
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.7.1
=====

* (improvement) Remove usage of deprecated `/` operator.


0.7.0
=====

Expand Down
2 changes: 1 addition & 1 deletion mixins/media-query.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@return $value;
}
@else if ("rem" == $unit) {
@return ($value / 1rem) * 10px;
@return math.div($value, 1rem) * 10px;
}
@else {
@error "Can't automatically convert value with unit '#{$unit}'";
Expand Down
2 changes: 1 addition & 1 deletion mixins/size.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@mixin aspect-ratio ($width, $height) {
width: 100%;
height: 0;
padding-bottom: math.percentage($height / $width);
padding-bottom: math.percentage(math.div($height, $width));
}


Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"test": "ava -v"
},
"devDependencies": {
"@types/node": "^14.14.6",
"@types/sass": "^1.16.0",
"@types/node": "^14.17.9",
"@types/sass": "^1.16.1",
"ava": "^3.15.0",
"esm": "^3.2.25",
"prettier-package-json": "^2.6.0",
"sass": "^1.28.0"
"sass": "^1.38.0"
},
"publishConfig": {
"access": "public",
Expand Down
5 changes: 4 additions & 1 deletion reset/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:math";

// This is adapted from normalize.css but specialized in some points
// http://necolas.github.io/normalize.css/

Expand All @@ -11,7 +13,8 @@ html {
-webkit-text-size-adjust: 100%;
box-sizing: border-box;
// normalize 1rem = 16px to 1rem = 10px
font-size: percentage(10/16);
// so use
font-size: math.percentage(math.div(10, 16));
}

* {
Expand Down

0 comments on commit d7faa22

Please sign in to comment.