Skip to content

Loading…

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

Closed
Mygod opened this Issue · 7 comments

4 participants

@Mygod

This works:

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

While this don't:

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

Is this an expected behavior?

@Mygod

It seems this is a better solution:

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

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

@Mygod

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

@kevinpschaaf kevinpschaaf added the p1 label
@sorvell sorvell added pending-response and removed p1 labels
@sorvell
Owner

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
Owner

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

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 sorvell added p1 and removed pending-response labels
@sorvell
Owner

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

@sorvell sorvell closed this issue from a commit
@sorvell sorvell Fixes #2113: ensures custom-style rules that use @apply combined with…
… defining properties apply correctly.
69a4aa5
@sorvell sorvell closed this in 69a4aa5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.