marcj / css-element-queries

CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
http://marcj.github.io/css-element-queries/
MIT License
4.27k stars 487 forks source link

How to use or remove the console message "CssElementQueries: unable to parse local css files," ? #260

Closed stephyswe closed 4 years ago

stephyswe commented 5 years ago

Hi,

Your JS lib is working nicely.

But I don't really understand what unable to parse local css is? Can author or someone please help me get rid of the console.log message or elaborate what it means ?

marcj commented 4 years ago

As in the readme stated

Local stylesheets do not work (using file:// protocol).

Its due to security concerns. Reading css files loaded from file:// urls violates a Cross-Origin Resource Sharing (CORS) policy and thus will never be supported.