mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
Refactor border-radius in components to use CSS variables (#2240)
This commit is contained in:
5
.changeset/mighty-clocks-wonder.md
Normal file
5
.changeset/mighty-clocks-wonder.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@tabler/core": patch
|
||||
---
|
||||
|
||||
Refactor `border-radius` in components to use CSS variables
|
||||
@@ -1,12 +1,14 @@
|
||||
.signature {
|
||||
--#{$prefix}signature-padding: var(--#{$prefix}spacer-1);
|
||||
--#{$prefix}signature-border-radius: var(--#{$prefix}border-radius);
|
||||
border: var(--#{$prefix}border-width) solid var(--#{$prefix}border-color);
|
||||
padding: var(--#{$prefix}spacer-1);
|
||||
padding: var(--#{$prefix}signature-padding);
|
||||
border-radius: var(--#{$prefix}border-radius);
|
||||
}
|
||||
|
||||
.signature-canvas {
|
||||
border: var(--#{$prefix}border-width) dashed var(--#{$prefix}border-color);
|
||||
border-radius: var(--#{$prefix}border-radius-sm);
|
||||
border-radius: calc(var(--#{$prefix}signature-border-radius) - var(--#{$prefix}signature-padding));
|
||||
display: block;
|
||||
cursor: crosshair;
|
||||
width: 100%;
|
||||
|
||||
@@ -21,7 +21,7 @@ Color Input
|
||||
height: 1.5rem;
|
||||
color: $white;
|
||||
border: var(--#{$prefix}border-width) var(--#{$prefix}border-style) $input-border-color-translucent;
|
||||
border-radius: 3px;
|
||||
border-radius: var(--#{$prefix}border-radius);
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
|
||||
|
||||
&:before {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Image check
|
||||
*/
|
||||
.form-imagecheck {
|
||||
--#{$prefix}form-imagecheck-radius: var(--#{$prefix}border-radius);
|
||||
position: relative;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
@@ -19,7 +20,7 @@ Image check
|
||||
margin: 0;
|
||||
user-select: none;
|
||||
border: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color);
|
||||
border-radius: 3px;
|
||||
border-radius: var(--#{$prefix}form-imagecheck-radius);
|
||||
|
||||
.form-imagecheck-input:focus ~ & {
|
||||
border-color: var(--#{$prefix}primary);
|
||||
@@ -73,13 +74,13 @@ Image check
|
||||
@include transition(opacity $transition-time);
|
||||
|
||||
&:first-child {
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
border-top-left-radius: calc(var(--#{$prefix}form-imagecheck-radius) - 1px);
|
||||
border-top-right-radius: calc(var(--#{$prefix}form-imagecheck-radius) - 1px);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 2px;
|
||||
border-bottom-right-radius: calc(var(--#{$prefix}form-imagecheck-radius) - 1px);
|
||||
border-bottom-left-radius: calc(var(--#{$prefix}form-imagecheck-radius) - 1px);
|
||||
}
|
||||
|
||||
.form-imagecheck:hover &,
|
||||
|
||||
@@ -42,7 +42,7 @@ Select group
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
border: var(--#{$prefix}border-width) var(--#{$prefix}border-style) $input-border-color;
|
||||
border-radius: 3px;
|
||||
border-radius: var(--#{$prefix}border-radius);
|
||||
box-shadow: $input-box-shadow;
|
||||
@include transition(border-color $transition-time, background $transition-time, color $transition-time);
|
||||
|
||||
|
||||
@@ -96,5 +96,5 @@
|
||||
}
|
||||
|
||||
.bg-surface-backdrop {
|
||||
background-color: rgba($modal-backdrop-bg, $modal-backdrop-opacity) !important;
|
||||
background-color: color-transparent($modal-backdrop-bg, $modal-backdrop-opacity) !important;
|
||||
}
|
||||
5
core/scss/vendor/_coloris.scss
vendored
5
core/scss/vendor/_coloris.scss
vendored
@@ -1,6 +1,11 @@
|
||||
.clr-picker {
|
||||
box-shadow: var(--#{$prefix}shadow-dropdown);
|
||||
background-color: var(--#{$prefix}bg-surface);
|
||||
border-radius: var(--#{$prefix}border-radius);
|
||||
}
|
||||
|
||||
.clr-gradient {
|
||||
border-radius: var(--#{$prefix}border-radius) var(--#{$prefix}border-radius) 0 0;
|
||||
}
|
||||
|
||||
input.clr-color {
|
||||
|
||||
1
core/scss/vendor/_litepicker.scss
vendored
1
core/scss/vendor/_litepicker.scss
vendored
@@ -62,6 +62,7 @@
|
||||
.container__months {
|
||||
box-shadow: none;
|
||||
background-color: var(--#{$prefix}bg-forms);
|
||||
border-radius: calc(var(--#{$prefix}border-radius) - 1px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user