3

is there a way to get hold of ignored CSS styles (the ones that are not supported in a browser, eg. strike-trough when you inspect them in dev tools) with JS?

The purpose for this is that I have done a polyfill but want to get the author styles. getComputedStyles et. al. doesn't work, as the browser cannot lookup unsupported properties. Any clues?

Thanks.

pnuts
  • 58,317
  • 11
  • 87
  • 139
  • This might be a start: [http://stackoverflow.com/questions/135657/tool-to-identify-unused-css-definitions](http://stackoverflow.com/questions/135657/tool-to-identify-unused-css-definitions) – LeDoc Jun 17 '15 at 15:04
  • Which one? I cannot find anything about ignored CSS properties, –  Jun 17 '15 at 18:58
  • Possible duplicate of [Can I access the value of invalid/custom CSS properties from JavaScript?](http://stackoverflow.com/questions/2926326/can-i-access-the-value-of-invalid-custom-css-properties-from-javascript) – Kuzeko May 26 '16 at 15:22
  • This is duplicate, the answer is here: http://stackoverflow.com/questions/2926326/can-i-access-the-value-of-invalid-custom-css-properties-from-javascript/2926433#2926433 and actually to use `document.getElementsByTagName("style")[0].innerText` and parse it – Kuzeko May 26 '16 at 15:23

0 Answers0