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

bgtfw-palette-selector controls are not updating their values when color palette is changed #108

Closed
jamesros161 opened this issue Jul 19, 2022 · 1 comment · May be fixed by BoldGrid/boldgrid-theme-framework#758
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jamesros161
Copy link
Collaborator

When a bgtfw-palette-selector control is set, the value is set as such color2:rgb(255,255,255) instead of just saving the color palette position.

When the color palette changes, and the new rgb value of that color is different than what is saved in the theme mod for these controls, the rgb value is not changed. For example, if you change color palette position 2 to rgb( 33, 33, 33 ), the value SHOULD become color2:rgb(33,33,33) but it doesn't. It stays set to color2:rgb(255,255,255) . MOST places this isn't that big of a deal, because the color position can be used for the generated CSS values ( ie color: var(--color-2) ). However, when the rgb color itself is needed ( ie, for opacity effects or for hover effects ), this presents a problem.

This has been addressed on a control by control basis, by obtaining the rgb value from the palette at runtime, however, something needs to be done so that whenever the theme_mod changes, all bgtfw-palette-selector controls can be updated systematically.

This will need to be implemented two ways:

  1. JS implementation so that the changes can be previewed in the customizer
  2. PHP implementation on customizer publish
@jamesros161 jamesros161 self-assigned this Jul 19, 2022
@jamesros161 jamesros161 added the bug Something isn't working label Jul 19, 2022
@jamesros161 jamesros161 transferred this issue from BoldGrid/boldgrid-theme-framework Feb 12, 2024
@jamesros161 jamesros161 added this to the 2.22.1 milestone Feb 12, 2024
@jamesros161
Copy link
Collaborator Author

Looks like this issue was resolved when the background colors were changed to use var(--color-n)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant