Quick Reference
This is a CSS template to organize your styles by section, page, product, etc. It also has a sample link to import another style sheet, a sample link to Google Fonts, and several sample media queries.
I also like to keep a list of my colors towards the top for reference.
@charset "UTF-8";
/* CSS Document */
@import url("my-other-style-sheet.css");
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
/* =======================================================================
COLOR PALETTE
==================================================================== */
/* font: #2d2d2d */
/* black: #131313 */
/* white: #ffffff */
/* =======================================================================
GENERAL
==================================================================== */
@media screen and (min-width: 1024px) and (max-width: 1439px) {
.foo {
}
}
@media screen and (max-width: 1023px) {
.foo {
}
}
@media screen and (max-width: 767px) {
.bar {
}
}
/* ==========================================================================
HIDE/SHOW - CLASS APPLIED TO ELEMENT AS BUILT
======================================================================= */
/* large devices such as big laptops, desktops [ 1440px + ] */
@media only screen and (min-width: 1440px) {
.hide_large {
display: none !important;
}
}
/* midsize devices such as small laptops, small desktops [ 1024px to 1439px ] */
@media only screen and (min-width: 1024px) and (max-width: 1439px) {
.hide_midsize {
display: none !important;
}
}
/* midsize devices such as tablets [ 768px + ] */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
.hide_tablet {
display: none !important;
}
}
/* small devices such as phones [ less than 768px ] */
@media only screen and (max-width: 767px) {
.hide_mobile {
display: none !important;
}
}
/* very small devices such as phones in portrait [ less than 600px ] */
@media only screen and (max-width: 600px) {
.hide_mobile_small {
display: none !important;
}
}
/* =======================================================================
HEADER
==================================================================== */
/* =======================================================================
SIDEBAR
==================================================================== */
/* =======================================================================
FOOTER
==================================================================== */
/* =======================================================================
PAGES
==================================================================== */
/* =======================================================================
PRODUCTS
==================================================================== */
/* =======================================================================
ARCHIVES & BLOG POSTS
==================================================================== */
/* =======================================================================
TABLET AND MOBILE SETTINGS
==================================================================== */
/* small desktop */
@media screen and (min-width: 1280px) and (max-width: 1439px) {
.foo {
}
}
/* big tablet */
@media screen and (min-width: 1024px) and (max-width: 1279px) {
.foo {
}
}
/* tablet */
@media screen and (min-width: 768px) and (max-width: 1023px) {
.foo {
}
}
/* phone */
@media screen and (max-width: 767px) {
.foo {
}
}
CSS Notes:
- The “inherit”, “initial” and “unset” keywords can be used with any CSS property to set its value
- In CSS there are many ways to express a color value in a property
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.