Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Refactor drop node sass support #905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5f3ca93
build: update ESLint to v9 and flat configuration
mrholek Jan 11, 2025
f475e54
refactor: migrate `@import`'s to `@forwards`'s and `@use`'s
mrholek Jan 13, 2025
45b792a
refactor: replace `blue()`, `green()`, and `red()` with `color.channel`
mrholek Jan 13, 2025
d72a556
refactor: replace `desaturate()` with `color.scale()`
mrholek Jan 13, 2025
8d4baeb
refactor: replace `unit()` with `math.unit()`
mrholek Jan 13, 2025
5ea8f8e
refactor: replace `comparable()` with `math.compatible()`
mrholek Jan 13, 2025
f146dff
refactor: replace `mix()` with `color.mix()`
mrholek Jan 13, 2025
9a9f4b1
refactor: replace `type-of()` with `meta.type-of()`
mrholek Jan 13, 2025
99319b1
refactor: replace `unquote()` with `string.unquote()`
mrholek Jan 13, 2025
18621e3
refactor: replace `nth()` with `list.nth()`
mrholek Jan 13, 2025
33847ab
refactor: replace `type-of()` with `meta.typeof()` and `unquote()` wi…
mrholek Jan 13, 2025
02a4b41
refactor: replace `map-get()` to `map.get()`, `map-has-keys()` with `…
mrholek Jan 13, 2025
709aefe
refactor: replace `call()` with `meta.call()` and `get-function()` w…
mrholek Jan 13, 2025
3902068
refactor: replace `append()` with `list.append()`
mrholek Jan 13, 2025
4cd8c37
refactor: replace `map-values()` with `map.values()`
mrholek Jan 13, 2025
06ab8a9
refactor: replace `str-index()` with `string.index()`, `str-length()…
mrholek Jan 13, 2025
ef2f164
refactor: replace `inspect()` with `meta.inspect()` and `variable-exi…
mrholek Jan 13, 2025
e6ed109
refactor: replace `index()` with `list.index()`, `length()` with `lis…
mrholek Jan 13, 2025
d7096dd
refactor: replace `percentage()` with `math.percentage()`
mrholek Jan 13, 2025
2f6830d
refactor: replace `opacity()` with `color.opacity()`
mrholek Jan 13, 2025
2e137c4
refactor: replace `RGBA()` with `rgba()`
mrholek Jan 13, 2025
62b3555
build: remove `node-sass` workflow
mrholek Jan 13, 2025
c9d9b51
chore: clean-up
mrholek Jan 13, 2025
d2c8599
refactor: migrate from import to Sass modules system
mrholek Jan 30, 2025
64b259a
chore: update dependencies and devDependencies
mrholek Jan 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: replace type-of() with meta.type-of()
  • Loading branch information
mrholek committed Jan 13, 2025
commit 9a9f4b1ec4a41906f4db938490ee3667e4b47c1c
7 changes: 4 additions & 3 deletions 7 scss/functions/_math.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "sass:math";
@use "sass:meta";

// Return valid calc
@function add($value1, $value2, $return-calc: true) {
Expand All @@ -10,7 +11,7 @@
@return $value1;
}

@if type-of($value1) == number and type-of($value2) == number and math.compatible($value1, $value2) {
@if meta.type-of($value1) == number and meta.type-of($value2) == number and math.compatible($value1, $value2) {
@return $value1 + $value2;
}

Expand All @@ -30,11 +31,11 @@
@return $value1;
}

@if type-of($value1) == number and type-of($value2) == number and math.compatible($value1, $value2) {
@if meta.type-of($value1) == number and meta.type-of($value2) == number and math.compatible($value1, $value2) {
@return $value1 - $value2;
}

@if type-of($value2) != number {
@if meta.type-of($value2) != number {
$value2: unquote("(") + $value2 + unquote(")");
}

Expand Down
3 changes: 2 additions & 1 deletion 3 scss/mixins/_border-radius.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// stylelint-disable property-disallowed-list
@use "sass:meta";
@use "../variables" as *;
@use "ltr-rtl" as *;

Expand All @@ -8,7 +9,7 @@
@function valid-radius($radius) {
$return: ();
@each $value in $radius {
@if type-of($value) == number {
@if meta.type-of($value) == number {
$return: append($return, max($value, 0));
} @else {
$return: append($return, $value);
Expand Down
7 changes: 4 additions & 3 deletions 7 scss/mixins/_utilities.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:meta";
@use "../variables" as *;
@use "../vendor/rfs" as *;
@use "ltr-rtl" as *;
Expand All @@ -13,15 +14,15 @@
$values: map-get($utility, values);

// If the values are a list or string, convert it into a map
@if type-of($values) == "string" or type-of(nth($values, 1)) != "list" {
@if meta.type-of($values) == "string" or meta.type-of(nth($values, 1)) != "list" {
$values: zip($values, $values);
}

@each $key, $value in $values {
$properties: map-get($utility, property);

// Multiple properties are possible, for example with vertical or horizontal margins or paddings
@if type-of($properties) == "string" {
@if meta.type-of($properties) == "string" {
$properties: append((), $properties);
}

Expand Down Expand Up @@ -102,7 +103,7 @@
}
}
@if $is-rtl == true {
@if (type-of($value) == "map") {
@if (meta.type-of($value) == "map") {
@include ltr-rtl($property, map-get($value, "ltr"), null, map-get($value, "rtl"), if($enable-important-utilities, !important, null));
} @else {
@include ltr-rtl($property, $value, null, null, if($enable-important-utilities, !important, null));
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.