- From: James Browning via GitHub <sysbot+gh@w3.org>
- Date: Thu, 09 May 2019 08:36:21 +0000
- To: public-css-archive@w3.org
This idea would be really powerful for other potentially name-colliding things too e.g.:
#### Values
```css
$iconSmall: 20px;
$iconMedium: 50px;
```
#### FontFaces/KeyFrames
```css
@keyframes $fadeIn {
...
}
```
#### Scoped Properties
```css
/* fancy-dialog/styles.css */
@property $titleColor;
h1 {
color: var($titleColor);
}
```
```css
import { titleColor: dialogTitleColor } from 'fancy-dialog/styles.css';
import { titleColor: articleTitleColor } from 'cool-article/styles.css';
container {
$dialogTitleColor: red;
$articleTitleColor: blue;
}
```
#### Worklet Names
```css
@name $masonry;
foo {
display: layout($masonry);
}
```
```js
import { masonry } from './styles.css';
registerLayout(masonry, class MasonryLayout {
...
});
```
--
GitHub Notification of comment by Jamesernator
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3714#issuecomment-490811668 using your GitHub account
Received on Thursday, 9 May 2019 08:36:22 UTC