Skip to content

Commit

Permalink
fix: fix open styling issues, set correct :focus styling (only) when …
Browse files Browse the repository at this point in the history
…using the keyboard
  • Loading branch information
andreassteinmann committed Feb 20, 2024
1 parent 2aa0089 commit a0c8f05
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ng-container *ngFor="let fill of stars; index as i">
<button
type="button"
class="text-muted mt-4 btn btn-link btn-link-action"
class="text-muted btn btn-link btn-link-action"
[title]="'product.review.rating.tooltip' | translate : { '0': i + 1 }"
(click)="setStars(i + 1)"
>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/components/header/back-to-top.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ html:not(.cypress-tests) {
animation: back-to-top-btn-animation 0.15s ease-in-out;

@media (max-width: $screen-xs-max) {
width: auto;
width: auto !important;
}
}
22 changes: 6 additions & 16 deletions src/styles/global/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,35 +116,25 @@ button.btn-link {
&.btn-tool {
padding: 0;
background-color: transparent;
border: 1px solid transparent;
border: none;
}

&.btn-link-action {
padding: 0;
margin-bottom: 1px; // fix inline display
font-size: unset;
}

&:hover,
&:focus {
text-decoration: none;
}
}

/* .btn-link-action {
padding: 0;
margin-right: 0 !important;
margin-bottom: 0 !important;
font-size: unset;
border: none;
}
@media (max-width: $screen-xs-max) {
.btn-link-action {
display: unset !important;
width: unset !important;
&:not(:focus-visible) {
// remove shadow for non-keyboard :focus (shadow is kept if user uses the keyboard)
box-shadow: none;
}
}
}
*/

// multiple buttons margin handling (use "button-group" in case the buttons are not direct siblings)
.button-group .btn,
Expand Down
36 changes: 22 additions & 14 deletions src/styles/pages/category/filter-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
}
}

.btn-link-action {
width: 100%;
text-align: left;
}

span {
&.icon-notselected {
display: inline-block;
Expand Down Expand Up @@ -323,22 +328,25 @@ input {
}

@media (max-width: $screen-xs-max) {
.mobile-filter-toggle {
display: block;
padding: $space-default 0;
margin-bottom: $space-default;
font-family: $font-family-condensedregular;
font-size: 15px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
button.btn-link-action {
&.mobile-filter-toggle {
display: block;
width: 100%;
padding: $space-default 0;
margin-bottom: $space-default;
font-family: $font-family-condensedregular;
font-size: 15px;
font-weight: 700;
text-align: center;
text-transform: uppercase;

&:hover {
text-decoration: none;
}
&:hover {
text-decoration: none;
}

.ng-fa-icon {
display: block;
.ng-fa-icon {
display: block;
}
}
}
}

0 comments on commit a0c8f05

Please sign in to comment.