mirror of
https://github.com/dillonzq/LoveIt.git
synced 2025-03-24 23:57:31 +01:00
feat: refactor css style and rm useless style
This commit is contained in:
parent
aa834e89af
commit
de88a28db7
13 changed files with 55 additions and 43 deletions
|
@ -1,9 +1,9 @@
|
|||
html {
|
||||
font-family: $global-font-family;
|
||||
font-weight: $global-font-weight;
|
||||
font-family: var(--global-font-family);
|
||||
font-weight: var(--global-font-weight);
|
||||
font-display: swap;
|
||||
font-size: $global-font-size;
|
||||
line-height: $global-line-height;
|
||||
font-size: var(--global-font-size);
|
||||
line-height: var(--global-line-height);
|
||||
width:100%;
|
||||
|
||||
scroll-behavior: smooth;
|
||||
|
@ -47,15 +47,11 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
@include ms;
|
||||
@include link(true, true);
|
||||
|
||||
@import "../_partial/mask";
|
||||
@import "../_partial/img";
|
||||
@import "../_partial/icon";
|
||||
@import "../_partial/details";
|
||||
@import "../_partial/fixed-button";
|
||||
@import "../_partial/cookieconsent";
|
||||
|
||||
img {
|
||||
@include object-fit(contain);
|
||||
}
|
||||
|
|
6
assets/css/_core/_variables.scss
Normal file
6
assets/css/_core/_variables.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
:root {
|
||||
--global-font-family: #{$global-font-family};
|
||||
--global-font-size: #{$global-font-size};
|
||||
--global-font-weight: #{$global-font-weight};
|
||||
--global-line-height: #{$global-line-height};
|
||||
}
|
|
@ -97,12 +97,6 @@
|
|||
line-break: $value;
|
||||
}
|
||||
|
||||
@mixin ms {
|
||||
input::-ms-clear {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin object-fit($value) {
|
||||
-o-object-fit: $value;
|
||||
object-fit: $value;
|
||||
|
|
|
@ -2,19 +2,35 @@
|
|||
a, a::before, a::after {
|
||||
text-decoration: none;
|
||||
|
||||
color: if($light, $global-link-color, $single-link-color);
|
||||
@if $light {
|
||||
color: $global-link-color;
|
||||
} @else {
|
||||
color: $single-link-color;
|
||||
}
|
||||
|
||||
[theme=dark] & {
|
||||
color: if($dark, $global-link-color-dark, $single-link-color-dark);
|
||||
@if $dark {
|
||||
color: $global-link-color-dark;
|
||||
} @else {
|
||||
color: $single-link-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
color: if($light, $global-link-hover-color, $single-link-hover-color);
|
||||
@if $light {
|
||||
color: $global-link-hover-color;
|
||||
} @else {
|
||||
color: $single-link-hover-color;
|
||||
}
|
||||
|
||||
[theme=dark] & {
|
||||
color: if($dark, $global-link-hover-color-dark, $single-link-hover-color-dark);
|
||||
@if $dark {
|
||||
color: $global-link-hover-color-dark;
|
||||
} @else {
|
||||
color: $single-link-hover-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,11 +100,10 @@
|
|||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@include object-fit(none);
|
||||
}
|
||||
|
||||
img.lazyloaded {
|
||||
@include object-fit(cover);
|
||||
&.lazyloaded {
|
||||
@include object-fit(cover);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
|
|
@ -237,14 +237,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.lazyload, .lazyloading {
|
||||
@include object-fit(scale-down);
|
||||
}
|
||||
|
||||
.lazyloaded {
|
||||
@include object-fit(fill);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
display: block;
|
||||
border-left: .5rem solid $blockquote-color;
|
||||
|
@ -330,10 +322,10 @@
|
|||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
--ti-cursor-font-family: $global-font-family;
|
||||
--ti-cursor-font-size: $global-font-size;
|
||||
--ti-cursor-font-weight: $global-font-weight;
|
||||
--ti-cursor-line-height: $global-line-height;
|
||||
--ti-cursor-font-family: var(--global-font-family);
|
||||
--ti-cursor-font-size: var(--global-font-size);
|
||||
--ti-cursor-font-weight: var(--global-font-weight);
|
||||
--ti-cursor-line-height: var(--global-line-height);
|
||||
--ti-cursor-color: $global-font-secondary-color;
|
||||
--ti-cursor-margin-left: 0;
|
||||
|
||||
|
|
9
assets/css/_partial/_img.scss
Normal file
9
assets/css/_partial/_img.scss
Normal file
|
@ -0,0 +1,9 @@
|
|||
img {
|
||||
&.lazyload, &.lazyloading {
|
||||
@include object-fit(scale-down);
|
||||
}
|
||||
|
||||
&.lazyloaded {
|
||||
@include object-fit(contain);
|
||||
}
|
||||
}
|
|
@ -67,7 +67,7 @@ code, pre, .highlight table, .highlight tr, .highlight td {
|
|||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
font-family: $global-font-family;
|
||||
font-family: var(--global-font-family);
|
||||
font-weight: bold;
|
||||
color: $code-info-color;
|
||||
background: darken($code-background-color, 8%);
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
@charset "utf-8";
|
||||
|
||||
@import "../lib/normalize/normalize";
|
||||
|
||||
@import "_variables";
|
||||
@import "_override";
|
||||
@import "_core/variables";
|
||||
|
||||
@import "_mixin/index";
|
||||
|
||||
@import "../lib/normalize/normalize";
|
||||
|
||||
@import "_core/base";
|
||||
@import "_core/layout";
|
||||
|
||||
@import "_page/index";
|
||||
|
||||
@import "_partial/header";
|
||||
@import "_partial/footer";
|
||||
@import "_partial/pagination";
|
||||
|
||||
@import "_core/header";
|
||||
@import "_core/footer";
|
||||
@import "_core/pagination";
|
||||
@import "_core/media";
|
||||
|
||||
@import "_custom";
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue