Skip to content

Conversation

@edonehoo
Copy link
Collaborator

Closes #3890

@patternfly-build
Copy link
Collaborator

patternfly-build commented Feb 19, 2024

@edonehoo edonehoo changed the title docs(dark-theme-handbook): Content updates for v6. docs(dark-theme-handbook): Updates content for v6. Feb 19, 2024
Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left a few comments as feedback, but IMO it's good the way it is, too.

@edonehoo edonehoo requested a review from nicolethoen March 26, 2024 16:45
@nicolethoen nicolethoen added this to the Penta alpha release milestone Mar 26, 2024
Copy link
Collaborator

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update references a pf-v6-theme-dark which I don't think exists, yet. Right, @srambach ?

@srambach
Copy link
Member

This update references a pf-v6-theme-dark which I don't think exists, yet. Right, @srambach ?

It actually does exist in our Brand component, though not quite yet as the main switch for light/dark.

Copy link
Member

@srambach srambach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of comments, but they are minor and could certainly be updated later if others agree.

* When making overrides, utilize the global and component CSS variable system to define the override. For example, to override a primary button’s background color, declare `.pf-v6-c-button { --pf-v6-c-button--m-primary--BackgroundColor: [color]; }` instead of `.pf-v6-c-button.pf-m-primary { background-color: [color]; }`.
* **Use PatternFly components without customizations.** Most problems with dark theming are due to the use of custom styles, overrides to PatternFly styles, and non-PatternFly components. To ensure consistent styling and behavior when switching themes, try to use PatternFly components as they are.

* **Use tokens to define any overrides.**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change this to something like

Suggested change
* **Use tokens to define any overrides.**
* **Use tokens and component variables to define any overrides.**

* **Use PatternFly components without customizations.** Most problems with dark theming are due to the use of custom styles, overrides to PatternFly styles, and non-PatternFly components. To ensure consistent styling and behavior when switching themes, try to use PatternFly components as they are.

* **Use tokens to define any overrides.**
* For example, to override a primary button’s background color, declare `.pf-[version]-c-button { --pf-[version]-c-button--m-primary--BackgroundColor: [color]; }` instead of `.pf-[version]-c-button.pf-m-primary { background-color: [color]; }`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to say [color token] instead of [color] - it's technically fine but at first read it seems to say that assigning it to a hex code would be fine as long as you use the component variable.

@edonehoo
Copy link
Collaborator Author

edonehoo commented Mar 26, 2024

@nicolethoen @mcoker @srambach hi, this is ready for final review!
edit - oops the recent comments didn't load until I hit send on this!

@edonehoo
Copy link
Collaborator Author

@srambach @nicolethoen re the use of pf-v6-theme-dark - if this isn't yet the main switch for dark theme, what is? is it just still pf-v5-theme-dark as it says in the current docs?

@nicolethoen
Copy link
Collaborator

I think it will be pf-v6-theme-dark. It just has to be done with a 🎀 around it. So this should be good as is. Me reading this in your PR though was the catalyst to making sure it happened though, so thanks!

@nicolethoen nicolethoen linked an issue Mar 29, 2024 that may be closed by this pull request
@nicolethoen nicolethoen merged commit 4382fdc into patternfly:v6 Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the dark theme handbook for v6.

5 participants