Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Mini-Cart: Make custom colors compatible with theme presets and Global Styles #10030

Closed
danieldudzic opened this issue Jun 29, 2023 · 1 comment · Fixed by #10062
Closed

Mini-Cart: Make custom colors compatible with theme presets and Global Styles #10030

danieldudzic opened this issue Jun 29, 2023 · 1 comment · Fixed by #10062
Assignees
Labels
block: mini-cart Issues related to the Mini-Cart block. type: enhancement The issue is a request for an enhancement.

Comments

@danieldudzic
Copy link
Contributor

#9647 added support for Price, Icon and Product count custom color options in the Mini-Cart block.

@nerrad pointed out that in the current implementation, the colors can never be set via presets from a theme (or utilize Global Styles). It also means that stylesheets can't override the colors, as this is set as an inline style color attribute.

He pointed toward Justin Tadlock's x3p0-progress block which implements the custom color in a way that addresses that: https://github.com/x3p0-dev/x3p0-progress/blob/1.0/resources/js/color/panel-color.js

@nerrad is also currently working on the custom color panel for the Price block and it would make sense to re-use that code across all blocks in Woo Blocks (that utilize custom color settings).

@danieldudzic danieldudzic added type: enhancement The issue is a request for an enhancement. block: mini-cart Issues related to the Mini-Cart block. labels Jun 29, 2023
@nerrad nerrad self-assigned this Jun 29, 2023
@nerrad
Copy link
Contributor

nerrad commented Jun 29, 2023

It's looking like I may be have a CustomColorPanel component we can use across all our blocks that absorbs the complexity around color management for our blocks. So I've assigned this issue to me for now because I'll probably use the mini-cart implementation in the PR for it.

@nerrad nerrad mentioned this issue Jun 30, 2023
26 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: mini-cart Issues related to the Mini-Cart block. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants