mui / material-ui

Material UI: Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
https://mui.com/material-ui/
MIT License
92.53k stars 31.9k forks source link

Cover css colon selector in documentation #13677

Closed sshevlyagin closed 5 years ago

sshevlyagin commented 5 years ago

Expected Behavior 🤔

CSS colon selectors should be covered in the documentation. As per my confusion here

Current Behavior 😯

They're not covered (here)[https://material-ui.com/customization/overrides/]

I'm happy to make a pull request if y'all think this is a valid issue.

oliviertassinari commented 5 years ago

@sshevlyagin You don't have to use our styling solution for that. If you decide to go with JSS you can learn more about it on their documentation: https://cssinjs.org/jss-nested/.

sshevlyagin commented 5 years ago

Sorry if this is obvious. What would be the way to override expansionPanel firstChild and lastChild border styles using the material ui styling solution?

oliviertassinari commented 5 years ago

Do you want to use the theme overrides or withStyles?

sshevlyagin commented 5 years ago

I’m using a theme. So which one should I use?

oliviertassinari commented 5 years ago

@sshevlyagin You just have to replicate how it's done in the source:

    root: {
      '&:first-child': {
      },
      '&:last-child': {
      },
    }