Nesting a text inside a tag in slim
Asked Answered
J

2

9

How do I nest the 'Featured' text inside the a tag, given the span, the text, and the other span are siblings?

li
  a href="#" class="selected"
    span class="icon-before"
    Featured
    span class="icon-after"
Jennefer answered 22/11, 2012 at 14:21 Comment(0)
U
13
li
  a href="#" class="selected"
    span class="icon-before"
    | Featured
    span class="icon-after"

Gives:

<li><a class="selected" href="#"><span class="icon-before"></span>Featured<span class="icon-after"></span></a></li>
Unhallowed answered 22/11, 2012 at 14:48 Comment(0)
T
0
ul
  li
    | first text
    span.color-red.bold-g
     | (text transform)

Give :

<ul><li>first text<span class="color-red bold-g">(text transform)</span></li>
Thyroxine answered 3/10, 2016 at 15:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.