sass class with another class
.myclass {
font-weight: bold;
font-size: 90px;
}
.myotherclass {
@extend .myclass;
color: #000000;
}
sass class with another class
.myclass {
font-weight: bold;
font-size: 90px;
}
.myotherclass {
@extend .myclass;
color: #000000;
}
scss extend
.error:hover {
background-color: #fee;
}
.error--serious {
@extend .error;
border-width: 3px;
}
extend scss
%blue-hr {
content: '';
position: absolute;
height: 1px;
max-width: 1550px;
width: calc(100% - 1.5rem);
left: 0;
right: 0;
margin: 0 auto;
background-color: #0086FF;
}
.blue-hr-top {
position: relative;
&::before {
@extend %blue-hr;
top: 0;
}
}
Sass @extend and Inheritance
SCSS Syntax
.button-basic {
border: none;
padding: 15px 30px;
text-align: center;
font-size: 16px;
cursor: pointer;
}
.button-report {
@extend .button-basic;
background-color: red;
}
.button-submit {
@extend .button-basic;
background-color: green;
color: white;
}
CSS Output
.button-basic, .button-report, .button-submit {
border: none;
padding: 15px 30px;
text-align: center;
font-size: 16px;
cursor: pointer;
}
.button-report {
background-color: red;
}
.button-submit {
background-color: green;
color: white;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us