mom-ui
Version:
UI framework with vue3 and TS
309 lines (303 loc) • 5.27 kB
CSS
.m-button {
border: 1px solid #000;
font-size: 14px;
border-radius: 5px;
text-align: center;
white-space: nowrap;
cursor: pointer;
padding: 0 10px;
border: none;
display: inline-block;
vertical-align: middle;
}
.m-button:focus {
border: none;
outline: none;
}
.m-button:hover {
opacity: 0.8;
box-shadow: 0 0 2px #bbb;
}
.m-button.normal {
min-width: 90px;
height: 40px;
line-height: 40px;
}
.m-button.disabled {
cursor: not-allowed;
}
.m-button.loading {
display: inline-flex;
align-items: center;
justify-content: center;
}
@keyframes myPin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.m-button.loading svg.icon {
display: inline-block;
vertical-align: top;
flex: 0 0 1em;
width: 1em;
height: 1em;
margin-right: 5px;
border-radius: 50%;
animation: myPin 1.5s linear infinite;
}
.m-button.big {
min-width: 162px;
height: 50px;
line-height: 50px;
}
.m-button.small {
min-width: 72px;
height: 30px;
line-height: 30px;
}
.m-button.default {
background-color: #fff;
color: #444;
margin: 1px;
border: 1px solid #ddd;
}
.m-button.primary {
background-color: #108ee9;
color: #fff;
border: 1px solid #108ee9;
}
.m-button.ghost {
background-color: #fff;
color: #108ee9;
border: 1px solid #108ee9;
}
.m-button.warning {
background-color: #e94f4f;
color: #fff;
border: 1px solid #e94f4f;
}
.m-button.noBorder {
border: none;
}
.m-button.noBorder:hover {
opacity: 0.8;
box-shadow: none;
}
.m-button + .m-button {
margin-left: 1em;
}
.m-input {
box-sizing: border-box;
-webkit-box-sizing: border-box;
position: relative;
display: inline-flex;
width: 100%;
border: 1px solid #d9d9d9;
align-items: center;
}
.m-input-disabled * {
cursor: not-allowed;
}
.m-input > .m-input-prefix {
display: inline-block;
padding-left: 8px;
}
.m-input > .m-input-prefix + input {
padding-left: 8px;
}
.m-input > .m-input-suffix {
display: inline-block;
padding-right: 8px;
}
.m-input-focused {
border-color: #108ee9;
-webkit-box-shadow: 0 0 3px #108ee9;
box-shadow: 0 0 3px #108ee9;
}
.m-input:hover {
border-color: #108ee9;
}
.m-input input {
padding: 5px 10px;
margin: 0;
display: inline-block;
min-width: 50%;
flex: 1;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
line-height: 1.5;
background-color: #fff;
border-radius: 2px;
outline: none;
border: none;
}
.m-input input::-moz-placeholder {
opacity: 1;
}
.m-input input::-webkit-input-placeholder {
color: #bfbfbf;
}
.m-input input:-ms-input-placeholder {
color: #bfbfbf;
}
.m-input input::-ms-input-placeholder {
color: #bfbfbf;
}
.m-input input::placeholder {
color: #bfbfbf;
}
.m-input + .m-input {
margin-top: 1em;
}
.m-input-big {
font-size: 16px;
}
.m-input-big input {
height: 44px;
font-size: inherit;
}
.m-input-middle {
font-size: 14px;
}
.m-input-middle input {
height: 32px;
font-size: inherit;
}
.m-input-small {
font-size: 12px;
}
.m-input-small input {
height: 24px;
font-size: inherit;
}
.m-switch {
width: 40px;
padding: 1px;
border-radius: 20px;
background-color: #fff;
box-shadow: 0 0 2px #333;
margin: 2px;
transition: all 0.3s;
}
.m-switch .inner {
width: 20px;
height: 20px;
border-radius: 20px;
background-color: #fff;
box-shadow: 1px 1px 2px 0 #333;
transform: translateX(0);
transition: all 0.3s;
}
.m-switch.checked {
background-color: #4dd865;
}
.m-switch.checked .inner {
transform: translateX(18px);
box-shadow: 0px 0px 2px #333;
}
.c-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.c-modal main {
background-color: #fff;
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 3px;
padding: 20px 30px;
}
.c-modal main h3 {
font-weight: 500;
font-size: 1.1em;
margin: 0;
}
.c-modal main p {
padding: 20px 0px;
min-width: 20em;
max-height: 4em;
font-size: 0.9em;
color: #333;
}
.c-modal main section.action {
text-align: right;
}
.c-modal .c-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
}
.m-tabs ul.m-tabs-tag {
position: relative;
vertical-align: top;
border-bottom: 1px solid #ddd;
margin: auto;
padding: 0;
}
.m-tabs ul.m-tabs-tag li {
margin-top: 0;
display: inline-block;
padding: 4px;
}
.m-tabs ul.m-tabs-tag li + li {
margin-left: 20px;
}
.m-tabs ul.m-tabs-tag li.selected {
color: #108ee9;
}
.m-tabs ul.m-tabs-tag li.m-tabs-tag-indicator {
position: absolute;
bottom: -1px;
left: 0;
height: 2px;
border: none;
margin: 0;
padding: 0;
width: 30px;
background: #108ee9;
transition: left 250ms;
}
.m-tabs .container {
padding: 10px 4px;
min-height: 50px;
}
.m-back-top {
background-color: #8d8d8d;
display: inline-block;
line-height: 2em;
padding: 0 0.5em;
border-radius: 50%;
position: fixed;
bottom: 50px;
right: 50px;
}
.m-back-top .m-icon > svg {
fill: #fff;
}
.m-back-top:hover {
background-color: #272727;
}
.m-icon {
display: inline-block;
}
.m-icon + .m-icon {
margin-left: 1em;
}
.m-icon .icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}