Skip to content

Commit

Permalink
chore: Update sass and remove now deprecated / for division. (#7253)
Browse files Browse the repository at this point in the history
Fixes #7244
  • Loading branch information
mister-ben committed Jun 2, 2021
1 parent 4a16b52 commit b3503c9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -142,7 +142,7 @@
"rollup-plugin-node-resolve": "^4.2.4",
"rollup-plugin-progress": "^1.1.2",
"rollup-plugin-stub": "^1.2.0",
"sass": "^1.21.0",
"sass": "^1.34.0",
"semver": "^5.7.0",
"shelljs": "^0.8.3",
"shx": "^0.3.2",
Expand Down
6 changes: 4 additions & 2 deletions src/css/components/_big-play.scss
@@ -1,3 +1,5 @@
@use "sass:math";

.video-js .vjs-big-play-button {
font-size: 3em;
line-height: $big-play-button--line-height;
Expand Down Expand Up @@ -30,8 +32,8 @@
.vjs-big-play-centered .vjs-big-play-button {
top: 50%;
left: 50%;
margin-top: -($big-play-button--height / 2);
margin-left: -($big-play-button--width / 2);
margin-top: -(math.div($big-play-button--height, 2));
margin-left: -(math.div($big-play-button--width, 2));
}

.video-js:hover .vjs-big-play-button,
Expand Down
4 changes: 3 additions & 1 deletion src/css/components/_layout.scss
@@ -1,3 +1,5 @@
@use "sass:math";

.video-js {
// display:inline-block would be closer to the video el's display:inline
// but it results in flash reloading when going into fullscreen [#2205]
Expand Down Expand Up @@ -63,7 +65,7 @@
// Fill the width of the containing element and use padding to create the
// desired aspect ratio. Default to 16x9 unless another ratio is given.
@mixin apply-aspect-ratio($width, $height) {
padding-top: 100% * ($height/$width);
padding-top: 100% * math.div($height, $width);
}

// Not including a default AR in vjs-fluid because it would override
Expand Down
7 changes: 4 additions & 3 deletions src/css/utilities/_linear-gradient.scss
@@ -1,3 +1,5 @@
@use "sass:math";

// These functions and mixins taken from:
//
// "Building a linear-gradient Mixin in Sass" by Hugo Giraudel
Expand All @@ -12,10 +14,9 @@
/// @return {Number} Converted angle
@function convert-angle($value, $unit) {
$convertable-units: deg grad turn rad;
$conversion-factors: 1 (10grad/9deg) (1turn/360deg) (3.1415926rad/180deg);
$conversion-factors: 1 math.div(10grad, 9deg) math.div(1turn, 360deg) math.div(3.1415926rad, 180deg);
@if index($convertable-units, unit($value)) and index($convertable-units, $unit) {
@return $value
/ nth($conversion-factors, index($convertable-units, unit($value)))
@return math.div($value, nth($conversion-factors, index($convertable-units, unit($value))))
* nth($conversion-factors, index($convertable-units, $unit));
}

Expand Down

0 comments on commit b3503c9

Please sign in to comment.