Skip to content
📝 字数:working on

Variables

Estimated time to read: 1 minute

Concepts

  • variable syntax, traditional way to define variables:
:root {
  --main-color: #3498db;
}
var(--main-color,  fallback_value)
  • @property syntax, more fancy way to define variables:
@property --property-name {
  syntax: '<type>'; <color>, <length>, <number>, <percentage>
  inherits: true | false;
  initial-value: <value>;
}

评论