Skip to content

CSS @apply Rule support #871

@marianoviola

Description

@marianoviola

The @apply rule isn't currently supported by any browser but in my opinion it is a very useful feature in order to keep styles reusable by sharing global custom sets down to scoped styles.

To overcome the lack of support of custom sets, I tried to use cascading mechanism between components but I encountered several troubles to avoid unwanted style overrides with root level shared classes.

At the end I found a way to process styles with PostCSS/nextcss but when I try to use the @apply rule in a component I get the following error: Cannot read property 'toLowerCase' of undefined.

I was wondering if it is a known limitation of the parser and if there is a way to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions