|
43 | 43 | } |
44 | 44 |
|
45 | 45 | // build individual color blocks |
| 46 | +// Use sd-sage-color() directly for hex values (works with published npm version) |
46 | 47 | /* stylelint-disable max-nesting-depth */ |
47 | 48 | @each $name, $color in $sage-colors { |
48 | 49 | @each $value, $map in $color { |
49 | | - // Use sage-color-hex() for actual hex values (needed for color documentation display) |
50 | | - // This ensures colors are displayed correctly regardless of dark/light mode |
51 | | - $hex: sage-color-hex($name, $value); |
| 50 | + // Get hex value directly from Style Dictionary |
| 51 | + $hex: sd-sage-color($name, $value, hex); |
52 | 52 |
|
53 | 53 | // Determine class name for $value == 50 |
54 | 54 | $classname: ".color-#{"" + $name}-#{$value}"; |
|
65 | 65 |
|
66 | 66 | // Simple lightness-based contrast: white text on dark, black text on light |
67 | 67 | @if (lightness($hex) < 55%) { |
68 | | - color: sage-color-hex(white); |
| 68 | + color: #fff; |
69 | 69 | } |
70 | 70 | @else { |
71 | | - color: sage-color-hex(grey, 950); |
| 71 | + color: sd-sage-color(grey, 950, hex); |
72 | 72 | } |
73 | 73 |
|
74 | 74 | &::after { |
|
88 | 88 |
|
89 | 89 | .color-white-100 { |
90 | 90 | border-radius: sage-border(radius); |
91 | | - border: 1px solid sage-color-hex(grey, 300); |
92 | | - box-shadow: inset 0 0 0.0625rem sage-color-hex(grey, 300); |
| 91 | + border: 1px solid sd-sage-color(grey, 300, hex); |
| 92 | + box-shadow: inset 0 0 0.0625rem sd-sage-color(grey, 300, hex); |
93 | 93 | } |
94 | 94 |
|
95 | 95 | .color-black-100 { |
96 | | - color: sage-color-hex(white); |
| 96 | + color: #fff; |
97 | 97 | } |
0 commit comments