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

CSS value 'initial' is not supported by IE #1

Closed
necolas opened this issue Aug 17, 2014 · 8 comments
Closed

CSS value 'initial' is not supported by IE #1

necolas opened this issue Aug 17, 2014 · 8 comments

Comments

@necolas
Copy link
Contributor

necolas commented Aug 17, 2014

style.show won't work in IE: https://developer.mozilla.org/en-US/docs/Web/CSS/initial#Browser_compatibility

@azer
Copy link

azer commented Aug 17, 2014

what would work in all browsers?

@necolas
Copy link
Contributor Author

necolas commented Aug 17, 2014

no single value will work.

jquery tries to work it out using an iframe (pretty nasty imo): https://github.com/jquery/jquery/blob/c869a1ef8a031342e817a2c063179a787ff57239/src/css/defaultDisplay.js

or you could keep a map: https://github.com/jquery/jquery/blob/995f70777ac6c0f988a44807ef1399e73937b2ee/test/unit/effects.js#L103-L118

perhaps there's a way to test if initial is supported, and then fallback to the map if not

@necolas
Copy link
Contributor Author

necolas commented Aug 18, 2014

alternatively, show could claim to do nothing more than set style.display to "". that way hide/show can be described as style.display="none"/style.display="". it won't cover as many use cases as an explicit 'show', but most of those cases aren't good or required patterns.

@azer
Copy link

azer commented Aug 19, 2014

@necolas would you like to get access to directly edit these libraries? I can add you as contributor and owner to the modules that you'd like to publish

@necolas
Copy link
Contributor Author

necolas commented Aug 19, 2014

yeah sure

@azer
Copy link

azer commented Aug 19, 2014

@necolas ok, sent you invite and added to the module owners: https://www.npmjs.org/package/dom-style let me know if you need other module ownerships, too

@vvo
Copy link

vvo commented Sep 17, 2014

interesting, which solution do we pick?
initial
fallback to map
fallback to ""/none (unkown element)

@TehShrike
Copy link
Member

This is hidden's problem now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants