1 Star 3 Fork 2

CastleCloud / Castlestudy-uniapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
uni.scss 7.45 KB
一键复制 编辑 原始数据 按行查看 历史
孙余伟 提交于 2023-09-25 13:57 . 首次提交
@import "uview-ui/theme.scss";
@import "./package/style/index.scss";
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.u-swipe-action-item__content {
position: relative;
z-index: 2;
}
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color: #333; //基本色
$uni-text-color-inverse: #fff; //反色
$uni-text-color-grey: #999; //辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable: #c0c0c0;
/* 背景颜色 */
$uni-bg-color: #ffffff;
$uni-bg-color-grey: #f8f8f8;
$uni-bg-color-hover: #f1f1f1; //点击状态颜色
$uni-bg-color-mask: rgba(0, 0, 0, 0.4); //遮罩颜色
/* 边框颜色 */
$uni-border-color: #c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm: 12px;
$uni-font-size-base: 14px;
$uni-font-size-lg: 16;
/* 图片尺寸 */
$uni-img-size-sm: 20px;
$uni-img-size-base: 26px;
$uni-img-size-lg: 40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2c405a; // 文章标题颜色
$uni-font-size-title: 20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle: 26px;
$uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 15px;
$color: #ffad01;
$scolor: #ff800f;
$primary: #0195ff;
$danger: #fc5859;
$gutter: 30rpx;
page,
html,
body {
max-width: 750px;
margin: auto;
color: $text-dark-color;
}
html {
width: 100%;
}
* {
box-sizing: border-box;
}
.padding {
padding-left: $gutter;
padding-right: $gutter;
}
.margin {
margin-left: $gutter;
margin-right: $gutter;
}
.button {
background: $color;
color: #fff;
display: block;
@extend .shadow;
display: flex;
justify-content: center;
align-items: center;
&.border {
border: 1px solid #aaaaaa;
background: transparent;
}
&.disabled {
background: #adadac !important;
}
~ .button {
margin-left: 10rpx;
}
&.radius {
@extend .radius;
}
&.default {
border: 1px solid #dcdcdc;
color: #5c5c5c;
background: #fff;
}
}
.page-button {
@extend .button;
position: fixed;
z-index: 9;
right: 0;
left: 0;
bottom: 150rpx;
margin: auto;
width: 460rpx;
height: 90rpx;
line-height: 90rpx;
border-radius: 10rpx;
}
.relative {
position: relative;
bottom: initial;
top: initial;
z-index: 2;
}
.radius {
border-radius: 10000px;
}
.color {
color: $color !important;
&.bg {
background: $color !important;
color: #fff !important;
}
}
.scolor {
color: $scolor !important;
&.bg {
background: $scolor !important;
color: #fff !important;
}
}
.primary {
color: $primary !important;
&.bg {
background: $primary !important;
color: #fff !important;
}
}
.danger {
color: $danger !important;
&.bg {
background: $danger !important;
color: #fff !important;
}
}
.fff {
color: #fff !important;
&.bg {
background: #fff !important;
}
}
.page-card {
background: #fff;
border-radius: 20rpx;
@extend .shadow;
width: 94.66%;
margin: auto;
margin-top: 20rpx;
box-sizing: border-box;
&.no-margin {
margin-top: 0;
}
&.margin {
width: 690rpx;
}
}
.shadow {
box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
}
.no-shadow {
box-shadow: none !important;
}
.under-line {
text-decoration: underline !important;
}
.safe-area-bottom {
box-sizing: content-box;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.form-item {
--height: 76rpx;
display: flex;
justify-content: space-between;
align-items: center;
width: 86%;
height: var(--height);
margin: auto;
border-bottom: 1px solid #f2e9e9;
box-sizing: border-box;
&.no-border {
border-bottom: 0;
}
&.required {
.label {
&::before {
content: "*";
font-size: 90%;
display: inline-block;
vertical-align: middle;
line-height: 1;
margin-right: 5rpx;
color: #f00;
}
}
}
&.arrow {
.value {
display: flex;
justify-content: flex-end;
align-items: center;
&:after {
content: "";
display: inline-block;
border-right: 1px solid #d2d4db;
border-bottom: 1px solid #d2d4db;
width: 16rpx;
height: 16rpx;
transform: rotate(-45deg);
margin-right: 7rpx;
margin-left: 7rpx;
}
}
}
&.no-inline {
display: block;
height: auto;
.label {
line-height: var(--height);
height: var(--height);
}
}
&.auto-height {
align-items: flex-start;
height: auto;
.label {
height: var(--height);
}
}
.label {
color: #333333;
.title {
font-size: 28rpx;
margin-bottom: 10rpx;
}
.subtitle {
color: #999;
font-size: 24rpx;
}
}
.value {
.input {
font-size: 24rpx;
text-align: right;
}
}
}
.radio {
width: 34rpx;
height: 34rpx;
border-radius: 50%;
border: 1px solid #d4d6dd;
margin-right: 23rpx;
position: relative;
&::before {
content: "";
position: absolute;
top: -5rpx;
left: 0;
right: 0;
bottom: 0;
margin: auto;
border-bottom: 4rpx solid #fff;
border-left: 4rpx solid #fff;
transform: rotate(-45deg);
width: 17rpx;
height: 8rpx;
opacity: 0;
}
&.active {
background: $color;
border: 1px solid $color;
&.primary {
background: $primary;
border: 1px solid $primary;
}
&::before {
opacity: 1;
}
}
}
.checkbox {
width: 34rpx;
height: 34rpx;
border-radius: 10rpx;
border: 1px solid #d4d6dd;
margin-right: 23rpx;
position: relative;
&::before {
content: "";
position: absolute;
top: -5rpx;
left: 0;
right: 0;
bottom: 0;
margin: auto;
border-bottom: 4rpx solid #fff;
border-left: 4rpx solid #fff;
transform: rotate(-45deg);
width: 17rpx;
height: 8rpx;
opacity: 0;
}
&.active {
background: $color;
border: 1px solid $color;
&.primary {
background: $primary;
border: 1px solid $primary;
}
&::before {
opacity: 1;
}
}
}
%arrow {
&::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
right: 0;
margin: auto;
border-right: 1px solid currentColor;
border-bottom: 1px solid currentColor;
width: 16rpx;
height: 16rpx;
}
}
.arrow-down {
@extend %arrow;
&::after {
transform: rotate(45deg);
}
}
.arrow-up {
@extend %arrow;
&::after {
transform: rotate(-135deg);
}
}
.arrow-left {
@extend %arrow;
&::after {
transform: rotate(135deg);
}
}
.arrow-right {
@extend %arrow;
&::after {
transform: rotate(-45deg);
}
}
.background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 440rpx;
z-index: 1;
background-image: linear-gradient(to bottom, #2cae38, #8cc31a);
border-radius: 0 0 30% 30%;
}
1
https://gitee.com/hcwdc/castlestudy-uniapp.git
git@gitee.com:hcwdc/castlestudy-uniapp.git
hcwdc
castlestudy-uniapp
Castlestudy-uniapp
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891