CSS Specificity
Learn more about Plumeria CSS Specificity
:not(#\#) for priority
Plumeria adds :not(#\#) to longhand property atomic class, increasing priority.
Override only that value
This ensures longhand properties always addtion to shorthand properties, regardless of merge order:
Normally, if a shorthand is below a longhand, it will override the all longhand, but if you raise its priority, the following CSS will return the same result:
And this too
This slightly increases bundle size, but is necessary to maintain for strict behavior.
Override all
Also, if a shorthand is written after a longhand in the same key, the previous longhand will be filtered and overridden.
As follows:
Enforcing with ESLint
These behaviors are complex even in normal CSS, so ESLint is effective for enforcing consistent behavior through rules. When the ESLint rule is enabled, in the key longhand properties will always after shorthand properties.
css.props() merge styles
Also, when css.props() has duplicate properties on its arguments, the style properties on the right always take precedence and duplicate properties on the left are filtered. In that case no filtered hash is generated.
Generated as follows:
Or: