Menu

Showing posts with label SCSS. Show all posts
Showing posts with label SCSS. Show all posts

How to declare two classes for element with SCSS?

Below is an example of SCSS code using that we are generating two classes that are being use for the same html element.

SCSS code

.image-text {
@media(max-width:600px){
        &--celebrate-page .image-text {
            &__htext.image-text__htext {
                
                &--v {
                    &-center {
                        margin-top: -20%;
                    }
                }
            }
        }
    }
}


Result in CSS

@media (max-width: 600px) {
	 .image-text--celebrate-page .image-text__htext.image-text__htext--v-center {
		 margin-top: -20%;
	}
}