A
A
alexfrolov_xcx2017-06-06 00:10:31
css
alexfrolov_xcx, 2017-06-06 00:10:31

SASS doesn't compile when path is in @extend .selector ul li ... How to fix?

Good day to all! Essence of the question:
I want to inherit class properties through @extend....
When: .info__line__navigation
display: inline-block
.social_media ul li
@extend .info__line__navigation
everything happens fine, but when I add the path from ul li to @extend , an error occurs:
.info__line__navigation ul li
display: inline-block
.social_media ul li
@extend .info__line__navigation ul li
6ebbadb84d9144cfbe584f999efca3e4.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Elwen, 2017-06-06
@alexfrolov_xcx

Sass cannot extend legacy styles.
You can take out common styles in a placeholder (or mixin) and extend it to both elements:

%li_style
  display: inline-block
.info__line__navigation ul li
  @extend %li_style
.social_media ul li
  @extend %li_style

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question