🌐 AI搜索 & 代理 主页
Skip to content

Commit 76200ed

Browse files
z1m1nxanf
authored andcommitted
fix: replace sass division with multiplication
1 parent abaa1c5 commit 76200ed

File tree

5 files changed

+19
-42
lines changed

5 files changed

+19
-42
lines changed

src/_variables.scss

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ $b-custom-checkbox-indicator-border-radius-sm: $border-radius-sm !default;
3030
// Custom switch sizes
3131
$b-custom-switch-width-lg: $b-custom-control-indicator-size-lg * 1.75 !default;
3232
$b-custom-switch-width-sm: $b-custom-control-indicator-size-sm * 1.75 !default;
33-
$b-custom-switch-indicator-border-radius-lg: $b-custom-control-indicator-size-lg / 2 !default;
34-
$b-custom-switch-indicator-border-radius-sm: $b-custom-control-indicator-size-sm / 2 !default;
33+
$b-custom-switch-indicator-border-radius-lg: $b-custom-control-indicator-size-lg * 0.5 !default;
34+
$b-custom-switch-indicator-border-radius-sm: $b-custom-control-indicator-size-sm * 0.5 !default;
3535
$b-custom-switch-indicator-size-lg: calc(
3636
#{$b-custom-control-indicator-size-lg} - #{$custom-control-indicator-border-width * 4}
3737
) !default;
3838
$b-custom-switch-indicator-size-sm: calc(
3939
#{$b-custom-control-indicator-size-sm} - #{$custom-control-indicator-border-width * 4}
4040
) !default;
41-
4241
// Custom file sizes
4342
$b-custom-file-font-size-lg: $input-font-size-lg !default;
4443
$b-custom-file-font-size-sm: $input-font-size-sm !default;
@@ -58,11 +57,8 @@ $b-custom-file-height-inner-lg: calc(
5857
$b-custom-file-height-inner-sm: calc(
5958
#{$b-custom-file-line-height-sm * 1em} + #{$b-custom-file-padding-y-sm * 2}
6059
) !default;
61-
6260
// --- Icons ---
63-
6461
$b-icon-vertical-offset: -0.15em;
65-
6662
// Animations
6763
$b-icon-animation-cylon-duration: 0.75s !default;
6864
$b-icon-animation-cylon-vertical-duration: $b-icon-animation-cylon-duration !default;
@@ -72,21 +68,16 @@ $b-icon-animation-spin-reverse-duration: $b-icon-animation-spin-duration !defaul
7268
$b-icon-animation-spin-pulse-duration: 1s !default;
7369
$b-icon-animation-spin-reverse-pulse-duration: $b-icon-animation-spin-pulse-duration !default;
7470
$b-icon-animation-throb-duration: 0.75s !default;
75-
7671
// --- Sidebar ---
77-
7872
$b-sidebar-width: 320px !default;
7973
$b-sidebar-transition-duration: 0.3s !default;
8074
$b-sidebar-zindex: calc(#{$zindex-fixed} + 5) !default;
8175
$b-sidebar-header-font-size: 1.5rem !default;
8276
$b-sidebar-header-padding-y: $navbar-padding-y !default;
8377
$b-sidebar-header-padding-x: $navbar-padding-x !default;
84-
8578
// --- Tables ---
86-
8779
// Table busy state
8880
$b-table-busy-opacity: 0.55 !default;
89-
9081
// Table sorting
9182
$b-table-sort-icon-bg-width: 0.65em !default;
9283
$b-table-sort-icon-bg-height: 1em !default;
@@ -99,50 +90,39 @@ $b-table-sort-icon-bg-descending: url("data:image/svg+xml,<svg xmlns='http://www
9990
$b-table-sort-icon-bg-dark-not-sorted: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'><path fill='white' opacity='.3' d='M51 1l25 23 24 22H1l25-22zM51 101l25-23 24-22H1l25 22z'/></svg>") !default;
10091
$b-table-sort-icon-bg-dark-ascending: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'><path fill='white' d='M51 1l25 23 24 22H1l25-22z'/><path fill='white' opacity='.3' d='M51 101l25-23 24-22H1l25 22z'/></svg>") !default;
10192
$b-table-sort-icon-bg-dark-descending: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'><path fill='white' opacity='.3' d='M51 1l25 23 24 22H1l25-22z'/><path fill='white' d='M51 101l25-23 24-22H1l25 22z'/></svg>") !default;
102-
10393
// Flag to enable sticky table header and column CSS generation
10494
$bv-enable-table-sticky: true !default;
10595
// Default max-height for tables with sticky headers
10696
$b-table-sticky-header-max-height: 300px !default;
107-
10897
// Flag to enable table stacked CSS generation
10998
$bv-enable-table-stacked: true !default;
11099
// Table stacked defaults
111100
$b-table-stacked-heading-width: 40% !default;
112101
$b-table-stacked-gap: 1rem !default;
113-
114102
// Bootstrap v4.3 is missing the "active" variant for dark tables
115103
// Which translates to `bg-active`, but only for tables
116104
$table-dark-active-bg: $table-dark-hover-bg !default;
117-
118105
// --- Toasts ---
119-
120106
// Toaster defaults
121107
$b-toaster-zindex: 1100 !default;
122108
$b-toaster-offset-top: 0.5rem !default;
123109
$b-toaster-offset-bottom: $b-toaster-offset-top !default;
124110
$b-toaster-offset-left: $b-toaster-offset-top !default;
125111
$b-toaster-offset-right: $b-toaster-offset-top !default;
126-
127112
// Default toast opacity
128113
// Value from 0 to 1, or 0% to 100%
129114
// Bootstrap default is 0.85 (extracted from the `$toast-background-color` value)
130115
// Bootstrap does not have this as a variable, so we add it in.
131116
$b-toast-background-opacity: alpha($toast-background-color) !default;
132-
133117
// Toast variant levels wrt theme color value
134118
$b-toast-bg-level: $alert-bg-level !default;
135119
$b-toast-border-level: $alert-border-level !default;
136120
$b-toast-color-level: $alert-color-level !default;
137-
138121
// --- Tooltips ---
139-
140122
// Flag to enable tooltip variant CSS generation
141123
$bv-enable-tooltip-variants: true !default;
142-
143124
// Tooltip background variant level wrt theme color value
144125
$b-tooltip-bg-level: 0 !default;
145-
146126
// --- Popovers ---
147127

148128
// Flag to enable popover variant CSS generation
@@ -152,17 +132,14 @@ $bv-enable-popover-variants: true !default;
152132
$b-popover-bg-level: $alert-bg-level !default;
153133
$b-popover-border-level: $alert-border-level !default;
154134
$b-popover-color-level: $alert-color-level !default;
155-
156135
// --- Avatar ---
157-
158136
$b-avatar-size: 2.5rem !default;
159137
$b-avatar-size-sm: 1.5rem !default;
160138
$b-avatar-size-lg: 3.5rem !default;
161139
$b-avatar-font-size-scale: 0.4 !default;
162140
$b-avatar-badge-font-size-scale: $b-avatar-font-size-scale * 0.7 !default;
163141

164142
// --- Skeleton ---
165-
166143
$b-skeleton-background-color: rgba(0, 0, 0, 0.12) !default;
167144
$b-skeleton-loading-cursor: wait !default;
168145
$b-skeleton-animation-duration: 1.75s !default;

src/components/form-checkbox/_form-checkbox.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
padding-left: $b-custom-control-gutter-lg + $b-custom-control-indicator-size-lg;
88

99
.custom-control-label::before {
10-
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) / 2;
10+
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) * 0.5;
1111
left: -($b-custom-control-gutter-lg + $b-custom-control-indicator-size-lg);
1212
width: $b-custom-control-indicator-size-lg;
1313
height: $b-custom-control-indicator-size-lg;
1414
@include border-radius($b-custom-checkbox-indicator-border-radius-lg);
1515
}
1616

1717
.custom-control-label::after {
18-
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) / 2;
18+
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) * 0.5;
1919
left: -($b-custom-control-gutter-lg + $b-custom-control-indicator-size-lg);
2020
width: $b-custom-control-indicator-size-lg;
2121
height: $b-custom-control-indicator-size-lg;
@@ -30,15 +30,15 @@
3030
padding-left: $b-custom-control-gutter-sm + $b-custom-control-indicator-size-sm;
3131

