Skip to content

Commit

Permalink
Bump version to 1.4.4
Browse files Browse the repository at this point in the history
Remove math.div for libsass support
  • Loading branch information
MoritzHayden authored Feb 1, 2022
2 parents 792fd35 + 62e9c0c commit 66f8208
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 41 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.4.4
- Remove math.div for LibSass support.

## 1.4.3
- Fixed missed [`slash as division`](https://sass-lang.com/documentation/breaking-changes/slash-div) deprecation.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Scut",
"version": "1.4.3",
"version": "1.4.4",
"homepage": "http://ramseyinhouse.github.io/scut/",
"authors": [
"David Clark <[email protected]>"
Expand Down
16 changes: 7 additions & 9 deletions dist/_scut.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/*
* Scut, a collection of Sass utilities
* to ease and improve our implementations of common style-code patterns.
* v1.4.3
* v1.4.4
* Docs at http://ramseyinhouse.github.io/scut
*/

@use "sass:math";

@mixin scut-clearfix {

&:after {
Expand Down Expand Up @@ -100,7 +98,7 @@
$num
) {

@return math.div($num, $num * 0 + 1);
@return $num / ($num * 0 + 1);

}
// Depends on `scut-strip-unit`.
Expand All @@ -120,7 +118,7 @@ $scut-em-base: 16 !default;

$em-vals: ();
@each $val in $pixels {
$val-in-ems: math.div(scut-strip-unit($val), $divisor) * 1em;
$val-in-ems: (scut-strip-unit($val) / $divisor) * 1em;
$em-vals: append($em-vals, $val-in-ems);
}

Expand All @@ -144,7 +142,7 @@ $scut-rem-base: 16 !default;

$rem-vals: ();
@each $val in $pixels {
$val-in-rems: math.div(scut-strip-unit($val), $scut-rem-base) * 1rem;
$val-in-rems: scut-strip-unit($val) / $scut-rem-base * 1rem;
$rem-vals: append($rem-vals, $val-in-rems);
}

Expand Down Expand Up @@ -281,7 +279,7 @@ $scut-rem-base: 16 !default;
$ratio: 1.3
) {

@media (-o-min-device-pixel-ratio: math.div($ratio, 1)),
@media (-o-min-device-pixel-ratio: ($ratio / 1)),
(-webkit-min-device-pixel-ratio: $ratio),
(min-resolution: (round(96 * $ratio) * 1dpi)) {
@content;
Expand Down Expand Up @@ -1012,7 +1010,7 @@ $scut-rem-base: 16 !default;

}
@mixin scut-ratio-box (
$ratio: math.div(1, 1)
$ratio: 1/1
) {

overflow: hidden;
Expand All @@ -1025,7 +1023,7 @@ $scut-rem-base: 16 !default;
content: "";
display: block;
height: 0;
padding-top: math.div(1, $ratio) * 100%;
padding-top: (1 / $ratio) * 100%;
}

}
Expand Down
2 changes: 1 addition & 1 deletion docs/content/data.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"version": "1.4.3"
"version": "1.4.4"
github-url: "https://github.com/ramseyinhouse/scut/blob/v"
github-home: "https://github.com/ramseyinhouse/scut"
codepen-url: "http://codepen.io/davidtheclark/pen/FhqGc"
6 changes: 2 additions & 4 deletions docs/content/example-styles/ratio-box.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* import start */
@use "sass:math";

@import "../../../dist/scut";
@import "example-variables";
/* import end */
Expand All @@ -26,11 +24,11 @@
}
.eg-ratio-3 {
width: 15em;
@include scut-ratio-box(math.div(16, 9));
@include scut-ratio-box(16/9);
}
.eg-ratio-4 {
width: 7em;
@include scut-ratio-box(math.div(16, 9));
@include scut-ratio-box(16/9);
}
.eg-ratio-inner {
position: absolute;
Expand Down
6 changes: 2 additions & 4 deletions docs/dev/scss/_examples.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@use "sass:math";

$eg-dark: #002834;
$eg-light: #9AE9FF;
$eg-muted: #CCCCCC;
Expand Down Expand Up @@ -632,11 +630,11 @@ $scut-em-base: 16;
}
.eg-ratio-3 {
width: 15em;
@include scut-ratio-box(math.div(16, 9));
@include scut-ratio-box(16/9);
}
.eg-ratio-4 {
width: 7em;
@include scut-ratio-box(math.div(16, 9));
@include scut-ratio-box(16/9);
}
.eg-ratio-inner {
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var currentVersion = '1.4.3';
var currentVersion = '1.4.4';

var moment = require('moment');
var runSequence = require('run-sequence');
Expand Down
4 changes: 2 additions & 2 deletions lib/scut.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
Compass::Frameworks.register('Scut', :stylesheets_directory => stylesheets_dir)

module Scut
VERSION = "1.4.3"
DATE = "2022-01-28"
VERSION = "1.4.4"
DATE = "2022-02-01"
end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scut",
"version": "1.4.3",
"version": "1.4.4",
"homepage": "http://ramseyinhouse.github.io/scut/",
"authors": [
"David Clark <[email protected]>",
Expand Down
4 changes: 1 addition & 3 deletions src/functions/_em.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Depends on `scut-strip-unit`.

@use "sass:math";

$scut-em-base: 16 !default;

@function scut-em (
Expand All @@ -17,7 +15,7 @@ $scut-em-base: 16 !default;

$em-vals: ();
@each $val in $pixels {
$val-in-ems: math.div(scut-strip-unit($val), $divisor) * 1em;
$val-in-ems: (scut-strip-unit($val) / $divisor) * 1em;
$em-vals: append($em-vals, $val-in-ems);
}

Expand Down
6 changes: 2 additions & 4 deletions src/functions/_rem.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Depends on `scut-strip-unit`.

@use "sass:math";

$scut-rem-base: 16 !default;

@function scut-rem (
Expand All @@ -10,7 +8,7 @@ $scut-rem-base: 16 !default;

$rem-vals: ();
@each $val in $pixels {
$val-in-rems: math.div(scut-strip-unit($val), $scut-rem-base) * 1rem;
$val-in-rems: scut-strip-unit($val) / $scut-rem-base * 1rem;
$rem-vals: append($rem-vals, $val-in-rems);
}

Expand All @@ -23,4 +21,4 @@ $scut-rem-base: 16 !default;
@return $rem-vals;
}

}
}
6 changes: 2 additions & 4 deletions src/functions/_strip-unit.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
@use "sass:math";

@function scut-strip-unit (
$num
) {

@return math.div($num, $num * 0 + 1);
@return $num / ($num * 0 + 1);

}
}
4 changes: 1 addition & 3 deletions src/general/_hd-bp.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
@use "sass:math";

@mixin scut-hd-bp (
$ratio: 1.3
) {

@media (-o-min-device-pixel-ratio: math.div($ratio, 1)),
@media (-o-min-device-pixel-ratio: ($ratio / 1)),
(-webkit-min-device-pixel-ratio: $ratio),
(min-resolution: (round(96 * $ratio) * 1dpi)) {
@content;
Expand Down
6 changes: 2 additions & 4 deletions src/layout/_ratio-box.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@use "sass:math";

@mixin scut-ratio-box (
$ratio: math.div(1, 1)
$ratio: 1/1
) {

overflow: hidden;
Expand All @@ -14,7 +12,7 @@
content: "";
display: block;
height: 0;
padding-top: math.div(1, $ratio) * 100%;
padding-top: (1 / $ratio) * 100%;
}

}
Expand Down

0 comments on commit 66f8208

Please sign in to comment.