P
Duy Anh Le• 120
@leanhduy
Posted
Good work!
Through my review of your code, I have one following suggestion:
-
Consider creating variables to hold shared values in the css (e.g., colors), instead of hardcoding in each element
color
orbackground-color
- Create variables in the
html
selector: e.g.,--text-main: #ff0000;
- Use the variable. e.g.,
h1 { color: var(--text-main); }
Why: Better code maintability. If there is a requirement change about the color, you will only need to update the value of variable in the
html
selector, instead of finding all elements with same color and update it. - Create variables in the
Marked as helpful
1