Commit a1b3a364 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'favour-classnames-over-tag-names' into 'master'

Favour classnames over tag names

See merge request gitlab-org/gitlab!30698
parents ee82eda6 3a1bf9b2
......@@ -77,6 +77,24 @@ CSS classes should use the `lowercase-hyphenated` format rather than
}
```
Class names should be used instead of tag name selectors.
Using tag name selectors are discouraged in CSS because
they can affect unintended elements in the hierarchy.
Also, since they are not meaningful names, they do not
add meaning to the code.
```scss
// Bad
ul {
color: #fff;
}
// Good
.class-name {
color: #fff;
}
```
### Formatting
You should always use a space before a brace, braces should be on the same
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment