MathiasGilson/Tailwind-Styled-Component

Apply tag selector that depends on another component

matheusTA opened this issue · 3 comments

Apply tag selector that depends on another component

Hi,

I need an equivalent of this:

export const Header = styled.div`
	background-color: #000;
	display: flex;
	justify-content: space-between;
	align-items: center;

	span {
		color: #fff;
	}

	button {
		background-color: #67f;
		color: #000;
	}
`;

Is there an equivalent with this library?

me too for next.js 13 app directory

You can probably use tailwind's primitive nested selectors like
[&_span]:text-white [&_button]:bg-[#67f] [&_button]:bg-black
right? So that'd be independent from this library.