filamentgroup / grunt-criticalcss

Grunt wrapper for criticalcss
MIT License
530 stars 27 forks source link

Js Responsiveness (@media queries, resolutions, etc...) #50

Closed shervud closed 1 year ago

shervud commented 6 years ago

Hello. Your script works fine but here some things I'd like to have or to know how to make it works if it is already possible.

  1. It is seem that your module does not allow to work with the different dimensions. it only has properties "width" and "height". For example another npm package grunt-critical has much more options and an ability to point several dimensions like in that way "dimensions": [ {width: 800, height: 600}, {width: 500, height: 350} ].
  2. Your module does not ability to proceed with HTML (or DOM) markup which is changed by JavaScript. So if
    is changed to
    then .class.active selector won't be picked up by your module. The only way to solve this issue is to use forceInclude. Does firceInclude option allows to include media queries to its array? Do you plan to develop a feature which will allow to see changes in DOM by JavaScript?

p.s. By the way grunt-critical is based on critical which is based on penthouse . And the last one has huge functionality and there is inheritance of features and options to run. Don't you plan to expand your functionality? :)