Skip to content

pfe-cta color context attribute color-palette incorrectly applies styles to variants #2002

@zeroedin

Description

@zeroedin

pfe-cta had the color context attribute color-palette applied to it as a color context provider. I believe this might have done inadvertently.

latest example:
image

pfe-cta I don't believe needs to be a provider of color context, instead, its prior color attribute was separate from the color context code base instead working as a for lack of better terminology tertiary theme attribute.

pfe-cta has a priority as well as variant attribute which affects its styling. Thecolor attribute was a third attribute to override some of the styles applied by the other two to give more variation. If I understand it correctly it was not the being used in the same context as the on and now color-palette as a context for child elements as pfe-cta really only accepts <a> and <button> tags as the light dom elements.

pfe-cta should reflect the same styles as in the example below:

v1.x example:
image

My suggestion is to revert back to the color attribute as an explicit attribute such as in pfe-icon and pfe-label, removing the @colorContextProvider decorator and the @deprecation of the color attribute. Reverting the demo HTML and scss changes for the component.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions