Skip to content

Commit

Permalink
fix: correct focus behavior in QCollapseItem (#155)
Browse files Browse the repository at this point in the history
* fix: remove outline in firefox, use focus-visible polyfill in QCollapseItem

* fix: comb focus styles

Co-authored-by: ViZhe <vzheleztsov@gpmdata.ru>
  • Loading branch information
Sergey and ViZhe authored Sep 8, 2021
1 parent 5175c7b commit 1f6c3f0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
}

&:not(.q-cascader-row_disabled) {
&:focus {
outline: none;
}

&:hover,
&:focus,
&.focus-visible {
color: var(--color-primary-black);
background-color: var(--color-tertiary-gray);
outline: none;
}
}

Expand Down
8 changes: 6 additions & 2 deletions src/qComponents/QCollapseItem/src/q-collapse-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@
border-radius: var(--border-radius-base) var(--border-radius-base) 0 0;
}

&:focus,
&:hover {
&:focus {
outline: none;
}

&:hover,
&.focus-visible {
background-color: var(--color-tertiary-gray);
}
}
Expand Down
9 changes: 6 additions & 3 deletions src/qComponents/QInput/src/q-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@
height: 0;
}

&:focus {
outline: none;
}

&.focus-visible {
background-color: var(--field-background-color-focus);
outline: none;
box-shadow: var(--field-box-shadow-focus);
}

Expand Down Expand Up @@ -167,8 +170,8 @@
font-family: 'qicon';
}

&.focus-visible,
&:hover {
&:hover,
&.focus-visible {
color: var(--field-icon-color-hover);
}
}
Expand Down
9 changes: 6 additions & 3 deletions src/qComponents/QTag/src/q-tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@
background-color: transparent;
border: none;

&.focus-visible,
&:hover {
color: var(--color-primary-black);
&:focus {
outline: none;
}

&:hover,
&.focus-visible {
color: var(--color-primary-black);
}
}
}

0 comments on commit 1f6c3f0

Please sign in to comment.