CITguy / toggle-grayscale

Chrome extension to toggle between full color and grayscale
https://chrome.google.com/webstore/detail/toggle-grayscale/feefpfioflmdeinmmllkeemhmpagonlo
0 stars 0 forks source link

Doesn't work on legacy HTML documents #3

Open CITguy opened 5 years ago

CITguy commented 5 years ago

Specifically, it doesn't apply correctly to documents with a declared doctype that doesn't support CSS (e.g., HTML 3).

For example: We can't reliably apply filter: grayscale(100%); if the document relies on text, bgcolor, or similar stylistic attributes used in HTML 3 or older.

Maybe provide a warning when toggling that the doctype is too old to reliably function.

CITguy commented 5 years ago

Doctype Reference

HTML 5 (and beyond)

<!DOCTYPE html>

XHTML 1.0 Strict

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

XHTML 1.0 Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

XHTML 1.0 Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

XHTML 1.1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

XHTML 1.1 Basic

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">

HTML 4.01 Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

HTML 4.01 Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

HTML 4.01 Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

Conclusion

OK

WARN

UNSUPPORTED