Skip to content

Commit bca5c31

Browse files
author
Yoav Kadosh
committed
Update README.md
1 parent e146a83 commit bca5c31

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ A library for generating static stylesheets from dynamic content, to be used in
2828

2929
## Basic Example
3030

31-
**`functions.php`**
31+
First, add this to your `functions.php` file:
3232

3333
```php
3434
// 1. Load the library
@@ -43,18 +43,21 @@ wp_dynamic_css_set_callback( 'my_dynamic_css_callback' );
4343

4444
// 3. Enqueue the stylesheet
4545
wp_dynamic_css_enqueue( 'my-style.css' );
46+
47+
// 4. Nope, only three steps
4648
```
4749

48-
**`my-style.css`**
50+
Then, create a file called `my-style.css` and write this in it:
4951

5052
```css
5153
body {
5254
background-color: $body_bg_color;
5355
}
5456
```
5557

58+
In the above example, the stylesheet will be automatically rendered and printed to the `<head>` of the document. The value of `$body_bg_color` will be replaced by the value of `get_theme_mod('body_bg_color')`.
5659

57-
In the above example...
60+
Simple, right?
5861

5962
## Installation
6063

0 commit comments

Comments
 (0)