Skip to content

Commit 91c34e9

Browse files
author
jingyu
committed
docs: modified the partial naming mode to BEM
1 parent 61d3e58 commit 91c34e9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

css-sass/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ We encourage some combination of OOCSS and BEM for these reasons:
153153

154154
```css
155155
/* ListingCard.css */
156-
.ListingCard { ... }
157-
.ListingCard-featured { ... }
158-
.ListingCard_title { ... }
159-
.ListingCard_content { ... }
156+
.listing-card { }
157+
.listing-card-featured { }
158+
.listing-card_title { }
159+
.listing-card_content { }
160160
```
161161

162-
- `.ListingCard` is the “block” and represents the higher-level component
163-
- `.ListingCard_title` is an “element” and represents a descendant of `.ListingCard` that helps compose the block as a whole.
164-
- `.ListingCard-featured` is a “modifier” and represents a different state or variation on the `.ListingCard` block.
162+
- `.listing-card` is the “block” and represents the higher-level component
163+
- `.listing-card_title` is an “element” and represents a descendant of `.listing-card` that helps compose the block as a whole.
164+
- `.listing-card-featured` is a “modifier” and represents a different state or variation on the `.listing-card` block.
165165

166166
### ID selectors
167167

0 commit comments

Comments
 (0)