Contact emails
Spec
https://tabatkins.github.io/specs/css-apply-rule/
Summary
The CSS @apply rule allows authors to define custom properties which contain declaration lists and then apply them inside style rules. This allows custom properties to be used for theming in a more extensible way than var() references.
Motivation
If you want to theme multiple properties of a custom element, then using custom properties and variable references by themselves requires every property to have a separate custom property version. @apply allows these to be wrapped up into a single custom property.
Polymer, which already includes these capabilities in its custom properties shim, is planning to use and give feedback on the feature.
https://www.polymer-project.org/1.0/docs/devguide/styling.html#custom-css-mixins
Interoperability and Compatibility Risk
This feature is going to be implemented behind the experimental web platform features flag. The spec is still very early in its lifetime (it’s on Tab’s github!), so there’s no plan to ship this soon.
From the 2015 Paris F2F minutes: “The overall reception was positive, but there were concerns about the feasibility of certain behaviors due to how style resolution works.”
https://lists.w3.org/Archives/Public/www-style/2015Sep/0041.html
Ongoing technical constraints
None
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes
Tracking bug
https://code.google.com/p/chromium/issues/detail?id=586974
Link to entry on the feature dashboard
https://www.chromestatus.com/features/5753701012602880
Requesting approval to ship?
Nope