Re: [css-houdini-drafts] Global CSS Mixins

Ah, ok! This is why you lead with your problem, not your suggested 
solution - your actual problem is that you want to give the same 
values to multiple custom properties, and would like a shorter syntax 
for doing so, right?

If that's the case, then you already see how to do it properly today -
 declare a custom property bag with the common properties, then @apply
 them into each of the custom properties you want to have those 
values. Or just `var()` them, like:

```css
:root {
  --common-code: {
    ...
  };
  --paper-input-container-input: var(--common-code);
  --paper-button: var(--common-code);
  --paper-toolbar: var(--common-code);
}
```

This is very little additional code, and it makes your intent clear.

Theoretically we could add something that makes this case slightly 
shorter, but it would be weird; setting custom properties is just 
*setting a CSS property*, and there's no precedent for anything that 
lets you set multiple properties to the same value explicitly.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at 
https://github.com/w3c/css-houdini-drafts/issues/332#issuecomment-260069920
 using your GitHub account

Received on Friday, 11 November 2016 22:25:37 UTC