Skip to content

Can we have this new addition in less or do we already have such things... #1679

Closed
@mohammedzamakhan

Description

@mohammedzamakhan

Addition to LessJS
Lets use $buttons as an example. Its primarily $modules
$buttons{
#btn
}
.btn{
}
$button-sml{
}
$button-med{
}
$button-lar{
}
}
How it all works!?
When ever it finds "$buttons{}" block in the code, it ignores the whole block, if it is not explicitly called.
if we import $buttons, we can use any syntax to import for example:
module $buttons;
It gets all the content of the block as well as the sub block contents. In our example code, #btn,.btn as well as sub-modules $button-sml, $button-med, $button-lar.
if we import sub module in our code, like:
module $buttons.$button-sml;
It gets al the content of the block i.e. #btn, .btn and also only $buttons.$button-sml block content

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions