Skip to content
JS

Convert SCSS (Sass) to CSS-in-JS

Course on egghead by Oleg Isonen

View on egghead (opens in a new tab)
24 min
LengthVideo runtime
Free
Price modelListed as free
11
Lessons
4.6
Rating out of 56 ratings on egghead
Aug 2018
Published7 Aug 2018

About this course

Description from egghead

CSS uses a global namespace for CSS Selectors that can easily result in style conflicts throughout your application when building an application using modern web components. You can avoid this problem by nesting CSS selectors or use a styling convention like BEM but this becomes complicated quickly and won’t scale. CSS-in-JS avoids these problems entirely by generating unique class names when styles are converted to CSS. This allows you to think about styles on a component level with out worrying about styles defined elsewhere. In this course, you will learn how to express popular SCSS (Sass) language features using latest JavaScript features. We will convert simple examples from SCSS to CSS-in-JS. As a designer or (S)CSS developer, you should be able to follow without extensive JavaScript knowledge, understanding SCSS is required though.

What it covers

11 lessons
  1. 1Convert Sass (SCSS) Styled Button to CSS-in-JS with JavaScript Templates and Variables
  2. 2Import JavaScript Variables for Styling with CSS-in-JS
  3. 3Import and Render Style Partials from JavaScript Modules with CSS-in-JS
  4. 4Use JavaScript Functions as Mixin Directives for CSS-in-JS Style Declarations
  5. 5Destructure Named CSS-in-JS Arguments to use in JavaScript Mixin Functions
  6. 6Define and Override Default CSS-in-JS Values for Arguments in a JavaScript Function Mixin
  7. 7Apply Multiple CSS-in-JS Arguments in a JavaScript Mixin Function with the Rest Operator
  8. 8Express CSS with JavaScript Objects for CSS-in-JS Notation
  9. 9Use JavaScripts Spread Operator to Apply Style Objects Returned from CSS-in-JS Mixins
  10. 10Prevent CSS Class Name Collisions with Scoped Class Names in CSS-in-JS
  11. 11Style HTML with JavaScript Template Strings and Objects in CSS-in-JS

Similar HTML and CSS courses

  1. Create Graphics with HTML Canvas

    egghead · Alyssa Nicoll · 7 lessons · 3.6 from 1 ratings · Jul 2017

    25 minSubscription
    egghead73.6 (1)Jul 2017
  2. Create an SVG Icon System

    egghead · Damon Bauer · 11 lessons · 4.3 from 1 ratings · Feb 2017

    28 minSubscription
    egghead114.3 (1)Feb 2017
  3. Flexbox Fundamentals

    egghead · Garth Braithwaite · 8 lessons · 4.4 from 77 ratings · Apr 2016

    18 minSubscription
    egghead84.4 (77)Apr 2016
  4. Calculator Project: HTML & CSS

    Master.dev · Jen Kramer · 12 lessons · Sept 2019

    48 minSubscription
    Master.dev12Sept 2019
  5. Images and Links in HTML

    Coursera · Judy Richardson · Jun 2020

    Beginner55 min
    CourseraJun 2020
  6. Introduction to HTML

    Coursera · Judy Richardson · Jun 2020

    Beginner55 min
    CourseraJun 2020
  7. Game Development: HTML to Unreal Engine Mastery

    Coursera · Karlis Zars, Starweaver · May 2024

    Beginner1 h
    CourseraMay 2024
  8. Learn CSS: Colors

    Codecademy · 1 lessons · Oct 2022

    Beginner1 h
    Codecademy1Oct 2022

A hyphen means the provider's catalogue does not state the value.

Same topic, nearest in length, up to three from any one provider.

Data read from the egghead catalogue on 28 Nov 2026. How the data is collected.

    Compare