CSS Properties Order Approach
Fast tip. When i write CSS code, i like to order properties by impact.
Examples
- If you are doing a big call with a big font, put font size at top.
.big-call {
font-size: 7rem;
color: #f00;
min-height: 12rem;
}
- If you are doing a button that will float at top right of website.
.nice-button{
position: absolute;
top: 0;
right: 0;
}
In other words, put first what you think is relevant.
Written by Luiz Fernando de Souza Filho
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#