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

Add CSS variables #5437

Merged
merged 5 commits into from Oct 8, 2023
Merged

Add CSS variables #5437

merged 5 commits into from Oct 8, 2023

Conversation

quentin-bettoum
Copy link
Contributor

The goal of this PR is to add CSS variables as an alternative to SASS variables to customize GrapesJS.

I had to replace the use of SASS lighten and darken as they cannot work with CSS variable since they are interpreted at compile-time.
I used color-mix instead, but the percentage used in lighten/darken and in color-mix doesn't give the same result as explained here. From what I've seen, it doesn't seem to make a big difference, but we have to keep this in mind.

I also took the opportunity to remove some SCSS variables that were not used anymore.

@artf
Copy link
Member

artf commented Oct 8, 2023

Awesome work @quentin-bettoum 🔥
I think I'll probably switch --grapes- to --gjs- but overall looks all good 🙇‍♂️

@artf artf merged commit 2197d6a into GrapesJS:dev Oct 8, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants