I
I
Igor2018-09-06 22:51:06
HTML
Igor, 2018-09-06 22:51:06

How to multiply large blocks in Emmet taking into account internal components?

I would like to make a small block with numbering in data and id, for which I use $
And I want to multiply this piece by 20
Here is my piece

.cd-popup[role=alert][data-popup=#$]>.cd-popup-container>p{Are you sure you want to delete this element?}>^a.cd-popup-close.img-replace[href=#0]{Close}

That's what comes out
<div class="cd-popup" role="alert" data-popup="#1">
  <div class="cd-popup-container">
    <p>Are you sure you want to delete this element?</p>
    <a href="#0" class="cd-popup-close img-replace">Close</a>
  </div>
</div>

What happens when multiplied by 3
<div class="cd-popup" role="alert" data-popup="#1">
  <div class="cd-popup-container">
    <p>Are you sure you want to delete this element?</p>
    <a href="#0" class="cd-popup-close img-replace">Close</a>
    <a href="#0" class="cd-popup-close img-replace">Close</a>
    <a href="#0" class="cd-popup-close img-replace">Close</a>
  </div>
</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Loginov, 2018-09-06
@xandri

You can use group():

(.cd-popup[role=alert][data-popup=#$]>.cd-popup-container>p{Are you sure you want to delete this element?}>^a.cd-popup-close.img-replace[href=#0]{Close})*20

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question