Skip to content

Commit a71ca1f

Browse files
committed
refactor: improve styles
1 parent 09695f1 commit a71ca1f

27 files changed

+89
-111
lines changed

scss/_badge.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
//
4343

4444
.badge-sm {
45-
padding: $badge-padding-y-sm $badge-padding-x-sm;
45+
--#{$prefix}badge-padding-x: #{$badge-padding-x-sm};
46+
--#{$prefix}badge-padding-y: #{$badge-padding-y-sm};
4647
@include font-size($badge-font-size-sm);
4748
}

scss/_grid.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
//
33
// Rows contain your columns.
44

5+
:root {
6+
@each $name, $value in $grid-breakpoints {
7+
--#{$prefix}breakpoint-#{$name}: #{$value};
8+
}
9+
10+
--#{$prefix}mobile-breakpoint: #{$mobile-breakpoint};
11+
}
12+
513
@if $enable-grid-classes {
614
.row {
715
@include make-row();

scss/_offcanvas.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
--#{$prefix}offcanvas-border-width: #{$offcanvas-border-width};
1313
--#{$prefix}offcanvas-border-color: #{$offcanvas-border-color};
1414
--#{$prefix}offcanvas-box-shadow: #{$offcanvas-box-shadow};
15+
--#{$prefix}offcanvas-transition: #{transform $offcanvas-transition-duration ease-in-out};
16+
--#{$prefix}offcanvas-title-line-height: #{$offcanvas-title-line-height};
1517
// scss-docs-end offcanvas-css-vars
1618
}
1719

@@ -42,7 +44,7 @@
4244
background-clip: padding-box;
4345
outline: 0;
4446
@include box-shadow(var(--#{$prefix}offcanvas-box-shadow));
45-
@include transition(transform $offcanvas-transition-duration ease-in-out);
47+
@include transition(var(--#{$prefix}offcanvas-transition));
4648

4749
&.offcanvas-start {
4850
top: 0;
@@ -134,7 +136,7 @@
134136

135137
.offcanvas-title {
136138
margin-bottom: 0;
137-
line-height: $offcanvas-title-line-height;
139+
line-height: var(--#{$prefix}offcanvas-title-line-height);
138140
}
139141

140142
.offcanvas-body {

scss/_pagination.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
@include ltr-rtl("margin-left", $pagination-margin-start);
7676
}
7777

78-
@if $pagination-margin-start == ($pagination-border-width * -1) {
78+
@if $pagination-margin-start == calc(#{$pagination-border-width} * -1) {
7979
&:first-child {
8080
.page-link {
8181
@include border-start-radius(var(--#{$prefix}pagination-border-radius));

scss/_reboot.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,8 @@ legend {
531531
// https://github.com/twbs/bootstrap/issues/11586.
532532

533533
[type="search"] {
534-
outline-offset: -2px; // 1
535534
-webkit-appearance: textfield; // 2
535+
outline-offset: -2px; // 1
536536
}
537537

538538
// 1. A few input types should stay LTR

scss/_tooltip.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646

4747
.bs-tooltip-top .tooltip-arrow {
48-
bottom: 0;
48+
bottom: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
4949

5050
&::before {
5151
top: -1px;
@@ -56,7 +56,7 @@
5656

5757
/* rtl:begin:ignore */
5858
.bs-tooltip-end .tooltip-arrow {
59-
left: 0;
59+
left: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
6060
width: var(--#{$prefix}tooltip-arrow-height);
6161
height: var(--#{$prefix}tooltip-arrow-width);
6262

@@ -70,7 +70,7 @@
7070
/* rtl:end:ignore */
7171

7272
.bs-tooltip-bottom .tooltip-arrow {
73-
top: 0;
73+
top: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
7474

7575
&::before {
7676
bottom: -1px;
@@ -81,7 +81,7 @@
8181

8282
/* rtl:begin:ignore */
8383
.bs-tooltip-start .tooltip-arrow {
84-
right: 0;
84+
right: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
8585
width: var(--#{$prefix}tooltip-arrow-height);
8686
height: var(--#{$prefix}tooltip-arrow-width);
8787

@@ -116,5 +116,5 @@
116116
color: var(--#{$prefix}tooltip-color);
117117
text-align: center;
118118
background-color: var(--#{$prefix}tooltip-bg);
119-
border-radius: var(--#{$prefix}tooltip-border-radius, 0); // stylelint-disable-line property-disallowed-list
119+
@include border-radius(var(--#{$prefix}tooltip-border-radius));
120120
}

scss/_variables.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,10 @@ $hr-border-color: null !default; // Allows for inherited colors
730730
$hr-border-width: $border-width !default;
731731
$hr-opacity: .25 !default;
732732

733+
// scss-docs-start vr-variables
734+
$vr-border-width: var(--#{$prefix}border-width) !default;
735+
// scss-docs-end vr-variables
736+
733737
$legend-margin-bottom: .5rem !default;
734738
$legend-font-size: 1.5rem !default;
735739
$legend-font-weight: null !default;

scss/coreui-grid.rtl.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
/*!
2-
* CoreUI - HTML, CSS, and JavaScript UI Components Library
3-
* @version v4.2.6
4-
* @link https://coreui.io/
5-
* Copyright (c) 2022 creativeLabs Łukasz Holeczek
6-
* License MIT (https://coreui.io/license/)
7-
*/
1+
@import "mixins/banner";
2+
@include bsBanner(Grid);
83

94
$enable-ltr: false !default;
105
$enable-rtl: true !default;

scss/coreui-grid.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
/*!
2-
* CoreUI - HTML, CSS, and JavaScript UI Components Library
3-
* @version v4.2.6
4-
* @link https://coreui.io/
5-
* Copyright (c) 2022 creativeLabs Łukasz Holeczek
6-
* License MIT (https://coreui.io/license/)
7-
*/
1+
@import "mixins/banner";
2+
@include bsBanner(Grid);
83

94
$include-column-box-sizing: true !default;
105

scss/coreui-reboot.rtl.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
/*!
2-
* CoreUI - HTML, CSS, and JavaScript UI Components Library
3-
* @version v4.2.6
4-
* @link https://coreui.io/
5-
* Copyright (c) 2022 creativeLabs Łukasz Holeczek
6-
* License MIT (https://coreui.io/license/)
7-
*/
1+
@import "mixins/banner";
2+
@include bsBanner(Reboot);
83

94
$enable-ltr: false !default;
105
$enable-rtl: true !default;

0 commit comments

Comments
 (0)