Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theming doesn't support latest color notation format #17619

Closed
Th3S4mur41 opened this issue Mar 3, 2022 · 4 comments
Closed

Theming doesn't support latest color notation format #17619

Th3S4mur41 opened this issue Mar 3, 2022 · 4 comments

Comments

@Th3S4mur41
Copy link

Using the CSS Color Module 4 notation format for HSL in some fields (not all?!) a custom theme like the following example leads to errors

export default create({
	base: 'dark',

	colorPrimary: 'hsl(205.2 100% 51%)',
	colorSecondary: 'hsl(205.2 100% 51%)',

	// UI
	appBg: 'hsl(0 0% 5.9%)',
	appContentBg: 'hsl(0 0% 5.9%)',
	appBorderColor: 'grey',
	appBorderRadius: 4,

	// Text colors
	textColor: 'hsl(0 0% 100%)',
	textInverseColor: 'hsl(0 0% 100%)',

});

image

image

@josh-degraw
Copy link
Contributor

Currently running into this issue as well. Looks like source of the issue is that polished doesn't know how to parse that syntax correctly (see this issue). I have a minimal repro with storybook here. Would love to have this fixed, whether by polished or by storybook.

@josh-degraw
Copy link
Contributor

Updating to add that this has been fixed in polished v4.2.1

@bhough
Copy link

bhough commented Apr 7, 2022

v4.2.2 is the better fix, we introduced some edge case regressions in 4.2.1 that have since been addressed.

@shilman
Copy link
Member

shilman commented Apr 8, 2022

Son of a gun!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.60 containing PR #17913 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants