0

In StyleX, how to style a body?

The body element that stays outside any React component, is usually styled using useEffect, but I can't figure out how to actually use that in StyleX.

There's nothing in the [documentation] about it (searched for "body" keyword).

0

1 Answer 1

1

If the body element is not rendered by a component (which is the case with Next.js), then use a traditional CSS file to style it.

StyleX is made for styling components and keep those styles contained. You’re supposed to keep using traditional CSS for global styles and resets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.