Skip to content

Commit 30306c0

Browse files
committed
Address Sass deprecation warnings
1 parent 9bf4ee7 commit 30306c0

File tree

12 files changed

+5004
-2901
lines changed

12 files changed

+5004
-2901
lines changed

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,15 @@ typings/
5858
# Output of 'npm pack'
5959
*.tgz
6060

61-
# Yarn Integrity file
61+
# Yarn
6262
.yarn-integrity
63+
.pnp.*
64+
.yarn/*
65+
!.yarn/patches
66+
!.yarn/plugins
67+
!.yarn/releases
68+
!.yarn/sdks
69+
!.yarn/versions
6370

6471
# dotenv environment variables file
6572
.env

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.1.0-beta.17 - 2024/11/04
4+
5+
- 🏠 INTERNAL: Use Sass modules instead of global functions
6+
- 🏠 INTERNAL: Upgrade dependencies
7+
38
## 0.1.0-beta.16 - 2022/12/14
49

510
- 🏠 INTERNAL: Remove documentation from npm package

css/ccs.css

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/ccs.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/sass/_menu.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:list';
2+
13
menu {
24
background: var(--callout);
35
padding: 1em;
@@ -79,7 +81,7 @@ select {
7981

8082
$rainbow: ();
8183
@for $hue from 1 through 36 {
82-
$rainbow: append($rainbow, hsl($hue * 10, 80%, 40%), comma);
84+
$rainbow: list.append($rainbow, hsl($hue * 10, 80%, 40%), comma);
8385
}
8486

8587
[type='range'] {

netlify.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
],
1717
"license": "SEE LICENSE IN LICENSE.md",
1818
"devDependencies": {
19-
"@babel/cli": "^7.19.3",
20-
"@babel/core": "^7.20.5",
21-
"@babel/plugin-transform-modules-umd": "^7.18.6",
19+
"@babel/cli": "^7.25.9",
20+
"@babel/core": "^7.26.0",
21+
"@babel/plugin-transform-modules-umd": "^7.25.9",
2222
"cssremedy": "^0.1.0-beta.2",
23-
"sass": "^1.56.2",
23+
"sass": "^1.80.6",
2424
"sassdoc": "^2.7.4",
25-
"sassdoc-theme-herman": "^5.0.0"
25+
"sassdoc-theme-herman": "^6.0.1"
2626
},
2727
"scripts": {
2828
"build-sass": "sass sass/_output.scss css/ccs.css",
@@ -41,5 +41,6 @@
4141
"_index.scss",
4242
"index.js",
4343
"dist.js"
44-
]
44+
],
45+
"packageManager": "yarn@4.5.1"
4546
}

sass/config/_colors.scss

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
@use 'sass:map';
2+
@use 'sass:meta';
3+
14
// Hues
25
// ----
36
/// The colors to generate, and optional default hues for each color.
47
/// To set both color-names and hues, provide an explicit map.
5-
/// - If you provide a songle hue value,
8+
/// - If you provide a single hue value,
69
/// we'll assign it to the required `prime` key.
710
/// - If you provide a list of color names, we
811
/// we'll assign them all default `null` hue values.
@@ -20,21 +23,21 @@ $hues: (
2023
) !default;
2124

2225
// Convert $hues to a map, or error on invalid hues
23-
@if (type-of($hues) != 'map') {
24-
@if (type-of($hues) == 'list') or (type-of($hues) == 'string') {
26+
@if (meta.type-of($hues) != 'map') {
27+
@if (meta.type-of($hues) == 'list') or (meta.type-of($hues) == 'string') {
2528
$hues-list: $hues;
2629
$hues: ();
2730

2831
@each $color in $hues-list {
29-
$hues: map-merge($hues, ($color: null));
32+
$hues: map.merge($hues, ($color: null));
3033
}
31-
} @else if (type-of($hues) == 'number') or (not $hues) {
34+
} @else if (meta.type-of($hues) == 'number') or (not $hues) {
3235
$hues: ('prime': $hues);
3336
}
3437
}
3538

3639
// Require a prime hue
37-
@if not (map-has-key($hues, 'prime')) {
40+
@if not (map.has-key($hues, 'prime')) {
3841
@error 'Please provide a `prime` hue';
3942
}
4043

@@ -112,13 +115,13 @@ $neutral-saturation: null !default;
112115
/// for browsers that don't support
113116
/// CSS custom properties.
114117
/// The default value is based on
115-
/// `map-get($hues, 'prime')`, `$saturation`, `$lightness`,
118+
/// `map.get($hues, 'prime')`, `$saturation`, `$lightness`,
116119
/// and maximum `$contrast`.
117120
///
118121
/// @type color
119122
/// @group config
120123
$fallback-dark: hsl(
121-
map-get($hues, 'prime') or 330,
124+
map.get($hues, 'prime') or 330,
122125
($saturation or 50%) - ($contrast or 45%),
123126
($lightness or 50%) - ($contrast or 45%)
124127
) !default;
@@ -129,13 +132,13 @@ $fallback-dark: hsl(
129132
/// for browsers that don't support
130133
/// CSS custom properties.
131134
/// The default value is based on
132-
/// `map-get($hues, 'prime')`, `$saturation`, `$lightness`,
135+
/// `map.get($hues, 'prime')`, `$saturation`, `$lightness`,
133136
/// and maximum `$contrast`.
134137
///
135138
/// @type color
136139
/// @group config
137140
$fallback-light: hsl(
138-
map-get($hues, 'prime') or 330,
141+
map.get($hues, 'prime') or 330,
139142
($saturation or 50%) - ($contrast or 45%),
140143
($lightness or 50%) + ($contrast or 45%)
141144
) !default;

sass/partials/_root.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use '../config';
2+
@use 'sass:meta';
23

34
/// # CSS Global Settings
45
/// Global configuration options will be defined
@@ -46,6 +47,6 @@
4647
}
4748

4849
@if (config.$fades) {
49-
--ccs-fade: #{if(type-of(config.$fades) == 'number', config.$fades, 1)};
50+
--ccs-fade: #{if(meta.type-of(config.$fades) == 'number', config.$fades, 1)};
5051
}
5152
}

0 commit comments

Comments
 (0)