Skip to content

Commit 519b111

Browse files
author
Isiah Meadows
authored
Address comments [ci skip]
1 parent c005367 commit 519b111

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ npm install postcss-css-variables --save-dev
1515
- [Code Playground](#code-playground)
1616
- [Usage](#usage)
1717
- [Syntax](#syntax)
18-
- [Defining Custom Properties: the `--*` family of properties](#defining-custom-properties-the----family-of-properties)
19-
- [Using Cascading Variables: the `var()` notation](#using-cascading-variables-the-var-notation)
18+
- [Defining Custom Properties with `--*`](#defining-custom-properties-with---)
19+
- [Using Variables/Custom Properties with `var()`](#using-variables-custom-properties-with-var)
2020
- [Features](#features)
2121
- [At-rules like `@media`, `@support`, etc.](#at-rules-like-media-support-etc)
2222
- [Pseudo-classes and Elements](#pseudo-classes-and-elements)
@@ -62,11 +62,11 @@ console.log(output);
6262

6363
# Syntax
6464

65-
### Defining Custom Properties: the `--*` family of properties
65+
### Defining Custom Properties with `--*`
6666

67-
A [custom property](http://dev.w3.org/csswg/css-variables/#defining-variables) is any property whose name starts with two dashes (U+002D HYPHEN-MINUS). A property must be in a rule.
67+
A custom property is any property whose name starts with two dashes (U+002D HYPHEN-MINUS). A property must be in a rule.
6868

69-
You may declare them in a special `:root` selector that represents the root DOM node.
69+
*Note: `:root` is nothing more than the selector for the root DOM node.*
7070

7171
```css
7272
:root {
@@ -75,7 +75,7 @@ You may declare them in a special `:root` selector that represents the root DOM
7575
}
7676
```
7777

78-
You may also declare them in a normal selector.
78+
You may also declare custom properties in a normal selector. Any other selector like `.class`, `#id`, or even `#foo ~ .bar > span.baz` works.
7979

8080
```css
8181
.foo {
@@ -103,9 +103,7 @@ A custom property can be declared multiple times, but only the last one takes pr
103103

104104
*[W3C Draft: CSS Custom Properties for Cascading Variables, section 2](http://dev.w3.org/csswg/css-variables/#defining-variables)*
105105

106-
### Using Cascading Variables: the `var()` notation
107-
108-
You can use a CSS variable with [`var(--variable-name)`](http://dev.w3.org/csswg/css-variables/#using-variables).
106+
### Using Variables/Custom Properties with `var()`
109107

110108
```css
111109
.foo {

0 commit comments

Comments
 (0)