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

styling: using var() splits a rule in two with different specificities, causes problems with shorthands #1761

Closed
justinfagnani opened this issue Jun 5, 2015 · 6 comments
Assignees
Labels

Comments

@justinfagnani
Copy link
Contributor

* {
  --border-color: blue;
}
foo {
  border: solid var(--border-color);
  border-width: 1px 0;
}

gets split into:

.my-host-0 foo.my-host {
  border: solid blue;
}
foo.my-host {
  border-width: 1px 0;
}

Because .my-host-0 foo.my-host has higher specificity than foo.my-host the border-width property is overridden by the shorthand border property. In this example this results in the border width being the default from the user style sheet (3px).

@kevinpschaaf kevinpschaaf added the p2 label Jun 7, 2015
sorvell pushed a commit that referenced this issue Jun 24, 2015
… properties

Fixes #1874, #1761: maintain static declarations within declarations that contain custom properties
Fixes #1927: make custom property parser able to see property endings of ; or \n or end token.
@sorvell
Copy link
Contributor

sorvell commented Jun 25, 2015

Fixed via #1948

@sorvell sorvell closed this as completed Jun 25, 2015
@sorvell sorvell reopened this Jun 25, 2015
sorvell pushed a commit that referenced this issue Jun 25, 2015
@sorvell
Copy link
Contributor

sorvell commented Jun 25, 2015

The fix in #1948 was reverted because it was incomplete and caused some breakage.

This issue can be addressed either by interleaving property and static rules or making sure property sheets include all static rules.

@sorvell
Copy link
Contributor

sorvell commented Feb 25, 2016

Fixed in 1.3.0.

@sorvell sorvell closed this as completed Feb 25, 2016
@justinfagnani
Copy link
Contributor Author

what PR fixed this?

@sorvell
Copy link
Contributor

sorvell commented Feb 25, 2016

#3413

@justinfagnani
Copy link
Contributor Author

thanks!

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

No branches or pull requests

3 participants