Skip to content

Commit

Permalink
fix(coloreditor): add focus for colorgradient inside coloreditor
Browse files Browse the repository at this point in the history
  • Loading branch information
PaskalevStoyan authored and Juveniel committed Oct 17, 2022
1 parent 49b209a commit 13c95e3
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/bootstrap/scss/coloreditor/_variables.scss
Expand Up @@ -25,3 +25,7 @@ $coloreditor-color-preview-height: 12px !default;
$coloreditor-views-padding-y: $coloreditor-spacer !default;
$coloreditor-views-padding-x: $coloreditor-views-padding-y !default;
$coloreditor-views-gap: $coloreditor-spacer !default;

$coloreditor-colorgradient-focus-outline-color: rgba(0, 0, 0, .3) !default;
$coloreditor-colorgradient-focus-outline: 2px !default;
$coloreditor-colorgradient-focus-outline-offset: 2px !default;
4 changes: 4 additions & 0 deletions packages/classic/scss/coloreditor/_variables.scss
Expand Up @@ -25,3 +25,7 @@ $coloreditor-color-preview-height: 12px !default;
$coloreditor-views-padding-y: $coloreditor-spacer !default;
$coloreditor-views-padding-x: $coloreditor-views-padding-y !default;
$coloreditor-views-gap: $coloreditor-spacer !default;

$coloreditor-colorgradient-focus-outline-color: rgba(0, 0, 0, .3) !default;
$coloreditor-colorgradient-focus-outline: 2px !default;
$coloreditor-colorgradient-focus-outline-offset: 4px !default;
6 changes: 6 additions & 0 deletions packages/default/scss/coloreditor/_layout.scss
Expand Up @@ -56,6 +56,12 @@
width: auto;
border-width: 0;
}
.k-colorgradient:focus,
.k-colorgradient.k-focus {
outline: $coloreditor-colorgradient-focus-outline dotted;
outline-offset: $coloreditor-colorgradient-focus-outline-offset;
border-radius: 0;
}

.k-colorpalette {
align-self: center;
Expand Down
6 changes: 6 additions & 0 deletions packages/default/scss/coloreditor/_theme.scss
Expand Up @@ -15,4 +15,10 @@
@include box-shadow( $coloreditor-focus-shadow );
}

.k-coloreditor .k-colorgradient:focus,
.k-coloreditor .k-colorgradient.k-focus {
box-shadow: none;
outline-color: $coloreditor-colorgradient-focus-outline-color;
}

}
4 changes: 4 additions & 0 deletions packages/default/scss/coloreditor/_variables.scss
Expand Up @@ -25,3 +25,7 @@ $coloreditor-color-preview-height: 12px !default;
$coloreditor-views-padding-y: $coloreditor-spacer !default;
$coloreditor-views-padding-x: $coloreditor-views-padding-y !default;
$coloreditor-views-gap: $coloreditor-spacer !default;

$coloreditor-colorgradient-focus-outline-color: rgba(0, 0, 0, .3) !default;
$coloreditor-colorgradient-focus-outline: 2px !default;
$coloreditor-colorgradient-focus-outline-offset: 4px !default;
2 changes: 1 addition & 1 deletion packages/default/scss/colorgradient/_layout.scss
Expand Up @@ -49,7 +49,7 @@
position: absolute;
top: 50%;
left: 50%;
z-index: 10;
z-index: 1;
cursor: pointer;
}

Expand Down
7 changes: 7 additions & 0 deletions packages/fluent/scss/coloreditor/_layout.scss
Expand Up @@ -25,6 +25,13 @@
}
}

.k-coloreditor .k-colorgradient:focus,
.k-coloreditor .k-colorgradient.k-focus {
outline: var( --kendo-coloreditor-colorgradient-focus-outline, #{$kendo-coloreditor-colorgradient-focus-outline} ) dotted;
outline-offset: var( --kendo-coloreditor-colorgradient-focus-outline-offset, #{$kendo-coloreditor-colorgradient-focus-outline-offset} );
border-radius: 0;
}

// Header
.k-coloreditor-header {
padding-inline: var( --kendo-coloreditor-header-padding-x, #{$kendo-coloreditor-header-padding-x} );
Expand Down
5 changes: 5 additions & 0 deletions packages/fluent/scss/coloreditor/_theme.scss
Expand Up @@ -24,4 +24,9 @@
);
}

.k-coloreditor .k-colorgradient:focus,
.k-coloreditor .k-colorgradient.k-focus {
box-shadow: none;
outline-color: var( --kendo-coloreditor-colorgradient-focus-outline-color, #{$kendo-coloreditor-colorgradient-focus-outline-color} );
}
}
10 changes: 10 additions & 0 deletions packages/fluent/scss/coloreditor/_variables.scss
Expand Up @@ -81,3 +81,13 @@ $kendo-coloreditor-footer-padding-y: map-get( $kendo-spacing, 2 ) !default;
/// Vertical padding of the color editor footer.
/// @group coloreditor
$kendo-coloreditor-footer-padding-x: map-get( $kendo-spacing, 2 ) !default;

/// The color of the focused colorgradient.
/// @group coloreditor
$kendo-coloreditor-colorgradient-focus-outline-color: rgba(0, 0, 0, 0.3) !default;
/// The outline of the focused colorgradient.
/// @group coloreditor
$kendo-coloreditor-colorgradient-focus-outline: 2px !default;
/// The outline offset of the focused colorgradient.
/// @group coloreditor
$kendo-coloreditor-colorgradient-focus-outline-offset: 2px !default;
4 changes: 4 additions & 0 deletions packages/material/scss/coloreditor/_variables.scss
Expand Up @@ -25,3 +25,7 @@ $coloreditor-color-preview-height: 12px !default;
$coloreditor-views-padding-y: $coloreditor-spacer !default;
$coloreditor-views-padding-x: $coloreditor-views-padding-y !default;
$coloreditor-views-gap: $coloreditor-spacer !default;

$coloreditor-colorgradient-focus-outline-color: rgba(0, 0, 0, .3) !default;
$coloreditor-colorgradient-focus-outline: 2px !default;
$coloreditor-colorgradient-focus-outline-offset: 2px !default;

0 comments on commit 13c95e3

Please sign in to comment.