Skip to main content

Postcss

Installation

npm -i @costcss/postcss-plugin
npm -i postcss-nested

note 'postcss-nested' is required for "nested" operations, obsiously.

const Container = styled.div<{active: boolean}>``
background-color: red;
&:hover {
background-color: blue;
}
::active {
background-color: yellow;
}
`
const breakpoints = {
sm: '620px',
md: '1000px',
lg: '1500px',
}

module.exports = {
plugins: [
require('@constcss/postcss')({
breakpoints
}),
require('postcss-nested')
]
};