Answer the question
In order to leave comments, you need to log in
How to remove the last element in sass?
How to remove the last element using sass here is the code, everything seems to be correct but last-child doesn't work...
.menu__item
margin-left: 90px
position: relative
&:after
content: "\\\\"
display: block
position: absolute
top: 0
left: 100%
padding-left: 38px
color: $color_white
font-size: 17px
font-weight: 600
&:last-child
display: none
Answer the question
In order to leave comments, you need to log in
Layout in the studio, but I think that your block is not the last one ... something like this ... The button will be the last element, but it is different in class:
<div class="menu">
<div class="menu__item"></div>
<div class="menu__item"></div>
<div class="menu__item"></div>
<div class="menu__item"></div>
<div class="menu__item"></div>
<div class="menu__item"></div>
<div class="menu__button"></div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question