Skip to content

Commit

Permalink
feat: add interaction states for calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
inikolova authored and joneff committed Mar 22, 2021
1 parent 215e800 commit 3ec6113
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
3 changes: 2 additions & 1 deletion packages/default/scss/button/_layout.scss
Expand Up @@ -347,7 +347,8 @@

// Focused state
&:focus,
&.k-state-focused {
&.k-state-focused,
&.k-state-focus {
&::before {
opacity: $flat-button-focused-opacity;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/default/scss/button/_theme.scss
Expand Up @@ -295,7 +295,8 @@
}

&:focus,
&.k-state-focused {
&.k-state-focused,
&.k-state-focus {

&::after {
box-shadow: inset 0 0 0 2px currentColor;
Expand Down
17 changes: 12 additions & 5 deletions packages/default/scss/calendar/_theme.scss
Expand Up @@ -54,7 +54,9 @@
color: $calendar-today-nav-text;

&:hover,
&:focus {
&.k-state-hover,
&:focus,
&.k-state-focus {
color: $calendar-today-nav-hovered-text;
}
}
Expand Down Expand Up @@ -114,7 +116,9 @@
// Interactive states
.k-state-hover .k-link,
td:hover .k-link,
.k-calendar-td:hover .k-link {
td.k-state-hover .k-link,
.k-calendar-td:hover .k-link,
.k-calendar-td.k-state-hover .k-link {
@include fill(
$calendar-cell-hovered-text,
$calendar-cell-hovered-bg,
Expand All @@ -136,10 +140,12 @@
try-shade( $calendar-cell-selected-border )
);
}
.k-state-focused .k-link {
.k-state-focused .k-link,
.k-state-focus .k-link {
box-shadow: $calendar-cell-focused-shadow;
}
.k-state-selected.k-state-focused .k-link {
.k-state-selected.k-state-focused .k-link,
.k-state-selected.k-state-focus .k-link {
box-shadow: $calendar-cell-selected-focus-shadow;
}

Expand All @@ -152,7 +158,8 @@
);
box-shadow: inset -1px 0 $calendar-navigation-border;

li:hover {
li:hover,
li.k-state-hover {
color: $calendar-today-nav-hovered-text;
}
}
Expand Down

0 comments on commit 3ec6113

Please sign in to comment.