3232
.custom-control-label::before {
33-
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) / 2;
33+
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) * 0.5;
3434
left: -($b-custom-control-gutter-sm + $b-custom-control-indicator-size-sm);
3535
width: $b-custom-control-indicator-size-sm;
3636
height: $b-custom-control-indicator-size-sm;
3737
@include border-radius($b-custom-checkbox-indicator-border-radius-sm);
3838
}
3939

4040
.custom-control-label::after {
41-
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) / 2;
41+
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) * 0.5;
4242
left: -($b-custom-control-gutter-sm + $b-custom-control-indicator-size-sm);
4343
width: $b-custom-control-indicator-size-sm;
4444
height: $b-custom-control-indicator-size-sm;
@@ -55,7 +55,7 @@
5555
line-height: $line-height-lg;
5656

5757
&::before {
58-
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) / 2;
58+
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) * 0.5;
5959
height: $b-custom-control-indicator-size-lg;
6060
left: -($b-custom-switch-width-lg + $b-custom-control-gutter-lg);
6161
width: $b-custom-switch-width-lg;
@@ -64,7 +64,7 @@
6464

6565
&::after {
6666
top: calc(
67-
#{(($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) / 2)} + #{$custom-control-indicator-border-width *
67+
#{(($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) * 0.5)} + #{$custom-control-indicator-border-width *
6868
2}
6969
);
7070
left: calc(
@@ -94,7 +94,7 @@
9494
line-height: $line-height-sm;
9595

9696
&::before {
97-
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) / 2;
97+
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) * 0.5;
9898
left: -($b-custom-switch-width-sm + $b-custom-control-gutter-sm);
9999
width: $b-custom-switch-width-sm;
100100
height: $b-custom-control-indicator-size-sm;
@@ -103,7 +103,7 @@
103103

