Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] No vendor prefixes generated when using withStyles #9293

Closed
1 task done
TheHolyWaffle opened this issue Nov 24, 2017 · 7 comments
Closed
1 task done

[question] No vendor prefixes generated when using withStyles #9293

TheHolyWaffle opened this issue Nov 24, 2017 · 7 comments
Assignees
Labels
support: question Community support but can be turned into an improvement

Comments

@TheHolyWaffle
Copy link
Contributor

TheHolyWaffle commented Nov 24, 2017

When I make use of the built-in withStyles HOC I don't get the automatic vendor prefixing despite the following pieces of documentation claiming otherwise:

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Vendor prefixes should be generated for certain style rules like display: 'flex' or transform: 'translateX(100px)'

Current Behavior

No vendor prefixes are generated

Steps to Reproduce (for bugs)

https://codesandbox.io/s/985r6o933w

  1. Inspect the element Test
  2. Notice that no vendor prefixes are generated when looking at the class .ExampleContainer-root-1

Your Environment

Tech Version
Material-UI 1.0.0 beta 21
React 16.1.1
browser Chrome 62
@mbrookes
Copy link
Member

@kof Would you be able to take a look at this one please?

@oliviertassinari oliviertassinari added support: question Community support but can be turned into an improvement and removed core labels Dec 5, 2017
@oliviertassinari oliviertassinari changed the title [Core] No vendor prefixes generated when using withStyles [question] No vendor prefixes generated when using withStyles Dec 5, 2017
@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 5, 2017

@TheHolyWaffle The prefixes are only added when needed (based on features detection client side). We have already discussed this point in:

The only downside of this approach is that the prefixes need to be added for the server-side rendering:
https://github.com/mui-org/material-ui/blob/b97dad65a4495fb68b9d864e11d25521cf9befce/pages/_document.js#L110-L112

@depiction
Copy link

Automatic prefixing when needed is not working as expected. I'm trying to use clip-path, which needs to be prefixed in Safari.

myStyle: { clipPath: 'polygon(0% 0%, 100% 0%, 100% 250px, 0% 100%)', }

When I view my page in Safari and inspect that code, there is no vendor prefix for clip-path. I'm using Material UI core v3.9.0 and JSS v9.8.7 with jss-preset-default.

@eps1lon

This comment has been minimized.

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 13, 2019

@depiction I confirm the problem, we miss the clipPath prefix on Safari: https://codesandbox.io/s/o40xvvrq25.

Could you open an issue on JSS side? cc @kof.

@kof
Copy link
Contributor

kof commented Feb 13, 2019

Opened an issue

@acejusto11
Copy link

Hi, Is the issue still exist? We are using version 4.0.2. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

7 participants