If my HTML looks like this:

<div class="purely-aesthetic-wrapper">
    <section>
        …
    </section>
</div>

…is it possible to omit the outside div from the HTML and do something like this (with LESS):

section {
           enclose-with(.purely-aesthetic-wrapper);
         }

Sorry if it's an obvious question but I'm not having much luck finding the answer.

有帮助吗?

解决方案

Short answer is no, it's not possible.

LESS is css pre-processor and it has nothing to do with HTML/DOM-tree

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top