Skip to content

Commit

Permalink
Remove * selectors from focus highlight component
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolai Dorofeev committed Jul 12, 2024
1 parent be98ce0 commit 10ad632
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-zebras-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@d0rich/esprit-design': patch
---

Remove \* selectors from focus highlight component
2 changes: 1 addition & 1 deletion packages/esprit-design/src/components/buttons/DBtn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const {
<template>
<Component
:is="currentComponent"
class="d-btn"
class="d-btn d-focusable"
:class="{
'd-btn--rotated': !noRotate,
'd-btn--uppercase': textTransform === 'uppercase',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const currentComponent = computed(() => {
<Component
v-bind="props"
:is="currentComponent"
class="d-focus-hl"
class="d-focus-hl d-focusable"
:class="{
'd-focus-hl--exact': linkExact,
'd-focus-hl--not-exact': !linkExact,
Expand Down Expand Up @@ -114,7 +114,7 @@ const currentComponent = computed(() => {
}
.d-focus-hl:hover > .d-focus-hl__hl--negative-tile,
*:focus .d-focus-hl__hl--negative-tile {
.d-focusable:focus .d-focus-hl__hl--negative-tile {
opacity: 1;
animation: hl--negative-tile-animation linear 1s infinite;
}
Expand All @@ -126,7 +126,7 @@ const currentComponent = computed(() => {
left: -5%;
}
*:focus .d-focus-hl__hl--negative-tile {
.d-focusable:focus .d-focus-hl__hl--negative-tile {
width: 140% !important;
height: 200% !important;
top: -50% !important;
Expand Down Expand Up @@ -191,7 +191,7 @@ const currentComponent = computed(() => {
@apply -z-10;
}
:is(.d-focus-hl:hover, *:focus)
:is(.d-focus-hl:hover, .d-focusable:focus)
:is(.d-focus-hl__hl--list-item, .d-focus-hl__hl--negative-list-item) {
opacity: 1;
animation: hl--list-item-animation 0.3s infinite;
Expand All @@ -205,7 +205,8 @@ const currentComponent = computed(() => {
left: -5%;
}
*:focus :is(.d-focus-hl__hl--list-item, .d-focus-hl__hl--negative-list-item) {
.d-focusable:focus
:is(.d-focus-hl__hl--list-item, .d-focus-hl__hl--negative-list-item) {
width: 220% !important;
height: 200% !important;
top: -50% !important;
Expand Down

0 comments on commit 10ad632

Please sign in to comment.