init project
This commit is contained in:
201
src/assets/style/common4web.less
Normal file
201
src/assets/style/common4web.less
Normal file
@@ -0,0 +1,201 @@
|
||||
@import url(~/assets/style/variable);
|
||||
|
||||
*::-webkit-scrollbar {
|
||||
width: 10px !important;
|
||||
height: 10px !important;
|
||||
cursor: var(--tui-cur-default);
|
||||
background: #CFD2E0;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-corner {
|
||||
background: #CFD2E0;
|
||||
cursor: var(--tui-cur-default);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb {
|
||||
cursor: var(--tui-cur-default);
|
||||
background: #525870;
|
||||
}
|
||||
|
||||
*::selection {
|
||||
color: #FFF;
|
||||
background: #525870 !important;
|
||||
}
|
||||
|
||||
html {
|
||||
cursor: var(--tui-cur-default);
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100% !important;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow-x: hidden !important;
|
||||
overflow-y: scroll !important;
|
||||
font-family: var(--tui-font);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#root {
|
||||
display: flex;
|
||||
position: relative;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: @tuiColors[blue];
|
||||
cursor: var(--tui-cur-pointer);
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
a.underline {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
input, select, textarea {
|
||||
resize: none;
|
||||
outline: none;
|
||||
display: block;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
label,
|
||||
select,
|
||||
input[type="radio"],
|
||||
input[type="file"],
|
||||
input[type="checkbox"] {
|
||||
cursor: var(--tui-cur-default);
|
||||
}
|
||||
|
||||
textarea,
|
||||
input[type="text"],
|
||||
input[type="date"],
|
||||
input[type="email"],
|
||||
input[type="password"] {
|
||||
cursor: var(--tui-cur-text);
|
||||
-webkit-appearance: none;
|
||||
|
||||
&:-webkit-autofill,
|
||||
&:-webkit-autofill:hover,
|
||||
&:-webkit-autofill:focus,
|
||||
&:-webkit-autofill:active {
|
||||
-webkit-background-clip: text;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
tab-size: 4;
|
||||
font-family: var(--tui-font);
|
||||
}
|
||||
|
||||
.gray-filter {
|
||||
filter: grayscale(1);
|
||||
-webkit-filter: grayscale(1);
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.italic {
|
||||
font-style: italic !important;
|
||||
}
|
||||
|
||||
.delete {
|
||||
text-decoration: line-through !important;
|
||||
}
|
||||
|
||||
.underline {
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
.not-underline {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.not-underline:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
/* 文本适当对齐 */
|
||||
.justify-text {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/* 模糊玻璃效果:白色 */
|
||||
.glass-white {
|
||||
color: var(--eui-black, #000);
|
||||
background: rgba(255, 255, 255, .8);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
/* 模糊玻璃效果:黑色 */
|
||||
.glass-black {
|
||||
color: var(--eui-white, #FFF);
|
||||
background: rgba(0, 0, 0, .8);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.word-space {
|
||||
display: inline-block;
|
||||
margin: 0 .5rem;
|
||||
}
|
||||
|
||||
/* 强制换行 */
|
||||
.break-all,
|
||||
.break-all textarea {
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
/* 文本溢出截断 */
|
||||
.clip-text {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* 禁止选择 */
|
||||
.diselect {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.selectable {
|
||||
-webkit-touch-callout: default;
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.ir-default,
|
||||
.ir-pixelated {
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
.ir-auto {
|
||||
image-rendering: auto;
|
||||
}
|
||||
|
||||
.ir-smooth {
|
||||
image-rendering: smooth;
|
||||
}
|
||||
44
src/assets/style/variable.less
Normal file
44
src/assets/style/variable.less
Normal file
@@ -0,0 +1,44 @@
|
||||
@tuiColors: {
|
||||
red: #F33;
|
||||
pink: #FF7A9B;
|
||||
black: #111;
|
||||
blue: #006EFF;
|
||||
light-blue: #00A6FF;
|
||||
green: GREEN;
|
||||
orange: #E7913B;
|
||||
gray: #666;
|
||||
light-gray: #AAA;
|
||||
white: #FFF;
|
||||
dark-white: #E7EAEF;
|
||||
yellow: #FF0;
|
||||
purple: PURPLE;
|
||||
transparent: transparent;
|
||||
}
|
||||
|
||||
:root {
|
||||
--tui-font: PingFang SC, Microsoft YaHei, Arial Regular;
|
||||
|
||||
--tui-shadow: 3px 3px 12px var(--tui-shadow-color);
|
||||
--tui-bezier: cubic-bezier(.19, .1, .22, 1);
|
||||
--tui-shadow-color: rgba(0, 0, 0, .2);
|
||||
|
||||
each(@tuiColors, {
|
||||
--tui-@{key}: @value;
|
||||
});
|
||||
--tui-border: 1px solid var(--tui-light-gray);
|
||||
--tui-page-padding: .5rem 1rem;
|
||||
}
|
||||
|
||||
// 字体颜色
|
||||
each(@tuiColors, {
|
||||
.@{key} {
|
||||
color: @value;
|
||||
}
|
||||
});
|
||||
|
||||
// 背景颜色
|
||||
each(@tuiColors, {
|
||||
.bg-@{key} {
|
||||
background: @value;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user