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 str-index() with string.index(), str-length()
… with `string.length()`, `str-slice()` with `string.slice()`, and `quote()` with `string.quote()`
  • Loading branch information
mrholek committed Jan 13, 2025
commit 06ab8a93ab5070a4e583aa669afb88fb8b77ae7c
3 changes: 2 additions & 1 deletion 3 scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "sass:color";
@use "sass:string";
@use "functions/assert" as *;
@use "functions/color" as *;
@use "functions/math" as *;
Expand Down Expand Up @@ -1842,7 +1843,7 @@ $breadcrumb-margin-bottom: 1rem !default;
$breadcrumb-bg: null !default;
$breadcrumb-divider-color: var(--#{$prefix}secondary-color) !default;
$breadcrumb-active-color: var(--#{$prefix}secondary-color) !default;
$breadcrumb-divider: quote("/") !default;
$breadcrumb-divider: string.quote("/") !default;
$breadcrumb-divider-flipped: $breadcrumb-divider !default;
$breadcrumb-border-radius: null !default;
// scss-docs-end breadcrumb-variables
Expand Down
7 changes: 4 additions & 3 deletions 7 scss/functions/_escape-svg.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:string";
@use "../variables" as *;
@use "str-replace" as *;

Expand All @@ -6,11 +7,11 @@
// Requires the use of quotes around data URIs.

@function escape-svg($string) {
@if str-index($string, "data:image/svg+xml") {
@if string.index($string, "data:image/svg+xml") {
@each $char, $encoded in $escaped-characters {
// Do not escape the url brackets
@if str-index($string, "url(") == 1 {
$string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
@if string.index($string, "url(") == 1 {
$string: url("#{str-replace(string.slice($string, 6, -3), $char, $encoded)}");
} @else {
$string: str-replace($string, $char, $encoded);
}
Expand Down
5 changes: 3 additions & 2 deletions 5 scss/functions/_str-replace.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:string";
// Replace `$search` with `$replace` in `$string`
// Used on our SVG icon backgrounds for custom forms.
//
Expand All @@ -7,10 +8,10 @@
// @param {String} $replace ('') - New value
// @return {String} - Updated string
@function str-replace($string, $search, $replace: "") {
$index: str-index($string, $search);
$index: string.index($string, $search);

@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
@return string.slice($string, 1, $index - 1) + $replace + str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
}

@return $string;
Expand Down
4 changes: 2 additions & 2 deletions 4 scss/mixins/_ltr-rtl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

@function reflect($element) {
$string: #{$element};
@if str-index($string, "left") {
@if string.index($string, "left") {
@return str-replace($string, "left", "right");
}
@if str-index($string, "right") {
@if string.index($string, "right") {
@return str-replace($string, "right", "left");
}

Expand Down
3 changes: 2 additions & 1 deletion 3 scss/mixins/_utilities.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@use "sass:list";
@use "sass:map";
@use "sass:meta";
@use "sass:string";
@use "../variables" as *;
@use "../vendor/rfs" as *;
@use "ltr-rtl" as *;
Expand Down Expand Up @@ -38,7 +39,7 @@
// State params to generate pseudo-classes
$state: if(map.has-key($utility, state), map.get($utility, state), ());

$infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix);
$infix: if($property-class == "" and string.slice($infix, 1, 1) == "-", string.slice($infix, 2), $infix);

// Don't prefix if value key is null (e.g. with shadow class)
$property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
Expand Down
4 changes: 2 additions & 2 deletions 4 scss/vendor/_rfs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
}

// Remove first space
@return string.unquote(str-slice($val, 2));
@return string.unquote(string.slice($val, 2));
}

// Helper function to get the responsive value calculated by RFS
Expand Down Expand Up @@ -278,7 +278,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
}

// Remove first space
@return string.unquote(str-slice($val, 2));
@return string.unquote(string.slice($val, 2));
}

// RFS mixin
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.