0

my less extend is not working and i dont know why here are some snippets from my files!

Here from the global.less:

// Global Modifier
.is--rounded { .border-radius(); }

.is--block { display: block !important; }
.is--inline { display: inline !important; }
.is--inline-block { display: inline-block !important; }
.is--hidden { display: none !important; }
.is--invisible { visibility: hidden !important; }

And this from the header.less works

.header-gray {
    .shop--navigation {
        &:extend(.is--hidden);
    }
}

this from the same header.less but didn't work

@media screen and (min-width: 480px) {
    .header-gray {
        .shop--navigation {
            &:extend(.is--block);
        }
    }
}

Is there a syntax error ? or wheres the problem?

Artij
  • 11

1 Answers1

0

From LESS documentation: "Extend written inside a media declaration should match only selectors inside the same media declaration"

Because your second example is wrapped in a media query, the .is--block declaration needs to match

James King
  • 1,897
  • 11
  • 16