words

Remove LESS-only declarations from compiled CSSCsak belső LESS include-hoz használt deklarációk elrejtése a kimeneti CSS-ből

Your LESS shortcut declaration won’t appear in the compiled CSS file as long as you attach a fake “declaration-variable” parenthesis to it.

// This will be in the CSS output, but I use it only inside other declarations. That's wrong.
.removeMP{
padding:0;margin:0;
}

// This wont show up in the output, but provides the same functionality.
.removeMP(){
padding:0;margin:0;
}

LESS snippeteidet — amiket csak arra használsz, hogy más deklarációkban szerepeljen — elrejtheted a kimeneti CSS-ből (pl.: lessPHP fordító) a következő módon:

// Ez a deklaráció bele fog kerülni a CSS-edbe
.removeMP{
padding:0;margin:0;
}

// Ezt csak a LESS fogja feldolgozni és használni, ahol kéred más deklarációk során, viszont nem jelenik meg a CSS kimeneti fájlban
.removeMP(){
padding:0;margin:0;
}

Last updated: