The nested class in CSS
.wrapper .widecolumn {
width: 983px;
}
could be repersented in SCSS as
.wrapper {
.widecolumn {
width: 983px;
}
}
but how to represent this?:
.wrapper.widecolumn {
width: 983px;
}
The nested class in CSS
.wrapper .widecolumn {
width: 983px;
}
could be repersented in SCSS as
.wrapper {
.widecolumn {
width: 983px;
}
}
but how to represent this?:
.wrapper.widecolumn {
width: 983px;
}
wrapper.widecolumn {
width: 983px;
}
is fine (assuming here that wrapper is an example tag). If you're just concerned about nesting, use & like so:
wrapper {
&.widecolumn {
width: 983px;
}
}
The & represents the parent object, so you can also do clever things like
wrapper {
&.widecolumn {
width: 983px;
}
&:hover {
color: red;
}
body.mycoolclass & {
font-weight: bold;
}
}
You can do Also
.wrapper {
&__widecolumn {
width: 983px;
}
}
When you will do that then you can simply use This just like that :
<div class="wrapper__widecolumn">
<!-- This Column will be 983px -->
</div>