Skip to content

Commit 1e9cbd2

Browse files
committed
Add links
1 parent 99a91f8 commit 1e9cbd2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- Always prefer using a class over HTML tags (with some exceptions like CSS resets)
1111
- Don't use ids in selectors
1212
- `#header` is overly specific compared to, for example `.header` and is much harder to override
13-
- Read more about the headaches associated with IDs in CSS here.
13+
- Read more about the headaches associated with IDs in CSS [here](http://csswizardry.com/2011/09/when-using-ids-can-be-a-pain-in-the-class/).
1414
- Don’t nest more than 3 levels deep
1515
- Nesting selectors increases specificity, meaning that overriding any CSS set therein needs to be targeted with an even more specific selector. This quickly becomes a significant maintenance issue.
1616
- Avoid using nesting for anything other than pseudo selectors and state selectors.
@@ -20,7 +20,7 @@
2020
- If you must, leave a comment, and prioritise resolving specificity issues before resorting to `!important`.
2121
- `!important` greatly increases the power of a CSS rule, making it extremely tough to override in the future. It’s only possible to override with another `!important` rule later in the cascade.
2222
- Don’t use `margin-top`.
23-
- Vertical margins collapse. Always prefer `padding-top` or`margin-bottom` on preceding elements
23+
- Vertical margins [collapse](https://developer.mozilla.org/en-US/docs/Web/CSS/margin_collapsing). Always prefer `padding-top` or`margin-bottom` on preceding elements
2424
- Avoid shorthand properties (unless you really need them)
2525
- It can be tempting to use, for instance, `background: #fff` instead of `background-color: #fff`, but doing so overrides other values encapsulated by the shorthand property. (In this case, `background-image` and its associative properties are set to “none.”
2626
- This applies to all properties with a shorthand: border, margin, padding, font, etc.
@@ -234,7 +234,7 @@ Choose your modifiers wisely. These two rules have very different meaning:
234234

235235
## Selector Naming
236236

237-
- Try to use BEM-based naming for your class selectors
237+
- Try to use [BEM-based](http://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/) naming for your class selectors
238238
- When using modifier classes, always require the base/unmodified class is present
239239
- Use Sass’s nesting to manage BEM selectors like so:
240240
```scss
@@ -262,7 +262,7 @@ There are a few reserved namespaces for classes to provide common and globally-a
262262
- `.o-` for CSS objects. Objects are usually common design patterns (like the Flag object). Modifying these classes could have severe knock-on effects.
263263
- `.c-` for CSS components. Components are designed pieces of UI—think buttons, inputs, modals, and banners.
264264
- `.u-` for helpers and utilities. Utility classes are usually single-purpose and have high priority. Things like floating elements, trimming margins, etc.
265-
- `.is-, .has-` for stateful classes, a la SMACSS. Use these classes for temporary, optional, or short-lived states and styles.
265+
- `.is-, .has-` for stateful classes, a la [SMACSS](https://smacss.com/book/type-state). Use these classes for temporary, optional, or short-lived states and styles.
266266
- `._` for hacks. Classes with a hack namespace should be used when you need to force a style with `!important` or increasing specificity, should be temporary, and should not be bound onto.
267267
- `.t-` for theme classes. Pages with unique styles or overrides for any objects or components should make use of theme classes.
268268

0 commit comments

Comments
 (0)