dialog-polyfill icon indicating copy to clipboard operation
dialog-polyfill copied to clipboard

CSS needs cross-browser work

Open Nettsentrisk opened this issue 12 years ago • 7 comments

In IE10, the default CSS does not make it look like in other browsers, the window is either the same width as the entire window, or it is left-aligned when it's centered in other browsers.

Nettsentrisk avatar Oct 03 '13 08:10 Nettsentrisk

I guess this is caused by lack of support for width: fit-content by IE: https://developer.mozilla.org/en-US/docs/Web/CSS/width I have one more issue with IE10:

Unable to get property 'length' of undefined or null reference 
dialog-polyfill.js, line 82 character 25

ffuubarbuzz avatar May 06 '14 15:05 ffuubarbuzz

Do you have any idea how to set a block element centered on IE without adding any DOM?

agektmr avatar Oct 04 '14 16:10 agektmr

I've been working on centering in IE for the Material Design Lite Dialog component. The only way I have found is, set a direct width, position absolute (fixed/static maybe as well) and then margin auto the left and right.

IE will not center anything with a variable width from all the testing I've done. Edge however, it works perfectly.

Garbee avatar Jul 17 '15 16:07 Garbee

I wonder if this could be fixed in at least IE10 with its flexbox support.

Also, doesn't IE9-10 support this?

<div style="margin: 0px auto; display: inline-block; background-color: blue;">Test</div>

samthor avatar Oct 03 '15 00:10 samthor

What about a combination of transform and display: table? See: https://jsbin.com/cufavugosa/1/edit?html,css,output Works on Edge, IE11-10 and even IE9 with -ms- prefix.

xfra35 avatar Sep 19 '18 05:09 xfra35

It's not really ideal because many folks want to restyle or move the <dialog> around the page, and adding more CSS that they might then have to override, might be frustrating.

But I accept that there's not really many better options right now.

samthor avatar Sep 19 '18 05:09 samthor

Would it be appropriate to have a class to modify the styles for IE? Clearly not meaning it is a direct "polyfill" then since specs don't have classes. But for people who need IE support they can opt in to those rule changes as-needed. Without it being forced on people already using the system in production.

Garbee avatar Sep 19 '18 11:09 Garbee