Ticket #7975 (closed feature: fixed)
Remove invalid CSS for legacy browsers
|Reported by:||selfthinker||Owned by:|
The CSS for jQuery UI currently includes a few hacks and invalid CSS to support legacy browsers. While it's a good thing for people who either need to support them or have clients who cannot be educated to understand that websites don't need to look the same in every browser, people who have the power to move the web forward have not much choice. While it's true that people don't need to use the CSS that comes with jQuery UI and/or the theme roller, the vast majority of people do. They rather overwrite things later in their own CSS than change the original source, because it's much more upgrade-proof to do so.
Rather than changing the CSS as a whole, I propose to add an option to the theme roller like
[x] Fully support legacy browsers
I have prepared two branches ("modern-stable" is based on "1-8-stable" and "modern-devel" is based on "master", pull requests will follow) which does the following:
- reduce invalid CSS where the use of it was not necessary at all (that reduced the amount of CSS errors from 33 to 24)
- moved legacy styles to their own files, so they'd be easier to be removed (through a theme roller option or manually)
- moved IE6 fixes to jquery.ui.ancient.css (removing it would reduce the errors to 21)
- moved other less important fixes for other older browsers to jquery.ui.legacy.css (removing that would reduce the errors to just 3)
- some other enhancements
I left in exactly 3 errors, because IMO they fix more important things:
- Removing the opacity filter in .ui-widget-overlay would make it quite useless in IE6-8. Although there would be an easy solution to that: Just add transparency to the background image that is already in use anyway.
- I left button.ui-button::-moz-focus-inner (and added input.ui-button::-moz-focus-inner) because it could make a difference in scenarios where a lot of buttons are in a row. Otherwise I think it's an edge case, because all the buttons look very different in all the browsers anyway.
- A fourth error appears with the devel version: "0 is not a box-shadow value". But I believe that's rather an error in the validator.
Judging from opinions of the jQuery UI team I read elsewhere, I can imagine chances are not very high that these changes will get merged. But at least I made them so unintrusive that most users wouldn't know the difference, but they make it easier to remove "harmful" bits for people who care about those things.
- Status changed from new to open
- Version set to 1.9.0
comment:12 Changed 3 years ago by mikesherov
- Summary changed from Give option to not support legacy browsers with invalid CSS to Remove invalid CSS for legacy browsers