fullstack-development / fullstack-development/front-end-best-practices
Ввести ограничение на вложенность селекторов.
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 336
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
Я читала, что хорошей практикой считается вложенность селекторов не больше двух уровней, т.к. большая вложенность усложняет читабельность и поддержку кода.
Неправильно. Вложенность больше двух уровней
.block {
display: block;
.description {
font-size: 14px;
.title {
font-size: 16px;
}
}
}
Правильно. Псевдоэлменты, псевдоселекторы, родственные и соседние селекторы не влияют на вложенность.
.checkbox__input:checked ~ .checkbox__label::before {
border-color: #3D4975;
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No target file or test is named in the issue. First locate the documentation section covering selector nesting, then review the surrounding guidance and examples. Done means the two-level nesting limit and its stated exceptions are documented consistently with the project’s existing checklist style.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100