-
Notifications
You must be signed in to change notification settings - Fork 94
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
Better support for theming using CSS global vars #5105
Labels
breaking change 💥
DevX
enhances the consumer developer experience but does not change the experience for the end-user
Epic
PF5
Milestone
Comments
This was referenced Nov 9, 2022
This was referenced Nov 23, 2022
Looks to me like it could be closed and we'll open more specific issues around tokens and theming, but I'll defer to @mcoker - there's a lot of good info here. |
Agree, some of this is already done in the penta work, but everything I see here is already being considered. Closing for now and we can reference if needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking change 💥
DevX
enhances the consumer developer experience but does not change the experience for the end-user
Epic
PF5
Taking the learnings from dark theme, let's examine the current global variables and see where we can make improvements specifically for theming. A couple of examples are:
--pf-global--BackgroundColor--300
- same as our primary background color, but used on elements that float on top of other elements. This ends up being useful to uniquely set a different background color for elements that float against the primary background in other themes.--pf-global--BorderColor--400
- bottom border for form control elements.--pf-global--primary-color--100/300
- different primary color backgrounds for elements with and without text.As close we can, a user should be able to go in and tweak a global variable to theme some concept and it change - to the best of our ability - that thing. If we use
--pf-global--disabled-color--400
for text, backgrounds, and borders, and a user wants to theme--pf-global--disabled-color--400
for use in one context, it's probably going to change a bunch of stuff they don't want in other contexts.As part of this, I think we should be able to document the intended use of every global variable so there is no confusion as to when to use what var for what purpose, and if a user wants to theme their app, that documentation can be their reference guide.
Then we should audit each component and make sure they are referencing the correct global vars, which can be a follow up task/epic.
cc @mceledonia @mmenestr @mcarrano
Other ideas:
Status colors
pf-color-name-50
colors we use as the background for statuses should be global vars--100, --200
, etc are for, or give those more meaningful names as text, icons, backgrounds, hover/focus backgrounds, etcIcons
Spacers
patternfly/src/patternfly/components/Content/content.scss
Lines 15 to 16 in 2e3c6ae
patternfly/src/patternfly/components/FormControl/form-control.scss
Line 41 in 8427be1
Borders
Box shadows
Backgrounds
Colors
#RRGGBBAA
, which I think we should add if we don't use HSLa with this update.The text was updated successfully, but these errors were encountered: