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

Bubbling of nested directives #2473

Merged

Conversation

SomMeri
Copy link
Member

@SomMeri SomMeri commented Feb 24, 2015

Related to #1691 and #2104

Directives are changed to work the same way as media. The biggest code change is that the rules property of directive.js contains an array instead of just a ruleset.

Directive bubbling ends at the closest directive or media, e.g. this remains unchaged by compilation:

@media print {
    @supports (upper: test) {
        @supports not (-webkit-font-smoothing: subpixel-antialiased) {
           @media screen {
              nested {
                property: value;
              }
           }
        }
    }
}

jurcovicovam added 2 commits February 24, 2015 14:08
It is because:
1.) Consistency: media.js is done the same way.
2.) Ruleset may or may not change to array in to-css-visitor. All
    following code had to hande two cases afterwards.
@SomMeri
Copy link
Member Author

SomMeri commented Feb 24, 2015

Travis is failing, but other less.js pull requests are failing on the same error.

@lukeapage
Copy link
Member

Please could you merge latest? then builds should pass...

@lukeapage
Copy link
Member

great work though, thanks, will be a nice feature

@SomMeri
Copy link
Member Author

SomMeri commented Feb 26, 2015

I merged it and build is passing. You are welcome ;)

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.

2 participants