generoi / genero-design-system

https://gds.generogrowth.com/
MIT License
4 stars 0 forks source link

Prefix css variables with `--gds-` or not? #50

Closed taromorimoto closed 3 years ago

taromorimoto commented 3 years ago

In general since we are now making a lot of breaking changes (increment major version) I think it would make sense to also prefix all the css variables with "gds" (e.g. --gds-menu-item-underline-display). 

oxyc commented 3 years ago

https://github.com/generoi/genero-design-system/pull/51/commits/e2574652a7a4a07b74711b1dd579ba85c44e19f1

Fixed for the menu here and I provided upgrade path from the previous variables.

But I agree before we bump the version we should fit in more. Maybe we should stay on beta tag for a while? I know I'm going to provide more fixes for mobile menus too.

oxyc commented 3 years ago

Maybe we should skip including that deprecation file as a default but include it to help sites transition?

At the same time I feel like we need to rename the sizing variables to use numbers. spacing-xxxxxl really doesn't work :D

https://github.com/generoi/tehdas/blob/870bb117929b079c9f347f670d7aea16abada74c/web/app/themes/wp-gds-theme/resources/assets/styles/config/variables.scss#L34:L36

oxyc commented 3 years ago

did some sed and vim macro magic for the rest https://github.com/generoi/genero-design-system/pull/52 so that PR tracks this issue now.

taromorimoto commented 3 years ago

I like the deprecations file, and like you say, it's probably good to include it as an optional helper if a site chooses to use it or not.

taromorimoto commented 3 years ago

I understand the spacing-xxxxl issue and maybe I was wrong trying to push it in the beginning of the project. 😊 So maybe that sed magic could also fix this? :)