pascalduez / postcss-apply

PostCSS plugin enabling custom properties sets references
The Unlicense
164 stars 12 forks source link

@apply rule with brackets #4

Closed JosefJezek closed 8 years ago

JosefJezek commented 8 years ago

Could you add support for @apply rule with brackets?

    /* Shared Styles */
    --paper-font-common-base: {
      font-family: 'Roboto', 'Noto', sans-serif;
      -webkit-font-smoothing: antialiased;
    };
    --paper-font-common-nowrap: {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    };
    /* Material Font Styles */
    --paper-font-display4: {
      @apply(--paper-font-common-base);
      @apply(--paper-font-common-nowrap);
      font-size: 112px;
      font-weight: 300;
      letter-spacing: -.044em;
      line-height: 120px;
    };

I need this brackets for Polymer @apply rule, check out this links

@robdodson Why Polymer have @apply rule with brackets? Proposal of @apply rule have not brackets, check out this link http://tabatkins.github.io/specs/css-apply-rule/

pascalduez commented 8 years ago

Same reply as in #3, the plugin scope is to follow the spec closely.

But since the spec is somewhat rough and very young, that seems like a reasonable addition.

robdodson commented 8 years ago

@JosefJezek hm good question (regarding the use of parens). @sorvell is there a reason why we need to use parens with @apply?

JosefJezek commented 8 years ago

@robdodson @sorvell Please any solution...

pascalduez commented 8 years ago

@JosefJezek I will add parens support, while implementing #3.
Clearly missing time, but it's on reccords, no worry.

JosefJezek commented 8 years ago

@pascalduez Thank you :+1:

pascalduez commented 8 years ago

@JosefJezek Available as of postcss-apply@0.2.0