material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[Toolbar] display:flex is not a string, but an object

Open create-renegr opened this issue 10 years ago • 4 comments

Problem description

display:flex is an object, instead of a string. Which breaks the flow of the UI. Any idea why? In the example of the documentation flex is a string.

display_not_string

Versions

  • Material-UI: 0.15.0
  • React: 15.0.1
  • Browser: Chromium 50.0

create-renegr avatar Jun 03 '16 10:06 create-renegr

I've traced this problem to inline-style-prefixer, a package material-ui depends on. inline-style-prefixer rewrites styles based on user-agent detection and fails to detect Chromium correctly. The following code, added to any material-ui app and tested in Chromium, demonstrates that inline-style-prefixer generates a list rather than a string:

import Prefixer from 'inline-style-prefixer';
console.log(new Prefixer().prefix({display: 'flex'}).display);

hathawsh avatar Jun 22 '16 23:06 hathawsh

It appears to me, that a fix has been merged into inline-style-prefixer (see https://github.com/rofrischmann/inline-style-prefixer/issues/84). But at the time of writing, there is no new release published. (Bugfix merged after 1.0.4 release)

So we have to wait for a new release for inline-style-prefixer. Right?

create-renegr avatar Jun 28 '16 14:06 create-renegr

I have just created a pull request #4613 that updates inline-style-prefixer to the newest (2.0.0) release, but that did not solve this issue for me. The code @hathawsh provided still returns a list in Chromium (Version 51.0.2704.79 Ubuntu 14.04 64-bit).

angelikatyborska avatar Jul 03 '16 14:07 angelikatyborska

Closing as a duplicate of #5052.

oliviertassinari avatar May 21 '17 16:05 oliviertassinari