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

Overwriting mixin properties #1873

Closed
Pupix opened this issue Jun 15, 2015 · 10 comments
Closed

Overwriting mixin properties #1873

Pupix opened this issue Jun 15, 2015 · 10 comments
Assignees
Labels

Comments

@Pupix
Copy link

Pupix commented Jun 15, 2015

Hello! I am trying to overwrite a property coming from a CSS mixing, but the way Polymer handles the variables makes it impossible to do so (without using "!important").

<style>
    .foo {
        @apply(--paper-font-caption)
        white-space: normal;
    }
</style>

The expected result would be to have "white-space: normal" applied on top of the one provided by paper-styles, however that's not the case.

Do I have to rewrite the entire mixing just to change one property or is there an alternative way?

Cheers.

@sorvell sorvell added the p1 label Jun 16, 2015
@sorvell sorvell self-assigned this Jun 16, 2015
@sorvell
Copy link
Contributor

sorvell commented Jun 16, 2015

This is due to the way that Polymer separates static styles from styles which contain custom properties. This use case is reasonable and our approach needs to be modified slightly to support this better.

We will probably not separate custom properties css from static css within rules that contain properties.

@Pupix
Copy link
Author

Pupix commented Jun 16, 2015

Thanks for the response. Will wait for an update then.

@sorvell
Copy link
Contributor

sorvell commented Aug 21, 2015

This issue also leads to specificity issues when combining static and custom property rules.

@robrez
Copy link

robrez commented Oct 28, 2015

👍

1 similar comment
@jmcgdz
Copy link

jmcgdz commented Oct 28, 2015

👍

@nazar-pc
Copy link
Contributor

@Pupix, can you provide complete test case? I guess this might be either already fixed by #2642 or I can try to extend PR to cover this case as well and add corresponding test case.

@robrez
Copy link

robrez commented Oct 29, 2015

@nazar-pc Here's a jsbin that, i think, demonstrates the issue:

https://jsbin.com/kefuzi/edit?html,output

@nazar-pc
Copy link
Contributor

OK, here is easier to understand example: https://jsbin.com/xupufudivu/1/edit

@nazar-pc
Copy link
Contributor

Seems to be different area than covered in #2642, but I'll take a look on this as well.

@nazar-pc
Copy link
Contributor

#2642 now fixes this issue as well.

nazar-pc added a commit to nazar-pc/polymer that referenced this issue Nov 4, 2015
@dfreedm dfreedm closed this as completed in fd57784 Dec 4, 2015
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

5 participants