vtst / ow

Various Eclipse plugins for web development

Home Page:http://www.normalesup.org/~simonet/soft/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LESS: extend mixin

mindrones opened this issue · comments

Eclipse Juno - LESS plugin v. 1.0.19

Mixins using extend are marked as invalid.

In this screenshot the line 684 (covered by the popup) is "&:extend(.clearfix all);"
screen shot 2014-02-14 at 1 42 21 am

Also, if you import a A.less into B.less, if for example .foo is the first class of A.less containing an &:extend() (and .foo being marked as invalid), then all the elements which are placed after .foo aren't imported into B.less: hence in B.less you see them as errors.

For example in bootstrap, in mixins.less the first error is at

.container-fixed() {
  margin-right: auto;
  margin-left: auto;
  padding-left:  (@grid-gutter-width / 2);
  padding-right: (@grid-gutter-width / 2);
  &:extend(.clearfix all);  // => first extend marked as error
}
.make-row(@gutter: @grid-gutter-width) {
...
}

==> Then, if we import bootstrap/mixins.less somewhere, .make-row won't be seen as a valid mixin, because it is placed after a validation error.

Also, the outline shows content that comes after an extend as a child of the element containing the extend.

See the picture:

screen shot 2014-02-14 at 2 03 11 am

The above fix is for #195