Keeping your Layouts & Styles SIMPLE.
(for CSS or SCSS)
Everything is made up of ROWS and COLUMNS. Build your markup to follow this standard convention.
Writing markup with the largest layout as a reference will ensure that you have the most complex information in your markup (you can always hide the extra stuff for small screens).
Elements of the same type should have distinct class names if they behave differently. Here, the ULs have distinct classes:
<div class="links featured-links"> <ul class="featured-links-left">...</ul> <div class="featured-links-right">...</div> </div> <div class="sidebar"> <ul class="sidebar-links">...</ul> </div>
It's OK if this makes your markup verbose. You can always go back to optimize & make your markup dryer later.
Add in CSS RESETS NOW!! A CSS Reset zeroes out inconsistent padding and spacing that is slightly different from one browser to another. Don't wait to do this at the end of your project or it will break your styles.
(If you are using a CSS framework, you don't need to do this step!)
You can immediately tell what is a BLOCK element, versus what is an inline element.
You can also better keep track of all the rectangles, and tell the difference between padding and margin.
90% of your styling work should be done in this ugly color-block mode.
Hide everything that is not relevant for the smallest/simplest layout. Do not restrict small styles in media queries because "small" styles are essentially the base/default styles that should apply to all sizes until they are overridden at larger screen sizes).
If you are super new to CSS, it is easiest to keep your browser at a single size and style everything, then make the screen larger to style for the next-largest size, making sure to use inline media queries, etc.
Browser-Sync will allow you to style for all screen sizes simultaneously. If you are comfortable working this way, you can focus on one element at a time, and style it for all screen sizes.
h1{ font-family: "Helvetica Neue", sans-serif; font-size: 1rem; @media only screen and (min-width: 768px){ font-size: 1.3rem; } @media only screen and (min-width: 1200px){ font-size: 1.6rem; }
}
Use mixins instead.
Generally, your css should still be clean and beautiful when it is compiled.
If you write bad scss it will output very very bad css.
Grok the tl;dr of http://sass-guidelin.es/