You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: docs/pattern-states.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,14 +21,17 @@ Any pattern that includes a pattern partial that has a lower pattern state will
21
21
22
22
## Giving Patterns a State
23
23
24
-
Giving patterns a state is simply a matter of modifying the file name. If we wanted to give our `molecules-media-block` pattern a state of `inprogress` we'd change the file name from:
Giving patterns a state is accomplished by setting the `state` frontmatter key on any pattern’s companion `.md` file. Consider this media block pattern:
We would create or edit a file in the same location, calling it `media-block.md`:
29
+
30
+
---
31
+
state: inreview
32
+
---
33
+
The media block consists of...
34
+
32
35
## Adding Customized States
33
36
34
37
The three default states included with the PHP version of Pattern Lab might not be enough for everyone. To add customized states you should modify your own CSS files. **DO NOT** modify `states.css` in `public/styleguide/css/`. This is because `states.css` will be overwritten in future upgrades.
0 commit comments