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

CSS Styling Best Practice Unclear #10074

Closed
cxkyros opened this issue Aug 15, 2024 · 2 comments
Closed

CSS Styling Best Practice Unclear #10074

cxkyros opened this issue Aug 15, 2024 · 2 comments
Labels
0 - new New issues that need assignment. design-tokens Issues requiring design tokens. docs Issues relating to documentation updates only. needs triage Planning workflow - pending design/dev review.

Comments

@cxkyros
Copy link

cxkyros commented Aug 15, 2024

Description

I am attempting to adjust the styling of a calciteListItem without altering the behavior of a calciteAction which is inside the list item. In particular, the I want to turn the hover color for the outside item off, but keep the inner item as the default value. I can set these using the "--calcite-color-foreground-2" property, and overriding it separately on each component. However, this is not specified in the style list for the components, and it creates a somewhat ugly css document with a hard coded reference to a value.

My question is: What is the correct approach to overriding styling in a case like this, and are there best practices documented about how to override styling like this - it seemed as though this type of styling was not being encouraged by the documentation.

Which Component

CalciteListItem, CalciteAction

Resources

No response

@cxkyros cxkyros added 0 - new New issues that need assignment. docs Issues relating to documentation updates only. needs triage Planning workflow - pending design/dev review. labels Aug 15, 2024
@macandcheese
Copy link
Contributor

Hi @cxkyros - we are actively working on delivering support for component-specific css properties, to satisfy the use case you mention.

This effort is being tracked here: #7180 - When they are released, we will document the component-specific css properties and add guidance about their use.

The existing global css properties (like --calcite-color-foreground-2) will continue to be supported to support high level theming decisions that affect entire applications or portions of applications.

@macandcheese macandcheese added the design-tokens Issues requiring design tokens. label Aug 15, 2024
@DitwanP
Copy link
Contributor

DitwanP commented Feb 25, 2025

Closing as this should be addressed in the design effort mentioned above.

@DitwanP DitwanP closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. design-tokens Issues requiring design tokens. docs Issues relating to documentation updates only. needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

3 participants