Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 42441fe

Browse files
authored
Merge pull request #85 from pattern-lab/php-pattern-states
Update docs on PHP Pattern States
2 parents 4444caa + cd3348e commit 42441fe

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

docs/pattern-states.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ Any pattern that includes a pattern partial that has a lower pattern state will
2121

2222
## Giving Patterns a State
2323

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:
25-
26-
source/_patterns/01-molecules/02-blocks/00-media-block.mustache
27-
28-
to:
29-
30-
source/_patterns/01-molecules/02-blocks/[email protected]
31-
24+
Giving patterns a state is accomplished by setting the `state` frontmatter key on any pattern’s companion `.md` file. Consider this media block pattern:
25+
26+
./source/_patterns/molecules/blocks/media-block.mustache
27+
28+
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+
3235
## Adding Customized States
3336

3437
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

Comments
 (0)