// RESET
@import "reset";
// COMMON
@import "nav";
@import "section";
body {
margin: 0;
padding: 0;
box-sizing: border-box;
ul,
ol {
list-style: none;
}
}
.btn {
width: 100px;
height: 30px;
background-color: orange;
border-radius: 10px;
line-height: 30px;
&--small {
width: 50px;
}
&--large {
width: 200px;
}
&--red {
background-color: red;
}
}
&:hover {
background-color: orange;
}
&::after {
content: "!!";
}
.wrap {
&:hover {
.item {
transform: translateY(0px) rotateY(0deg);
opacity: 1;
}
}
$body-bg: #eee;
$wrap-border: #ddd;
$wrap__item: #fff;
$wrap__item_h2: #333;
$wrap__item_p: #777;
$btn-bg: orange;
$btn-font: white;
$wrap__item-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1);
body {
background-color: $body-bg;
}
@mixin button() {
display: block;
width: 100px;
height: 30px;
border-radius: 15px;
background-color: #555;
color: white;
text-align: center;
font: bold 16px/30px "arial";
margin: auto;
margin-top: 20px;
}
@import "mixin";
a {
@include button();
}
@mixin button($width: 100%, $bg-color: grey, $font-color: white) {
display: block;
width: $width;
height: 30px;
border-radius: 15px;
background-color: $bg-color;
color: $font-color;
text-align: center;
font: bold 16px/30px "arial";
margin: auto;
margin-top: 20px;
}
@import "mixin";
a {
@include button(100%, orange, black);
}
@import "mixin";
$btn-bg: #333;
a {
@include button($width: 100%, $bg-color: $btn-bg, $font-color: black);
}
@for $i from 1 to 5 {
&:nth-child(#{$i}) {
transition-delay: 0.2s * $i;
}
}
$interval: 0.2s;
@for $i from 1 through 5 {
&:nth-child(#{$i}) {
trasition-delay: $interval * $i;
}
}
$bgColors: (orange, hotpink, aqua, lightgreen);
@each $el in $bgColors {
$index: index($bgColors, $el);
&:nth-child(#{$index}) {
a {
@include button($bg-color: $el);
}
}
}
@if $wrap__item == #fff {
color: black;
} @else {
color: white;
}