You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a thought (a bit offtopic maybe): Since namespaces and mixins are pure logical abstractions (at least for now) - maybe it would make more sense to use "parametric ruleset" and "non-parametric ruleset" terms instead? Simply because this is where the real difference is (and not in the # and . designation). I mean when it goes into technical/implementation details (not for the "end-user" documentation of course).
where something is a namespace if it is used as a namespace, not if it is defined like the above (in the same way .mixin { can be used like a mixin or a namespace or neither)
@lukeapage Thank you. I found parametrized namespace in a huge less I was send to. I expected it to fail in both less.js and less4j. Instead, both less.js and less4j compiled it the same way.
I agree that "not matching namespaces (e.g. mixins) with parameters" would be the best solution.
Activity
lukeapage commentedon Sep 10, 2013
I've never seen namespaces with parameters.. but yes
https://github.com/less/less.js/blob/master/lib/less/parser.js#L1074
it seems mixins can begin
#and actually your example also happens with mixins..
I think
is the solution.. but also probably low priority as it is making less more restrictive, not changing behaviour from one thing to another
seven-phases-max commentedon Sep 10, 2013
Just a thought (a bit offtopic maybe): Since namespaces and mixins are pure logical abstractions (at least for now) - maybe it would make more sense to use "parametric ruleset" and "non-parametric ruleset" terms instead? Simply because this is where the real difference is (and not in the
#and.designation). I mean when it goes into technical/implementation details (not for the "end-user" documentation of course).lukeapage commentedon Sep 10, 2013
I think they should just be described as
where something is a namespace if it is used as a namespace, not if it is defined like the above (in the same way
.mixin {can be used like a mixin or a namespace or neither)SomMeri commentedon Sep 10, 2013
@lukeapage Thank you. I found parametrized namespace in a huge less I was send to. I expected it to fail in both less.js and less4j. Instead, both less.js and less4j compiled it the same way.
I agree that "not matching namespaces (e.g. mixins) with parameters" would be the best solution.
SomMeri commentedon Jan 13, 2015
Closing, because this was already fixed.