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

Parse @imported stylesheets #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CodySchneider
Copy link

Review on Reviewable

@@ -164,6 +164,12 @@
processSelector(rule[cssRules][j].selectorText);
}
}
// Handle @imported stylesheets
else if (rule.styleSheet && rule.styleSheet.cssRules && rule.styleSheet.cssRules.length) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this is in an else if? Wouldn't it be possible that a stylesheet has some CSS rules and an import?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly... to be honest this was a quick hack in order to evaluate whether this script would even work in our environment. In our case Drupal just spews out a bunch of imports in a <style> block and this seems to work.

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.

None yet

2 participants