LESS/CSS: Is it possible to wrap a class around the outside of another without HTML?

StackOverflow https://stackoverflow.com/questions/23368882

سؤال

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