@unsass/breakpoint 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +14 -12
- package/src/_functions.scss +8 -0
- package/src/_mixins.scss +10 -0
- package/src/_variables.scss +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.3.0](https://github.com/unsass/breakpoint/compare/v2.2.0...v2.3.0) (2023-03-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **deps:** bump to `sass` 1.58.3 ([4729688](https://github.com/unsass/breakpoint/commit/47296884d8941eec9955770960fdd6ad959bc66b))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Build System
|
|
14
|
+
|
|
15
|
+
* **deps:** bump `sass` 1.53.0 ([f3cb227](https://github.com/unsass/breakpoint/commit/f3cb2274f5637cf41d09fb52a50f6cd7ce036b64))
|
|
16
|
+
|
|
5
17
|
## [2.2.0](https://github.com/unsass/breakpoint/compare/v2.1.2...v2.2.0) (2022-08-25)
|
|
6
18
|
|
|
7
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unsass/breakpoint",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Sass functions and mixins to use media queries rules.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint:css": "stylelint --fix \"**/*.scss\"",
|
|
@@ -10,26 +10,28 @@
|
|
|
10
10
|
"release": "semantic-release"
|
|
11
11
|
},
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": ">=
|
|
13
|
+
"node": ">=16.0.0",
|
|
14
14
|
"npm": ">=8.0.0"
|
|
15
15
|
},
|
|
16
16
|
"sass": "index.scss",
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@commitlint/cli": "^17.
|
|
19
|
-
"@commitlint/config-conventional": "^17.
|
|
20
|
-
"@semantic-release/changelog": "^6.0.
|
|
18
|
+
"@commitlint/cli": "^17.4.4",
|
|
19
|
+
"@commitlint/config-conventional": "^17.4.4",
|
|
20
|
+
"@semantic-release/changelog": "^6.0.2",
|
|
21
21
|
"@semantic-release/git": "^10.0.1",
|
|
22
22
|
"glob": "^7.2.0",
|
|
23
|
-
"husky": "^8.0.
|
|
24
|
-
"jest": "^
|
|
23
|
+
"husky": "^8.0.3",
|
|
24
|
+
"jest": "^29.4.3",
|
|
25
|
+
"jest-environment-node-single-context": "^29.0.0",
|
|
26
|
+
"jest-junit": "^15.0.0",
|
|
25
27
|
"npm-run-all": "^4.1.5",
|
|
26
|
-
"sass-true": "^
|
|
27
|
-
"semantic-release": "^
|
|
28
|
-
"stylelint": "^
|
|
29
|
-
"stylelint-config-unsass": "^1.0.
|
|
28
|
+
"sass-true": "^7.0.0",
|
|
29
|
+
"semantic-release": "^20.1.1",
|
|
30
|
+
"stylelint": "^15.2.0",
|
|
31
|
+
"stylelint-config-unsass": "^1.0.1"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
|
-
"sass": "^1.
|
|
34
|
+
"sass": "^1.58.3"
|
|
33
35
|
},
|
|
34
36
|
"keywords": [
|
|
35
37
|
"sass",
|
package/src/_functions.scss
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
///
|
|
10
10
|
/// Get value.
|
|
11
11
|
///
|
|
12
|
+
/// @access public
|
|
13
|
+
///
|
|
12
14
|
@function get-value($token) {
|
|
13
15
|
@return map.get(variables.$extend, $token);
|
|
14
16
|
}
|
|
@@ -16,6 +18,8 @@
|
|
|
16
18
|
///
|
|
17
19
|
/// Get next.
|
|
18
20
|
///
|
|
21
|
+
/// @access private
|
|
22
|
+
///
|
|
19
23
|
@function get-next($value) {
|
|
20
24
|
$keys: map.keys(variables.$extend);
|
|
21
25
|
$n: list.index($keys, $value);
|
|
@@ -37,6 +41,8 @@
|
|
|
37
41
|
///
|
|
38
42
|
/// Set min.
|
|
39
43
|
///
|
|
44
|
+
/// @access private
|
|
45
|
+
///
|
|
40
46
|
@function set-min($token) {
|
|
41
47
|
$min: get-value($token);
|
|
42
48
|
|
|
@@ -46,6 +52,8 @@
|
|
|
46
52
|
///
|
|
47
53
|
/// Set max.
|
|
48
54
|
///
|
|
55
|
+
/// @access private
|
|
56
|
+
///
|
|
49
57
|
@function set-max($token) {
|
|
50
58
|
$max: get-value($token);
|
|
51
59
|
|
package/src/_mixins.scss
CHANGED
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
///
|
|
25
25
|
/// @see {function} functions.set-min
|
|
26
26
|
///
|
|
27
|
+
/// @access public
|
|
28
|
+
///
|
|
27
29
|
@mixin up($token) {
|
|
28
30
|
@if $token and not map.has-key(variables.$extend, $token) {
|
|
29
31
|
@error "Invalid token, `#{$token}` doesn't exist. Choose one of #{map.keys(variables.$extend)}.";
|
|
@@ -57,6 +59,8 @@
|
|
|
57
59
|
///
|
|
58
60
|
/// @see {function} functions.set-max
|
|
59
61
|
///
|
|
62
|
+
/// @access public
|
|
63
|
+
///
|
|
60
64
|
@mixin down($token) {
|
|
61
65
|
@if $token and not map.has-key(variables.$extend, $token) {
|
|
62
66
|
@error "Invalid token, `#{$token}` doesn't exist. Choose one of #{map.keys(variables.$extend)}.";
|
|
@@ -92,6 +96,8 @@
|
|
|
92
96
|
/// @see {function} functions.set-max
|
|
93
97
|
/// @see {function} functions.get-next
|
|
94
98
|
///
|
|
99
|
+
/// @access public
|
|
100
|
+
///
|
|
95
101
|
@mixin only($token) {
|
|
96
102
|
@if $token and not map.has-key(variables.$extend, $token) {
|
|
97
103
|
@error "Invalid token, `#{$token}` doesn't exist. Choose one of #{map.keys(variables.$extend)}.";
|
|
@@ -130,6 +136,8 @@
|
|
|
130
136
|
/// @see {function} functions.set-min
|
|
131
137
|
/// @see {function} functions.set-max
|
|
132
138
|
///
|
|
139
|
+
/// @access public
|
|
140
|
+
///
|
|
133
141
|
@mixin between($min, $max) {
|
|
134
142
|
@if $min and not map.has-key(variables.$extend, $min) {
|
|
135
143
|
@error "Invalid token, `#{$min}` doesn't exist. Choose one of #{map.keys(variables.$extend)}.";
|
|
@@ -159,6 +167,8 @@
|
|
|
159
167
|
// "desktop": 960px
|
|
160
168
|
/// ), true);
|
|
161
169
|
///
|
|
170
|
+
/// @access public
|
|
171
|
+
///
|
|
162
172
|
@mixin config($screens: (), $reset: false) {
|
|
163
173
|
@if $screens and not $reset {
|
|
164
174
|
variables.$extend: map.merge(variables.$extend, $screens);
|
package/src/_variables.scss
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
@use "sass:map";
|
|
6
6
|
|
|
7
|
+
// ------------------------------------------------------------------------- //
|
|
8
|
+
// Private variables
|
|
9
|
+
// ------------------------------------------------------------------------- //
|
|
10
|
+
|
|
7
11
|
$_defaults: (
|
|
8
12
|
"xs": 320px,
|
|
9
13
|
"sm": 480px,
|
|
@@ -14,6 +18,11 @@ $_defaults: (
|
|
|
14
18
|
);
|
|
15
19
|
|
|
16
20
|
$extend: ();
|
|
21
|
+
|
|
22
|
+
// ------------------------------------------------------------------------- //
|
|
23
|
+
// Public variables
|
|
24
|
+
// ------------------------------------------------------------------------- //
|
|
25
|
+
|
|
17
26
|
$screens: () !default;
|
|
18
27
|
$reset: false !default;
|
|
19
28
|
|