Buy Now and unlock this series
$
49
.99
yours forever
$
49
.99
Become a Pro and unlock everything
$
24
.99
per month
$
24
.99
Media Queries
Downloads
Become a pro to download code and videos
Styled Components
24 videos
Course Instructor
Scott Tolinski
- Introduction
35S - Why CSS In JS
3M29S - Project Setup and Our First Component
9M37S - How Styled Components Work
5M44S - Props In Styled Components
10M16S - How SC Replaces PreProcessors
6M54S - Styling Components & Extending
11M32S - Media Queries
11M11S - The CSS Helper
6M47S - Global Styles
8M5S - Organization
13M20S - Organization Part 2
11M59S - Scoping To Components
5M52S - Strategies For Variables
10M34S - Writing Good Mixins
12M18S - Building An Extendible System
11M25S - Polished
9M13S - BEM with
8M55S - BEM Part 2
9M17S - Themes in
9M31S - The CSS Prop for Prototyping
5M43S - The as Prop
3M1S - When To Use A Styled Component
6M11S - Where To Go From Here
5M41S
Comments
Raul
almost 2 years ago [edited]
@jared This makes your code easier to be managed if those sizes ever need updating and it is slightly easier to write then a media query. But keep in mind this is just personal preference and doesn't affect performance so you can use a nester media query if you prefer
jared
over 2 years ago
What is the advantage of using this function to pass breakpoints, rather than just writing a nested media query inside the styled-component, and pass the breakpoint in a ${...} from the size object? i.e, @media (min-width: ${size.small}) , etc.
Want to join the conversation?
Become a Pro member today!