Skip to content

Commit 97e6456

Browse files
committed
fix adjustForLightness usage
1 parent 619f2ff commit 97e6456

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

packages/clerk-js/src/ui/utils/colors/__tests__/modern.spec.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,6 @@ describe('Modern CSS Colors', () => {
184184
expect(result).toMatch(/color-mix\(in srgb, red, white 20%\)/);
185185
});
186186

187-
it('should fall back to relative color syntax when color-mix not supported', () => {
188-
mockColorMix.mockReturnValue(false);
189-
mockRelativeColorSyntax.mockReturnValue(true);
190-
191-
const result = colors.adjustForLightness('red', 5);
192-
expect(result).toMatch(/hsl\(from red h s calc\(l \+ 10%\)\)/);
193-
});
194-
195187
it('should return original color when no modern CSS support', () => {
196188
mockColorMix.mockReturnValue(false);
197189
mockRelativeColorSyntax.mockReturnValue(false);

packages/clerk-js/src/ui/utils/colors/modern.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,6 @@ export const colors = {
101101
return createColorMixString(color, 'white', mixPercentage);
102102
}
103103

104-
if (cssSupports.relativeColorSyntax()) {
105-
// Fallback to relative color syntax
106-
// Note: We can't cap at 100% or handle edge cases in CSS, but browsers will clamp automatically
107-
const adjustment = lightness * MODERN_CSS_LIMITS.LIGHTNESS_MULTIPLIER;
108-
return createRelativeColorString(color, 'h', 's', `calc(l + ${adjustment}%)`);
109-
}
110-
111104
return color; // Return original if no CSS support
112105
},
113106
};

0 commit comments

Comments
 (0)