Skip to content

Instantly share code, notes, and snippets.

SASS to Styled Component equivalents

Moving to Styled Components (from here on in known as SC as it's a pain to type) from SASS can be head work and can make you feel like you don't know CSS anymore. To aid in the conversion process this is a very high level overview of how to do the equivalents of SASS in SCs as the official documentation is often left wanting for this sort of thing.

Firstly

Assume one of following imports is always called in the SC examples where appropriate but not both

import styled from "styled-components"