chayns-components
Version:
A set of beautiful React components for developing chayns® applications.
185 lines (183 loc) • 4.52 kB
CSS
.cc__opening_times .flex {
flex-flow: row wrap;
display: flex;
}
.cc__opening_times .flex .flex__left {
flex: 1;
padding: 3px 0 0;
}
.cc__opening_times .flex .flex__middle {
text-align: right;
display: flex;
}
.cc__opening_times .flex .flex__middle .inline__block {
display: inline-block;
}
.cc__opening_times .time__span {
margin-left: 30px;
width: 140px;
max-height: 29px;
display: flex;
transition-duration: 1500ms;
}
.cc__opening_times .time__span:nth-of-type(2):before {
content: "&";
position: absolute;
transform: translate(-20px, 1px);
}
.cc__opening_times .time__span span {
width: 30px;
text-align: center;
}
.cc__opening_times .time__span--input {
float: right;
width: 100px;
text-align: center;
}
.cc__opening_times .time__span--input input {
text-align: center;
width: 100%;
}
.cc__opening_times .time__span--button {
min-width: 25px;
}
.cc__opening_times .times {
margin: 5px 0;
transition: all 0.2s;
}
.cc__opening_times .times--disabled .flex__middle,
.cc__opening_times .times--disabled .flex__right {
opacity: 0.2;
pointer-events: none;
}
.cc__opening_times .times .flex__middle span {
float: right;
width: 30px;
text-align: center;
}
.cc__opening_times .times .flex__right {
width: 20px;
height: 20px;
padding: 1.5px 0 0 1px;
font-size: 11px;
margin: 4px 0 4px 3px;
align-self: flex-end;
}
.cc__opening_times .openingTimesIcon {
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
}
.cc__opening_times .openingTimesIcon.add {
transform: rotate(0deg);
}
.cc__opening_times .openingTimesIcon.remove {
transform: rotate(45deg);
}
.cc__opening_times .choosebutton {
min-height: 1px;
}
@media screen and (min-width: 491px) {
.chayns--desktop .cc__opening_times .times.multiple--animations .flex__middle .time__span:first-child {
animation: slideFromRight 300ms;
}
.chayns--desktop .cc__opening_times .times.multiple--animations .flex__middle .time__span:nth-child(2) {
animation: fadeInOpacity 300ms;
}
.chayns--desktop .cc__opening_times .times.multiple--animations .flex__middle .time__span:nth-child(2):before {
animation: fadeInOpacity 300ms;
}
.chayns--desktop .cc__opening_times .times.isRemoving .flex__middle .time__span:first-child {
animation: slideToRight 300ms;
}
.chayns--desktop .cc__opening_times .times.isRemoving .flex__middle .time__span:nth-child(2) {
animation: fadeOutOpacity 300ms;
}
.chayns--desktop .cc__opening_times .times.isRemoving .flex__middle .time__span:nth-child(2):before {
animation: fadeOutOpacity 300ms;
}
}
@media screen and (max-width: 490px) {
.cc__opening_times .flex__middle {
flex-direction: column;
}
.cc__opening_times .time__span:nth-of-type(2):before {
content: "";
}
.cc__opening_times .times.multiple .flex__middle .time__span:nth-child(2) {
animation: fadeInHeight 300ms;
}
.cc__opening_times .times.isRemoving .flex__middle .time__span:nth-child(2) {
animation: fadeOutHeight 300ms;
}
}
.chayns--mobile .cc__opening_times .flex__middle,
.cc__opening_times.cc__opening_times--force-mobile .flex__middle {
flex-direction: column;
}
.chayns--mobile .cc__opening_times .time__span:nth-of-type(2):before,
.cc__opening_times.cc__opening_times--force-mobile .time__span:nth-of-type(2):before {
content: "";
}
.chayns--mobile .cc__opening_times .times.multiple .flex__middle .time__span:nth-child(2),
.cc__opening_times.cc__opening_times--force-mobile .times.multiple .flex__middle .time__span:nth-child(2) {
animation: fadeInHeight 300ms;
}
.chayns--mobile .cc__opening_times .times.isRemoving .flex__middle .time__span:nth-child(2),
.cc__opening_times.cc__opening_times--force-mobile .times.isRemoving .flex__middle .time__span:nth-child(2) {
animation: fadeOutHeight 300ms;
}
@keyframes slideFromRight {
from {
transform: translateX(140px);
}
to {
transform: translateX(0);
}
}
@keyframes slideToRight {
from {
transform: translateX(0);
}
to {
transform: translateX(170px);
}
}
@keyframes fadeInOpacity {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeOutOpacity {
0% {
opacity: 1;
}
60% {
opacity: 0;
}
100% {
opacity: 0;
}
}
@keyframes fadeInHeight {
from {
height: 0;
overflow: hidden;
}
to {
height: 29px;
overflow: hidden;
}
}
@keyframes fadeOutHeight {
from {
max-height: 29px;
overflow: hidden;
}
to {
max-height: 0;
overflow: hidden;
}
}