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

@apply(--paper-font-common-base); failed for :root #2113

Closed
Mygod opened this issue Jul 18, 2015 · 7 comments
Closed

@apply(--paper-font-common-base); failed for :root #2113

Mygod opened this issue Jul 18, 2015 · 7 comments
Assignees
Labels

Comments

@Mygod
Copy link

Mygod commented Jul 18, 2015

This works:

:root * {
    @apply(--paper-font-common-base);
}

While this don't:

:root {
    @apply(--paper-font-common-base);
}

Is this an expected behavior?

@Mygod
Copy link
Author

Mygod commented Jul 18, 2015

It seems this is a better solution:

body {
    @apply(--paper-font-common-base);
}

@timeu
Copy link

timeu commented Jul 18, 2015

Just to make sure:
Did you put your :root selector inside a <style is="custom-style"> as mentioned in the docs ?

@Mygod
Copy link
Author

Mygod commented Jul 19, 2015

Yes I did. (otherwise none of them would work IMO)

@sorvell
Copy link
Contributor

sorvell commented Jul 21, 2015

I'm not able to reproduce this issue. For example, the following works fine:

http://jsbin.com/narasahace/edit?html,output

I've also tried this directly with paper-styles and don't see the issue. Can you provide a test case that shows the issue? Thanks.

@sorvell
Copy link
Contributor

sorvell commented Jul 21, 2015

Please note that the custom-style that uses --paper-font-common-base must be after the import that defines the variable, in this case paper-styles\typography.html.

@Mygod
Copy link
Author

Mygod commented Jul 21, 2015

It turns out the other line I put before @apply seems to be the problem. Reordered the lines and the problem seem to be gone.

Here's an example: http://jsbin.com/lehutolebi/edit?html,output

@sorvell
Copy link
Contributor

sorvell commented Jul 29, 2015

Thanks. We've tracked this down and it should be fixed in the next release.

kevinpschaaf added a commit that referenced this issue Jul 30, 2015
Fixes #2113: ensures custom-style rules that use @apply combined with defining properties apply correctly
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

4 participants