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

Computed styles do not show important properties #1

Open
bhackett1024 opened this issue Oct 21, 2024 · 0 comments
Open

Computed styles do not show important properties #1

bhackett1024 opened this issue Oct 21, 2024 · 0 comments

Comments

@bhackett1024
Copy link

bhackett1024 commented Oct 21, 2024

Computed styles in the devtools do not show whether the style is important. Computed style information is rendered by DeclarationValue components. The state passed into DeclarationValue comes from the MatchedSelector component which created it. The state passed into MatchedSelector comes from createComputedProperties. The ComputedProperty objects which createComputedProperty reads from already have a "priority" property that will be "important" for properties that come from important styles.

Fixing this requires the following changes:

DeclarationValue needs properties indicating whether the associated selector is important.
DeclarationValue needs to render the priority indicator when set.
MatchedSelector needs properties indicating whether the selector is important. Putting this in MatchedSelectorState reduces plumbing requirements.
MatchedSelector needs to pass in priority info to DeclarationValues they create.
createComputedProperties needs to set the priority indicator on MatchedSelectorStates it creates, by reading from "property.priority"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant