import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; const useStyles = makeStyles({ root: { color: 'red', '& p': { margin: 0, color: 'green', '& span': { color: 'blue', }, }, }, }); export default function NestedStylesHook() { const classes = useStyles(); return (
This is red since it is inside the root.

This is green since it is inside the paragraph{' '} and this is blue since it is inside the span

); }