Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the naming convention in css

Shulou Source: shulou.com Published: 2022-06-03 02:17:11 10月03日 Update

This article introduces the knowledge of "what naming conventions are there in css". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Lowercase letters plus hyphens (also known as kebab naming), underlining and hump naming are prohibited.

2. layout: in g namespace.

3. Status: take s as the namespace.

Represents a dynamic, interactive state.

4. Tools: use u as the namespace.

Represents a reusable tool for uncoupled business logic.

5. Components: take m as the namespace.

Represents a reusable, portable component module.

Example

/ * bad * / .mod_example {padding-left: 15px;} .modExample {padding-left: 15px;} / * good * / .mod-example {padding-left: 15px;} this is the end of the introduction of "what is the naming convention in css". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Space content tools more state knowledge components utility learning next underlining business dynamics also known as dilemmas letters examples actual lowercase layout Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Linux OPPO Reno Huawei Apple