hupe1980 / gatsby-plugin-material-ui

Gatsby plugin for Material-UI with built-in server-side rendering support
MIT License
136 stars 25 forks source link

Autoprefixing seems to not be working #57

Open josub opened 4 years ago

josub commented 4 years ago

It seems like autoprefixing is not happening, for e.g. using display: flex like so

const useStyles = makeStyles(theme => ({
  appBar: {
    display: "flex",
  },

I'd expect to see the following when inspecting the CSS

display: -webkit-box; 
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex; 
display: flex;

but I still just get, so no vendor prefixing seems to have been added

display: flex;

The config is the below i.e. Im not using disableAutoprefixing. What am I missing, shouldnt it autoprefix occur with this config and use case?

{
      resolve: "gatsby-plugin-material-ui",
      options: {
        stylesProvider: {
          injectFirst: true,
        },
      },
    },
oliviertassinari commented 4 years ago

Please note that the autoprefixing on the server side is eager (prefix it all) while lazy on the client side (feature detection).

abohannon commented 3 years ago

I have a similar concern. I don't see any evidence that autoprefixing is happening for SSR. And inspecting the code in different browsers doesn't show any differences in prefixes. Perhaps I'm overlooking something?