feat: 替换sass版本,定义全局样式,实现简单的页面布局操作,比如颜色、边距、圆角等

This commit is contained in:
duanshuwen
2025-10-06 13:13:16 +08:00
parent e0f0e90635
commit c8e51e4975
108 changed files with 366 additions and 517 deletions

View File

@@ -1,7 +1,4 @@
@use "sass:color";
$button-color: #00a6ff;
$button-hover-color: color.scale($button-color, $lightness: -16%);
.goods-container {
display: flex;
@@ -37,8 +34,8 @@ $button-hover-color: color.scale($button-color, $lightness: -16%);
flex-shrink: 0;
.module-title {
font-size: 14px;
color: #333;
font-size: $uni-font-size-base;
color: $uni-text-color;
text-align: center;
word-wrap: break-word;
margin-left: 4px;
@@ -47,7 +44,7 @@ $button-hover-color: color.scale($button-color, $lightness: -16%);
.module-desc {
flex: 1;
font-size: 12px;
font-size: $uni-font-size-sm;
color: #666;
line-height: 1.5;
margin-top: 4px;
@@ -94,8 +91,8 @@ $button-hover-color: color.scale($button-color, $lightness: -16%);
}
.label {
font-size: 14px;
color: #333;
font-size: $uni-font-size-base;
color: $uni-text-color;
}
.price {
@@ -106,7 +103,7 @@ $button-hover-color: color.scale($button-color, $lightness: -16%);
&::before {
content: "¥";
font-size: 12px;
font-size: $uni-font-size-sm;
}
}
@@ -121,51 +118,12 @@ $button-hover-color: color.scale($button-color, $lightness: -16%);
justify-content: center;
border-radius: 50px;
height: 42px;
font-size: 14px;
font-size: $uni-font-size-base;
font-weight: 500;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
letter-spacing: 0.5px;
margin-left: auto;
// 按钮波纹效果
&::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background: rgba(255, 255, 255, 0.3);
border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 0.6s, height 0.6s;
}
&:hover {
background: linear-gradient(
135deg,
$button-hover-color 0%,
color.scale($button-hover-color, $lightness: -11.9%) 100%
);
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba($button-color, 0.4);
&::before {
width: 300px;
height: 300px;
}
}
&:active {
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba($button-color, 0.3);
}
&:focus {
outline: none;
box-shadow: 0 0 0 3px rgba($button-color, 0.3);
}
}
}