Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 474 Bytes

variables.md

File metadata and controls

42 lines (31 loc) · 474 Bytes

Variables

Summary

Compile the native CSS custom property syntax into static values.


Syntax

:root {
  --customProperty: #ffe400;
}

.foo {
  background-color: var(--customProperty);
}

Examples

Simple color variable

Banana code:

:root {
  --highlight: #ffe400;
}

.foo {
  background-color: var(--highlight);
}

Generated CSS code:

.foo {
  background-color: #ffe400;
}