M
M
mcrack2019-04-13 12:37:46
Sass
mcrack, 2019-04-13 12:37:46

SASS how to write code correctly?

Hello, please tell me how to correctly write the following codes in SASS?
*******************************
1) I would like to glue input and class in this way

.block
    input.block__element

For some reason, the option with the following view does not work:
.block
    input&__element

*****************************************
2) How to reach the parent block element, if you are in a child?
I understand that you can move it to the left, but there are cases when you need to put it this way and I would like the .block name to be hooked to element2
.block
    &__element1
        .block__element2

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question