@carbon/element-styles 0.3.8 → 0.3.9-rc.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/element-styles",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9-rc.0",
|
|
4
4
|
"description": "An experimental styling system for native HTML elements, relying on semantic, attribute-focused selectors instead of class names.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"carbon",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"husky": "^9.1.7",
|
|
53
53
|
"marked": "^18.0.6",
|
|
54
54
|
"marked-highlight": "^2.2.4",
|
|
55
|
-
"oxfmt": "^0.
|
|
55
|
+
"oxfmt": "^0.63.0",
|
|
56
56
|
"oxlint": "^1.76.0",
|
|
57
57
|
"sass": "^1.101.0",
|
|
58
58
|
"typescript": "^7.0.2",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
@use "../../layout";
|
|
15
15
|
@use "../../utilities/guards";
|
|
16
|
+
@use "../../utilities/active-indicator";
|
|
16
17
|
|
|
17
18
|
$config: () !default;
|
|
18
19
|
|
|
@@ -93,7 +94,7 @@ $-default-config: (
|
|
|
93
94
|
|
|
94
95
|
& > nav ul li a[aria-current="page"] {
|
|
95
96
|
color: theme.$text-primary;
|
|
96
|
-
box-shadow:
|
|
97
|
+
box-shadow: active-indicator.bottom();
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
& > nav ul li a svg {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
@use "../../layout";
|
|
15
15
|
@use "../../utilities/icons";
|
|
16
16
|
@use "../../utilities/guards";
|
|
17
|
+
@use "../../utilities/active-indicator";
|
|
17
18
|
|
|
18
19
|
$config: () !default;
|
|
19
20
|
|
|
@@ -124,7 +125,7 @@ $-default-config: (
|
|
|
124
125
|
& li > a[aria-current="page"] {
|
|
125
126
|
@include layout.mode--heading-compact;
|
|
126
127
|
background-color: theme.$layer-selected;
|
|
127
|
-
box-shadow:
|
|
128
|
+
box-shadow: active-indicator.left();
|
|
128
129
|
color: theme.$text-primary;
|
|
129
130
|
|
|
130
131
|
@include guards.hover {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use "@carbon/styles/scss/theme";
|
|
9
|
+
|
|
10
|
+
$-thickness: 0.1875rem;
|
|
11
|
+
$-color: theme.$border-interactive;
|
|
12
|
+
|
|
13
|
+
/// Top active indicator box-shadow
|
|
14
|
+
/// @group active-indicator
|
|
15
|
+
/// @return {String} - The box-shadow definition
|
|
16
|
+
@function top() {
|
|
17
|
+
@return inset 0 $-thickness 0 0 $-color;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/// Bottom active indicator box-shadow
|
|
21
|
+
/// @group active-indicator
|
|
22
|
+
/// @return {String} - The box-shadow definition
|
|
23
|
+
@function bottom() {
|
|
24
|
+
@return inset 0 #{$-thickness * -1} 0 0 $-color;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/// Left active indicator box-shadow
|
|
28
|
+
/// @group active-indicator
|
|
29
|
+
/// @return {String} - The box-shadow definition
|
|
30
|
+
@function left() {
|
|
31
|
+
@return inset $-thickness 0 0 0 $-color;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/// Right active indicator box-shadow
|
|
35
|
+
/// @group active-indicator
|
|
36
|
+
/// @return {String} - The box-shadow definition
|
|
37
|
+
@function right() {
|
|
38
|
+
@return inset #{$-thickness * -1} 0 0 0 $-color;
|
|
39
|
+
}
|