@carbon/element-styles 0.2.0-rc.3 → 0.2.1-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,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/element-styles",
3
3
  "description": "An experimental styling system for native HTML elements, relying on semantic, attribute-focused selectors instead of class names.",
4
- "version": "0.2.0-rc.3",
4
+ "version": "0.2.1-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sass": "index.scss",
@@ -34,9 +34,8 @@
34
34
  "@carbon/styles": "^1.102.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@carbon/icons": "^11.76.0",
38
- "gh-pages": "^6.3.0",
37
+ "@carbon/icons": "^11.77.0",
39
38
  "sass": "^1.98.0",
40
- "vite": "^8.0.0"
39
+ "vite": "^8.0.3"
41
40
  }
42
41
  }
@@ -41,6 +41,7 @@ $-default-config: (
41
41
  padding-block-end: layout.$size--padding-block-end;
42
42
  padding-inline: layout.$density--padding;
43
43
  background-color: theme.$field;
44
+ color: theme.$text-primary;
44
45
  border-block-end: 0.0625rem solid theme.$border-strong;
45
46
  box-sizing: border-box;
46
47
  transition-property: color, background-color;
@@ -35,6 +35,7 @@ $-default-config: (
35
35
  box-shadow: none;
36
36
  border-radius: 0;
37
37
  text-align: start;
38
+ display: flex;
38
39
  block-size: layout.$size--block-size;
39
40
  padding-block-start: layout.$size--padding-block-start;
40
41
  padding-block-end: layout.$size--padding-block-end;
@@ -70,10 +71,15 @@ $-default-config: (
70
71
  }
71
72
  }
72
73
 
73
- &:has(> svg:only-child) {
74
+ &:has(> svg:only-child),
75
+ &:has(> svg:first-child + [popover="hint"]:last-child) {
74
76
  padding-inline: unset;
75
77
  aspect-ratio: 1;
76
- text-align: center;
78
+ justify-content: center;
79
+
80
+ & > svg {
81
+ margin-inline: 0;
82
+ }
77
83
  }
78
84
 
79
85
  @if map.get($props, 'kind') == 'primary' {
@@ -159,6 +165,14 @@ $-default-config: (
159
165
  &:has(> svg:not(:only-child)) > svg {
160
166
  margin-inline-start: spacing.$spacing-03;
161
167
  }
168
+
169
+ & > svg:only-child {
170
+ color: theme.$icon-primary;
171
+ }
172
+
173
+ &:disabled > svg:only-child {
174
+ color: theme.$icon-disabled;
175
+ }
162
176
  }
163
177
 
164
178
  @if map.get($props, 'kind') == 'danger--primary' {
@@ -43,5 +43,9 @@ $-default-config: (
43
43
  @include icons.calendar;
44
44
  }
45
45
  }
46
+
47
+ & ::-webkit-date-and-time-value {
48
+ text-align: start;
49
+ }
46
50
  }
47
51
  }
@@ -43,5 +43,9 @@ $-default-config: (
43
43
  @include icons.event--schedule;
44
44
  }
45
45
  }
46
+
47
+ & ::-webkit-date-and-time-value {
48
+ text-align: start;
49
+ }
46
50
  }
47
51
  }
@@ -88,7 +88,7 @@ $-default-config: (
88
88
  box-shadow: inset 0 -0.25rem 0 0 theme.$border-interactive;
89
89
  }
90
90
 
91
- & > nav a:first-child {
91
+ & > nav a {
92
92
  @include layout.mode--body-compact;
93
93
  color: theme.$text-primary;
94
94
  text-decoration: none;
@@ -103,12 +103,12 @@ $-default-config: (
103
103
  }
104
104
  }
105
105
 
106
- & > nav a:first-child + ul {
106
+ & > nav a + ul {
107
107
  margin-inline-start: layout.$density--padding;
108
108
  padding-inline-start: layout.$density--padding;
109
109
  }
110
110
 
111
- & > nav a:first-child + ul::before {
111
+ & > nav a + ul::before {
112
112
  content: '';
113
113
  display: block;
114
114
  inline-size: 0.0625rem;
@@ -43,5 +43,9 @@ $-default-config: (
43
43
  @include icons.time;
44
44
  }
45
45
  }
46
+
47
+ & ::-webkit-date-and-time-value {
48
+ text-align: start;
49
+ }
46
50
  }
47
51
  }
@@ -51,6 +51,7 @@ $-knob-size: calc($-block-size - $-knob-spacing * 2);
51
51
  inline-size: $-inline-size;
52
52
  border-radius: calc($-block-size * 0.5);
53
53
  background-color: theme.$toggle-off;
54
+ color: theme.$text-primary;
54
55
  transition: background-color layout.$mode--transition-duration layout.$mode--transition-timing-function;
55
56
  cursor: pointer;
56
57
 
@@ -58,6 +59,7 @@ $-knob-size: calc($-block-size - $-knob-spacing * 2);
58
59
  &[aria-checked="true"]:disabled {
59
60
  background-color: carbon-button.$button-disabled;
60
61
  cursor: not-allowed;
62
+ color: theme.$text-disabled;
61
63
 
62
64
  &::before {
63
65
  background-color: theme.$icon-on-color-disabled;
@@ -35,7 +35,7 @@ $-default-config: (
35
35
  }
36
36
 
37
37
  & li li {
38
- list-style-type: '';
38
+ list-style-type: '▪\FE0E';
39
39
  }
40
40
 
41
41
  & li p {