104104
&::after {
105105
top: calc(
106-
#{(($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) / 2)} + #{$custom-control-indicator-border-width *
106+
#{(($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) * 0.5)} + #{$custom-control-indicator-border-width *
107107
2}
108108
);
109109
left: calc(

src/components/form-input/_form-input.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
input[type="color"].form-control {
1818
height: $input-height;
1919
// We use the smaller padding to make the color block larger
20-
padding: ($input-padding-y-sm / 2) ($input-padding-x-sm / 2);
20+
padding: ($input-padding-y-sm * 0.5) ($input-padding-x-sm * 0.5);
2121
}
2222

2323
input[type="color"].form-control.form-control-sm,
2424
.input-group-sm input[type="color"].form-control {
2525
height: $input-height-sm;
2626
// We use the smaller padding to make the color block larger
27-
padding: ($input-padding-y-sm / 2) ($input-padding-x-sm / 2);
27+
padding: ($input-padding-y-sm * 0.5) ($input-padding-x-sm * 0.5);
2828
}
2929

3030
input[type="color"].form-control.form-control-lg,
3131
.input-group-lg input[type="color"].form-control {
3232
height: $input-height-lg;
33-
padding: ($input-padding-y-sm / 2) ($input-padding-x-sm / 2);
33+
padding: ($input-padding-y-sm * 0.5) ($input-padding-x-sm * 0.5);
3434
}
3535

3636
input[type="color"].form-control:disabled {

src/components/form-radio/_form-radio.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
padding-left: $b-custom-control-gutter-lg + $b-custom-control-indicator-size-lg;
88

99
.custom-control-label::before {
10-
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) / 2;
10+
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) * 0.5;
1111
left: -($b-custom-control-gutter-lg + $b-custom-control-indicator-size-lg);
1212
width: $b-custom-control-indicator-size-lg;
1313
height: $b-custom-control-indicator-size-lg;
1414
border-radius: $b-custom-radio-indicator-border-radius-lg;
1515
}
1616

1717
.custom-control-label::after {
18-
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) / 2;
18+
top: ($font-size-lg * $line-height-lg - $b-custom-control-indicator-size-lg) * 0.5;
1919
left: -($b-custom-control-gutter-lg + $b-custom-control-indicator-size-lg);
2020
width: $b-custom-control-indicator-size-lg;
2121
height: $b-custom-control-indicator-size-lg;
@@ -30,15 +30,15 @@
3030
padding-left: $b-custom-control-gutter-sm + $b-custom-control-indicator-size-sm;
3131

3232
.custom-control-label::before {
33-
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) / 2;
33+
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) * 0.5;
3434
left: -($b-custom-control-gutter-sm + $b-custom-control-indicator-size-sm);
3535
width: $b-custom-control-indicator-size-sm;
3636
height: $b-custom-control-indicator-size-sm;
3737
border-radius: $b-custom-radio-indicator-border-radius-sm;
3838
}
3939

4040
.custom-control-label::after {
41-
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) / 2;
41+
top: ($font-size-sm * $line-height-sm - $b-custom-control-indicator-size-sm) * 0.5;
4242
left: -($b-custom-control-gutter-sm + $b-custom-control-indicator-size-sm);
4343
width: $b-custom-control-indicator-size-sm;
4444
height: $b-custom-control-indicator-size-sm;

src/components/skeleton/_skeleton.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104

105105
// Fade animation
106106
.b-skeleton-animate-fade {
107-
animation: b-skeleton-animate-fade ($b-skeleton-animation-duration / 2) ease-in-out alternate
107+
animation: b-skeleton-animate-fade ($b-skeleton-animation-duration * 0.5) ease-in-out alternate
108108
infinite;
109109

110110
@media (prefers-reduced-motion: reduce) {
@@ -123,7 +123,7 @@
123123

124124
// Throb animation
125125
.b-skeleton-animate-throb {
126-
animation: b-skeleton-animate-throb ($b-skeleton-animation-duration / 2) ease-in alternate
126+
animation: b-skeleton-animate-throb ($b-skeleton-animation-duration * 0.5) ease-in alternate
127127
infinite;
128128

129129
@media (prefers-reduced-motion: reduce) {

0 commit comments

Comments
 (0)