<ul class="about_butt_list"> <li class="about_butt_item"><a href="#" class="about_butt blue_mod"></a></li> <li class="about_butt_item"><a href="#" class="about_butt red_mod"></a></li> <li class="about_butt_item"><a href="#" class="about_butt yellow_mod"></a></li> </ul>
.about_butt { display: block; height:50px; line-height: 50px; text-align: center; font-family: 'intro'; font-size: 12px; }
.about_butt { display: block; height: 50px; line-height: 50px; text-align: center; font-family: 'intro'; font-size: 12px; &.blue_mod { background: $blue_1; color: $white; transition: background .3s ease; &:hover, &:focus { text-decoration: none; } &:hover { background: lighten($blue_1, 5%); } } &.red_mod { background: $red_1; color: $white; transition: background .3s ease; &:hover, &:focus { text-decoration: none; } &:hover { background: lighten($red_2, 5%); } } &.yellow_mod { background: $yellow_1; color: $white; transition: background .3s ease; &:hover, &:focus { text-decoration: none; } } }
.news_more_butt { display: block; height:50px; line-height: 50px; text-align: center; font-family: 'intro'; font-size: 12px; }
.news_more_butt { color:$black_2; background: transparent; box-shadow:inset 0 0 0 2rem $gray_4; transition:all .3s ease; &:hover,&:focus { text-decoration: none; } &:hover { background: $gray_4; color:$white; } }
.news_more_butt { width: 186px; margin: 20px auto; }
%butt_size_1 { display: block; height:50px; line-height: 50px; text-align: center; font-family: 'intro'; font-size: 12px; } %butt_size_2 { display: block; height:70px; line-height: 70px; text-align: center; font-family: 'intro'; font-size: 16px; }
%butt_gray_1 { color: $black_2; background: transparent; box-shadow: inset 0 0 0 2rem $gray_4; transition: all .3s ease; &:hover, &:focus { text-decoration: none; } &:hover { background: $gray_4; color: $white; } } %butt_blue_1 { background: $blue_1; color: $white; transition: all .3s ease; &:hover, &:focus { text-decoration: none; } &:hover { background: lighten($blue_1, 5%); } } %butt_red_1 { background: $red_2; color: $white; transition: all .3s ease; &:hover, &:focus { text-decoration: none; } &:hover { background: lighten($red_2, 5%); } } %butt_yellow_1 { background: $yellow_1; color: $white; transition: all .3s ease; &:hover, &:focus { text-decoration: none; } &:hover { background: lighten($yellow_1, 5%); } } %butt_green_1 { background: $green_1; color: $white; transition: all .3s ease; &:hover, &:focus { text-decoration: none; } &:hover { background: lighten($green_1, 5%); } }
.about_butt { @extend %butt_size_1; &.blue_mod { @extend %butt_blue_1; } &.red_mod { @extend %butt_red_1; } &.yellow_mod { @extend %butt_yellow_1; } } .news_more_butt { @extend %butt_size_1; @extend %butt_gray_1; width: 186px; margin: 20px auto; } .show_news_butt { @extend %butt_size_2; @extend %butt_gray_1; display: inline-block; }
Source: https://habr.com/ru/post/271311/
All Articles