From 251d2411f235e23209d57173857e05b637729ce8 Mon Sep 17 00:00:00 2001 From: LiuHao <liuhaoai545@gmail.com> Date: 星期日, 02 四月 2023 01:01:56 +0800 Subject: [PATCH] refactor ts --- src/assets/styles/mixin.scss | 92 +++++++++++++++++++++------------------------ 1 files changed, 43 insertions(+), 49 deletions(-) diff --git a/src/assets/styles/mixin.scss b/src/assets/styles/mixin.scss index 06fa061..b5e121c 100644 --- a/src/assets/styles/mixin.scss +++ b/src/assets/styles/mixin.scss @@ -1,66 +1,60 @@ @mixin clearfix { - &:after { - content: ""; - display: table; - clear: both; - } + &:after { + content: ''; + display: table; + clear: both; + } } @mixin scrollBar { - &::-webkit-scrollbar-track-piece { - background: #d3dce6; - } + &::-webkit-scrollbar-track-piece { + background: #d3dce6; + } - &::-webkit-scrollbar { - width: 6px; - } + &::-webkit-scrollbar { + width: 6px; + } - &::-webkit-scrollbar-thumb { - background: #99a9bf; - border-radius: 20px; - } + &::-webkit-scrollbar-thumb { + background: #99a9bf; + border-radius: 20px; + } } @mixin relative { - position: relative; - width: 100%; - height: 100%; + position: relative; + width: 100%; + height: 100%; } @mixin pct($pct) { - width: #{$pct}; - position: relative; - margin: 0 auto; + width: #{$pct}; + position: relative; + margin: 0 auto; } @mixin triangle($width, $height, $color, $direction) { - $width: $width/2; - $color-border-style: $height solid $color; - $transparent-border-style: $width solid transparent; - height: 0; - width: 0; + $width: $width/2; + $color-border-style: $height solid $color; + $transparent-border-style: $width solid transparent; + height: 0; + width: 0; - @if $direction==up { - border-bottom: $color-border-style; - border-left: $transparent-border-style; - border-right: $transparent-border-style; - } - - @else if $direction==right { - border-left: $color-border-style; - border-top: $transparent-border-style; - border-bottom: $transparent-border-style; - } - - @else if $direction==down { - border-top: $color-border-style; - border-left: $transparent-border-style; - border-right: $transparent-border-style; - } - - @else if $direction==left { - border-right: $color-border-style; - border-top: $transparent-border-style; - border-bottom: $transparent-border-style; - } + @if $direction==up { + border-bottom: $color-border-style; + border-left: $transparent-border-style; + border-right: $transparent-border-style; + } @else if $direction==right { + border-left: $color-border-style; + border-top: $transparent-border-style; + border-bottom: $transparent-border-style; + } @else if $direction==down { + border-top: $color-border-style; + border-left: $transparent-border-style; + border-right: $transparent-border-style; + } @else if $direction==left { + border-right: $color-border-style; + border-top: $transparent-border-style; + border-bottom: $transparent-border-style; + } } -- Gitblit v1.9.3