Skip to content

Commit 57a006f

Browse files
author
Matthias Kunze
committed
Update README.md
1 parent f7008e0 commit 57a006f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
### Formatting
2424

2525
* Use soft tabs (4 spaces) for indentation
26-
* Prefer camelCasing over dashes in class names. Underscores are OK if you're using BEM (see [OOCSS and BEM](#oocss-and-bem) below).
26+
* Prefer camelCasing over dashes in class names.
2727
* Do not use ID selectors!
2828
* When using multiple selectors in a rule declaration, give each selector its own line.
2929
* Put a space before the opening brace `{` in rule declarations
@@ -108,9 +108,10 @@ We encourage some combination of OOCSS and BEM for these reasons:
108108
.listingCard_content { }
109109
```
110110

111+
* Compound words in class names must be written in camelCase.
111112
* `.listingCard` is the “block” and represents the higher-level component
112113
* `.listingCard_title` is an “element” and represents a descendant of `.listingCard` that helps compose the block as a whole.
113-
* `.listingCard-featured` is a “modifier” and represents a different state or variation on the `.listingCard` block.
114+
* `.listingCard-featured` is a “modifier” and represents a different variation on the `.listingCard` block.
114115

115116
### ID selectors
116117

@@ -128,6 +129,12 @@ We recommend creating JavaScript-specific camelCased classes to bind to, prefixe
128129
<button class="btn btn-primary jsRequestToBook">Request to Book</button>
129130
```
130131

132+
There are also state classes prefixed with `.js` or `.has` (for grammatical reasons) which may only be added or removed by Scripts:
133+
134+
```html
135+
<div class="tabs isActive">First tab</div>
136+
```
137+
131138
## Sass
132139

133140
### Syntax

0 commit comments

Comments
 (0)