Skip to content

Commit

Permalink
feat(card): allow usage of k-hover and k-focus
Browse files Browse the repository at this point in the history
  • Loading branch information
TeyaVes authored and joneff committed Apr 29, 2022
1 parent 15ff571 commit be00269
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/default/scss/card/_theme.scss
Expand Up @@ -10,6 +10,7 @@
@include box-shadow( $card-shadow );

&:focus,
&.k-focus,
&.k-state-focus {
@include fill(
$card-focus-text,
Expand All @@ -18,6 +19,11 @@
);
@include box-shadow( $card-focus-shadow );
}

&.k-selected,
&.k-state-selected {
@include box-shadow( $card-focus-shadow );
}
}


Expand Down Expand Up @@ -68,7 +74,10 @@

.k-card-wrap {
&.k-state-focused,
&.k-state-selected {
&.k-focus,
&:focus,
&.k-state-selected,
&.k-selected {
> .k-card {
@include box-shadow( $card-focus-shadow );
}
Expand All @@ -90,6 +99,7 @@
.k-card-callout.k-callout-w { @include box-shadow( $card-callout-box-shadow-w ); }

.k-card:focus .k-card-callout,
.k-card.k-focus .k-card-callout,
.k-card.k-state-focus .k-card-callout {
@include fill(
$bg: $card-focus-bg,
Expand Down
2 changes: 2 additions & 0 deletions packages/default/scss/taskboard/_layout.scss
Expand Up @@ -181,8 +181,10 @@
overflow-wrap: anywhere;

&:focus,
&.k-focus,
&.k-state-focus,
&:hover,
&.k-hover,
&.k-state-hover {
text-decoration: underline;
}
Expand Down
6 changes: 6 additions & 0 deletions packages/default/scss/taskboard/_theme.scss
Expand Up @@ -66,32 +66,38 @@
@include fill( $color: $taskboard-card-header-text );

&:focus,
&.k-focus,
&.k-state-focus {
@include fill( $color: $taskboard-card-header-focus-text );
}

&:hover,
&.k-hover,
&.k-state-hover {
@include fill( $color: $taskboard-card-header-hover-text );
}
}

&:focus,
&.k-focus,
&.k-state-focus {
@include fill( $border: $taskboard-card-focus-border );
@include box-shadow( $taskboard-card-focus-shadow );
}

&:hover,
&.k-hover,
&.k-state-hover {
@include fill( $border: $taskboard-card-hover-border );
}

&.k-selected,
&.k-state-selected {
@include fill( $border: $taskboard-card-selected-border );
@include box-shadow( $taskboard-card-selected-shadow );
}

&.k-disabled,
&.k-state-disabled {
@include disabled( $disabled-styling );
}
Expand Down
1 change: 1 addition & 0 deletions packages/default/scss/tilelayout/_theme.scss
Expand Up @@ -7,6 +7,7 @@
}

.k-tilelayout-item:focus,
.k-tilelayout-item.k-focus,
.k-tilelayout-item.k-state-focus,
.k-tilelayout-item.k-state-focused {
@include box-shadow($tilelayout-card-focus-shadow);
Expand Down

0 comments on commit be00269

Please sign in to comment.