Skip to content

Commit 801dc1f

Browse files
authored
Update README.md
1 parent ad549b6 commit 801dc1f

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,25 @@ The following things set of rules should be applied when deciding on a CSS archi
381381
382382
Its important to note that if using a framework, you should compartmentalize where and when it is used. This way, in the event of a complete overhaul of your CSS / HTML, refactoring is easy.
383383
384+
A few conventions should be applied when doing this
385+
386+
Don't
387+
388+
- Rely on too many framework classes. Use as few as possible. E.g. Bootstrap's row, columns, and rows are sufficient for most things.
389+
390+
Do
391+
392+
- Override CSS of bootstrap framework. E.g. `bg-background` you can override it with `background-color: yellow !important` under `_vendor.scss`. This makes customization much easier than modifying the original SCSS files. Later, you can refactor and identify what elements you used quickly by looking at `_vendor.scss`
393+
- Document which classes you use in `_vendor.scss`
394+
384395
Next, there should be some sort of convention for determining how styles are created. These questions should be the following:
385396
386-
- **Which HTML elements are going to be used and why?** - For instance,
387-
- **Joined selectors?**
397+
### Semantic CSS vs Semantic HTML
398+
399+
There's always a tradeoff between how easy the HTML is to read VS how easy the CSS is to understand.
400+
401+
BEM main disadvantage is creating excessively long classes and state modifiers
402+
403+
Ideally, it is best to get both semantic CSS and semantic HTML
388404

389-
-----------------------------------------------------------------
405+
- Semantic CSS → Use state modifiers

0 commit comments

Comments
 (0)