1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00

fix: update CSS calculations to use calc() (#2412)

This commit is contained in:
Paweł Kuna
2025-07-07 17:59:45 +02:00
committed by GitHub
parent f91b0f7cfa
commit 2a12f72b28
6 changed files with 12 additions and 7 deletions

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Update CSS calculations to use `calc()`

View File

@@ -96,7 +96,7 @@
.dropend { .dropend {
> .dropdown-menu { > .dropdown-menu {
margin-top: subtract(-$dropdown-padding-y, 1px); margin-top: subtract(calc(-1 * $dropdown-padding-y), 1px);
margin-left: -.25rem; margin-left: -.25rem;
} }

View File

@@ -17,8 +17,8 @@
@each $name, $value in (0: 0, sm: .375rem, md: 1.5rem, lg: 3rem) { @each $name, $value in (0: 0, sm: .375rem, md: 1.5rem, lg: 3rem) {
.row-#{$name} { .row-#{$name} {
margin-right: (-$value); margin-right: calc(-1 * $value);
margin-left: -($value); margin-left: calc(-1 * $value);
> .col, > .col,
> [class*="col-"] { > [class*="col-"] {

View File

@@ -22,7 +22,7 @@
} }
&.nav-pills { &.nav-pills {
margin: 0 (-$nav-link-padding-x); margin: 0 calc(-1 * $nav-link-padding-x);
} }
} }

View File

@@ -114,7 +114,7 @@ Table sort
text-align: inherit; text-align: inherit;
@include transition(color $transition-time); @include transition(color $transition-time);
margin: (-$table-th-padding-y) (-$table-th-padding-x); margin: calc(-1 * $table-th-padding-y) calc(-1 * $table-th-padding-x);
padding: $table-th-padding-y $table-th-padding-x; padding: $table-th-padding-y $table-th-padding-x;
&:hover, &:hover,

View File

@@ -33,8 +33,8 @@
.noUi-horizontal & { .noUi-horizontal & {
width: $form-range-thumb-width; width: $form-range-thumb-width;
height: $form-range-thumb-height; height: $form-range-thumb-height;
top: (-$form-range-thumb-height * .5); top: calc($form-range-thumb-height * -.5);
right: (-$form-range-thumb-height * .5); right: calc($form-range-thumb-height * -.5);
margin: 1px 1px 0 0; margin: 1px 1px 0 0;
} }