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

Handling CSS Import Rule #49

Open
raincreativelab opened this issue Jul 16, 2017 · 0 comments
Open

Handling CSS Import Rule #49

raincreativelab opened this issue Jul 16, 2017 · 0 comments
Assignees
Labels

Comments

@raincreativelab
Copy link

raincreativelab commented Jul 16, 2017

I just checked out your Element query. I'm using this library on top of Drupal 8.
I found out that you are not handling CSS Import when parsing rules.

After checking in your code, I found a solution that fixes it.

function parseRule(rule) {
    // Handle rule type#3 – CSS Import
    if (rule.type === 3) {
        var importedRules = rule.styleSheet.cssRules;
        if (importedRules) {
            for (var i = 0; i < importedRules.length; i++) {
                parseRule(importedRules[i]);
            }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants