The Ultimate Guide To Learning CSS
The Ultimate Guide To Learning CSS
How do you learn CSS? CSS is a vast subject, with many different layers
to learn about covering all different aspects of manipulating the display of
elements on a page.
Topics are arranged in an order that makes sense for learning from
scratch. So if you're brand new to CSS, you should be able to start at the
top and work downwards, gradually increasing your understanding.
If you have particular areas of CSS you want to brush up on, you can use
the table of contents to jump to them.
And finally, if you're looking for ways to stay up to date, the newsletters
portion at the very end will give you a number of options for continuing to
hear about the latest and greatest.
Affiliate disclosure: Some of the links on this page are affiliate links,
which means I may receive a commission if you decide to buy a product
or service I have recommended. But if youʼd prefer I didnʼt receive a
commission, thatʼs cool too. Just Google the vendorʼs site instead of
using my link.
Table Of Contents
CSS Selectors
CSS Box Model
CSS Layout
Styling Text with CSS
Styling Boxes with CSS
CSS Units
CSS Colors and Gradients
CSS Transitions and Animations
CSS Transforms
CSS Pseudo-classes and Pseudo-elements
CSS At-Rules (e.g. Media Queries)
CSS Specificity
CSS Preprocessors
CSS Naming Systems and Architecture
Common CSS Practices
CSS Walkthroughs and Examples
Comprehensive CSS Resources
CSS Frameworks
Free CSS Courses
Paid CSS Courses
CSS Newsletters
CSS Selectors
One of the key initial concepts in CSS is selectors and how they work.
From there you can move into advanced selectors and pseudoselectors,
as well as understanding the various types of properties you can
manipulate. But without selectors, you have no way to apply the things
you learn, so this is where you start.
CSS Layout
Once you have the ability to target html elements for styling, layout is the
next core concept to master. Layout involves manipulating how elements
lay out on the page. How much space do they take? Are they side by side
or on top of each other? How do you manipulate this to create exactly the
design you desire? This is an area of CSS that has changed and improved
dramatically over the last few years with Flexbox and CSS Grid, but some
of the fundamentals (flow and the box model) have remained the same.
Increasingly layouts can be done purely with CSS Grid and Flexbox, but
for those who still must support older browsers, grid systems built using
Flexbox or even floats are still useful.
Flexbox Froggy
Wonderfully whimsical game that lets you practice your flexbox skills by
positioning frogs on lilly pads. Hands down the best "learn by doing"
resource out there for Flexbox.
A Beginnerʼs Guide to CSS Grid | Free Code Camp
Great, simple, and very visual step by step guide to CSS Grid.
One of the fundamental pieces of web styling is how we deal with text.
Paragraphs, headers, links, lists... text is one of the fundamental building
blocks of the web, and there are a myriad of ways to make it look good.
The other fundamental building block of how things appear on the web is
boxes. As you learned above in the box model, everything in a webpage
is a box, so understanding the tools at your disposal for styling those
boxes is key.
CSS Units
The web has not one but 3 unique color systems, as well as a a number
of keywords and the ability to create complex gradients.
CSS Gradient
A visual tool for generating CSS Gradients. Test and tinker in real time,
and when you get one you like simply copy out the CSS.
How to add gradients to images with CSS ::after | Peter Ramsing
Gradients can also be useful for manipulating images and all sorts of
other good stuff. This shows how to do a nice gradient fade-out of an
background image using a gradient.
CSS Transforms allow you to shift and morph your elements in either 2d
or 3d space. Not satisfied with simple rectangular boxes, and you want to
create triangles? Chances are you'll be using transforms. They also let
you animate some aspects of elements in a high-performance way by
moving elements into their own layers and allowing you to GPU-
accelerate the animations. Very useful!
This can let you do things like add icons to links or buttons, layer on
additional borders, or other complex visual tricks.
How CSS pseudo-classes work, explained with code and lots of diagrams
| FreeCodeCamp
Great introductory explainer to pseudo-classes, with visual diagrams and
step by step breakdown. If you're brand new to this, start here.
CSS Specificity
CSS Preprocessors
The use of CSS preprocessors (primarily Sass aka SCSS) has become so
common that many developers (including the author) consider them
almost a part of CSS, talking about things that are a part of e.g. SCSS
while discussing CSS Architecture. Also, they make your life so much
easier... if you're not already, definitely consider switching to SCSS.
Take your Sass skills to the next level with list-maps | CodeFellows
Another key Sass feature, especially for things like color palletes and the
like, is list-maps. Definitely worth reading into.
Stylus
Stylus is another compile-to-CSS language that remains somewhat
popular. Those who particularly like terse syntax and don't mind
whitespace sensitivity should check it out.
SMACSS
Similar to the role OOCSS played in kicking off new thinking around CSS
naming systems, SMACSS was one of the first big CSS architectural
systems, and is still one of the best documented ones. Even if you intend
eventually moving to a more modern architectural system like ITCSS, it
can be super helpful to read through the SMACSS system to deeply
understand the concept and why's around categorizing and
systematizing your stylesheets.
ECSS
ECSS combines an architectural approach - organization via modules -
with a naming convention that takes BEM style naming conventions and
"turns them up to 11". Advocates of pure component-based styling will
find much to like in this approach.
Autoprefixer | CSS-Tricks
Autoprefixer is a must-have tool for modern CSS, letting you stop worring
about the different variations of properties across browsers and just
specify what browsers you want to support and let the tool automatically
handle it.
Sometimes rather than deep diving into a particular topic, it's more useful
to have a walkthrough of accomplishing a particular goal. Here are some
especially well done walkthroughs.
Animating Border
You would think that something as conceptually simple as animating the
border on a button would be easy to do, right? But no… itʼs actually very
hard to do right. This article goes through the different approaches and
their pros and cons.
CSS Frameworks
Bootstrap
Bootstrap is the most popular CSS framework by a large distance. It
tends to be pretty opinionated and difficult to customize deeply, but is a
great place to begin.
ZURB Foundation
Often described as a "designer-focused" CSS Framework, ZURB
Foundation places far more emphasis on being customizeable and
extensible than providing a polished UI 'out of the box'. Offers
tremendous customization simply by manipulating an SCSS settings file,
plus every component is built using reusable SCSS mixins and functions
that you can utilize to build your own customized components.
Semantic UI
A natural language-focused CSS framework with extensive theming
capabilities. A bit heavy-weight and challenging to break into subpieces,
but extremely powerful.
Learn Semantic
An extensive set of learning guides for Semantic UI.
Bulma
A compact, CSS-only framework that is excellent for those who find the
above frameworks too heavyweight and complex. Where Bootstrap,
ZURB Foundation, and Semantic all come with integrated JavaScript for
some components, Bulma only ships CSS and leaves any JavaScript
integration to the developer.
MaterializeCSS
An implementation of Google's Material Design as a CSS Framework that
does not have a dependency on any particular JavaScript framework.
(Note: There are also Material Design implementations in React, Angular,
and Vue.)
freeCodeCamp
Optional login if you want to track your progress. Lets you pick and
choose lessons, but also has a beginning to end course on "Responsive
Web Design" that covers HTML as well as. Similar to Codecademy in the
interactive setup with multiple windows, but I think better because it lets
you pick and choose resources if you like.
While there are tons of great free resources available, sometimes you get
waht you pay for, and these paid courses have a tremendous amount of
depth while guiding you step by step. Plus, I know that when I pay for
something it makes me way more likely to follow through.
CSS - The Complete Guide (incl. Flexbox, Grid & Sass) | Udemy
Starts from scratch and takes you through to advanced use. Has 3
separate tracks depending on your current skill level, and provides over
22 hours of video content and over 300 supplemental resources. One of
the instructors - Maximilian Schwarzmüller - is one of the top instructors
on Udemy, and for good reason. He's excellent at breaking things down
so you can understand no matter what your level of expertise.
Advanced CSS and Sass: Flexbox, Grid, Animations and More! | Udemy
For those already more advanced at CSS and wanting to truly become an
expert, this course offers 28 hours of video content for taking you from
intermediate to advanced. Organized around a series of projects, this is
the top-rated CSS course on Udemy with over 500 ratings. Truly high
quality stuff.
CSS Newsletters
The state of the art is constantly changing, and weekly newsletters can
be a great way to keep up with that change. Here's some of the top CSS
newsletters out there.
Friday Frontend
15 links each Friday with commentary, covering CSS, JavaScript, and
other important web topics and news. Published by KBall, founder of
ZenDev.
CSS Weekly
A weekly roundup of CSS focused articles, tutorials, experiments and
tools curated by Zoran Jambor.
Layout Land
Primarily used to keep subscribers up to date of new videos on the
Layout Land Youtube Channel, published by Mozilla Developer Advocate
Jen Simmons.
Frontend Focus
A once–weekly roundup of the best front-end news, articles and tutorials.
HTML, CSS, WebGL, Canvas, browser tech, and more. Published by
Cooperpress.
HeyDesigner
Covers HTML, CSS, and SCSS, but also a range of other topics
interesting to designers. Published weekly by Tamas Sari.