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

Replaced outdated IE7 CSS hacks #204

Closed
wants to merge 3 commits into from
Closed

Conversation

eldang
Copy link

@eldang eldang commented Apr 1, 2022

Parcel versions 2.4.0 & 2.4.1 refuse to build if any dependency has invalid CSS. This has created an incompatibility with various other projects including DataTables, and the Parcels maintainer has expressed a strong preference for fixing all the other projects rather than loosening the constraint: parcel-bundler/parcel#7854

Fortunately, in this project the issue seems to be confined to a handful of CSS declarations that use the very nonstandard *propertyname hack for IE7 and older. This PR simply replaces each instance of that hack with the modern, standards-compliant @supports construct. In each instance, the IE-specific rule is first, followed by an @supports block that overrides it for more modern browsers. It's written in this slightly counterintuitive way because IE does not itself support @supports.

I would also be happy with dropping IE<=7 support entirely, or allowing a little degradation in those very old browsers by dropping these specific CSS rules. But I do not feel that that's my decision to make! So this is an attempt to maintain that support while complying with modern CSS standards.

Unfortunately I am not able to test this work in IE as I work on a Mac.

All work in this PR is offered under the MIT License.

@AllanJard
Copy link
Contributor

Yes, good call! With DT1.11 we dropped IE6/7 support, going for 8+ ((our browser support page](https://datatables.net/download/compatibility)).

I need to grab a VM with IE8 and check the cursor: pointer support. MDN says it was supported from IE6 which I don't recall being correct, but goodness me it was a while back now! If we don't need the @supports checks, that would be good.

@eldang
Copy link
Author

eldang commented May 11, 2022

In case this comes up for anyone else: one of the Parcel maintainers suggested some workarounds at parcel-bundler/parcel#7854 (comment)

I just tried https://github.com/ds300/patch-package and it was easy to apply and solved the problem for me.

@AllanJard
Copy link
Contributor

I think that is all the IE6/7 CSS hacks removed now, which I did as part of a recent reorganisation of the CSS. As such I'm going to close this PR. The fixes will be included in DataTables 1.12 :)

@AllanJard AllanJard closed this May 11, 2022
@eldang
Copy link
Author

eldang commented May 11, 2022

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants