docs: Document preference for hyphenated class and ID values.

This clarifies that kebab case should be the preferred style for
multiword classes in HTML and CSS.
This commit is contained in:
Karl Stolley 2023-03-15 16:04:28 -05:00 committed by Tim Abbott
parent 674cf8eacc
commit deabb8ed53
1 changed files with 4 additions and 0 deletions

View File

@ -323,6 +323,10 @@ Don't use the tag name in a selector unless you have to. In other words,
use `.foo` instead of `span.foo`. We shouldn't have to care if the tag use `.foo` instead of `span.foo`. We shouldn't have to care if the tag
type changes in the future. type changes in the future.
Additionally, multi-word class and ID values should be hyphenated,
also known as _kebab case_. In HTML, opt for `class="my-multiword-class"`,
with its corresponding CSS selector as `.my-multiword-class`.
### Python ### Python
- Our Python code is formatted with - Our Python code is formatted with