Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.54 KB

css.md

File metadata and controls

56 lines (42 loc) · 1.54 KB

CSS

We recently removed sass from the boilerplate, and opted in several postcss plugins:

Please refer to this for more reading.

Note: This change to postcss is experimental, as there might be features you want from a preprocessor such as sass that might not be supported - unless you write a plugin yourself.

CSS module questions

How do I reuse a class?

/* Within the same file */
.borderLine {
  border-bottom: 1px solid #000;
}

.actualClass {
  composes: borderLine;
}

/* From a different file */
.actualClass {
  composes: borderLine from './border.css';
}

How do I reuse a value?

/* Within the same file */
@value color-white: #fff;

.actualClass {
  color: color-white;
}

/* From a different file */
@value color-white from './colors.css';
.actualClass {
  color: color-white;
}

Suggested Readings;