Skip to content

Commit

Permalink
Fix form controls bugs in dark mode (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
codecalm committed May 14, 2023
1 parent 260b53e commit a0a2d52
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-terms-tap.md
@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---

Fix form controls bugs in dark mode
2 changes: 1 addition & 1 deletion src/scss/_variables.scss
Expand Up @@ -823,7 +823,7 @@ $input-border-color-translucent: var(
) !default;
$input-placeholder-color: $text-muted-light !default;

$input-group-addon-bg: $light !default;
$input-group-addon-bg: var(--#{$prefix}bg-surface-secondary) !default;
$input-group-addon-color: var(--#{$prefix}muted) !default;

$input-border-radius: var(--#{$prefix}border-radius) !default;
Expand Down
4 changes: 2 additions & 2 deletions src/scss/ui/_grid.scss
Expand Up @@ -74,7 +74,7 @@

.divide-y#{$name-prefixed} {
> :not(template) ~ :not(template) {
border-top: var(--#{$prefix}border-width) var(--#{$prefix}border-style) $border-color-translucent !important;
border-top: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color-translucent) !important;
}

> :not(template):not(:first-child) {
Expand All @@ -88,7 +88,7 @@

.divide-x#{$name-prefixed} {
> :not(template) ~ :not(template) {
border-left: var(--#{$prefix}border-width) var(--#{$prefix}border-style) $border-color-translucent !important;
border-left: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color-translucent) !important;
}

> :not(template):not(:first-child) {
Expand Down
23 changes: 12 additions & 11 deletions src/scss/ui/_tables.scss
Expand Up @@ -88,7 +88,8 @@
}

tr {
border-bottom: var(--#{$prefix}border-width) var(--#{$prefix}border-style) $table-border-color;
border-bottom: var(--#{$prefix}border-width)
var(--#{$prefix}border-style) $table-border-color;
}

.btn {
Expand All @@ -99,6 +100,9 @@
}
}

/**
Table sort
*/
.table-sort {
font: inherit;
color: inherit;
Expand All @@ -120,31 +124,28 @@
color: var(--#{$prefix}body-color);
}

&:after,
&.asc:after,
&.desc:after {
&:after {
content: "";
display: inline-flex;
width: 1rem;
height: 1rem;
vertical-align: bottom;
background: $table-sort-bg-image no-repeat center;
opacity: .2;
mask-image: $table-sort-bg-image;
background: currentColor;
margin-left: .25rem;
}

&.asc:after {
background: $table-sort-desc-bg-image no-repeat center;
opacity: 1;
mask-image: $table-sort-desc-bg-image;
}

&.desc:after {
background: $table-sort-asc-bg-image no-repeat center;
opacity: 1;
mask-image: $table-sort-asc-bg-image;
}
}

.table-borderless {
thead th {
background: transparent;
}
}
}

0 comments on commit a0a2d52

Please sign in to comment.