Skip to content

Commit

Permalink
fix: styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SGrueber committed Feb 16, 2024
1 parent 2dfcd92 commit 55eb2e3
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<ul class="filter-list clearfix" [id]="'filter-list_' + filterElement.name">
<ng-container *ngFor="let facet of filterElement.facets">
<li class="filter-item filter-color" [ngClass]="{ 'filter-selected': facet.selected }">
<button
type="button"
class="filter-swatch btn btn-link btn-link-action"
<a
class="filter-swatch"
[title]="facet.displayName + ' (' + facet.count + ')'"
(click)="filter(facet)"
(keypress.down)="filter(facet)"
[attr.data-testing-id]="'filter-link-' + (facet.displayName | sanitize)"
tabindex="0"
>
<span
[style.background-image]="getBackgroundImage(facet)"
[style.background-color]="getBackgroundColor(facet)"
[style.border]="facet.displayName.toLowerCase() === 'white' ? '1px solid #ddd' : null"
></span>
</button>
</a>
</li>
</ng-container>
</ul>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<ul>
<li *ngFor="let option of group.options" [ngClass]="{ selected: option.active }">
<button
type="button"
class="btn btn-link btn-link-action"
<a
(click)="optionChange(group.id, option.value)"
(keydown.enter)="optionChange(group.id, option.value)"
title="{{ option.label }}"
tabindex="0"
>
<span
*ngIf="group.attributeType === 'colorCode'"
[ngStyle]="{ 'background-color': '#' + option.metaData }"
[ngClass]="{ 'light-color': option.label.toLowerCase() === 'white' }"
></span>
<img *ngIf="group.attributeType === 'swatchImage'" [src]="option.metaData" alt="{{ option.label }}" />
</button>
</a>
</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ul {
border: 1px solid $border-color-light;
}

button {
a {
display: block;
border: 1px solid transparent;
border-radius: 50%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@
{{ category.name }}
</a>
<ng-container *ngIf="0 < mainNavigationMaxSubCategoriesDepth && category.hasChildren">
<button
type="button"
class="dropdown-toggle btn btn-link btn-link-action"
<a
class="dropdown-toggle"
(click)="toggleOpen(category.uniqueId)"
(keydown.enter)="toggleOpen(category.uniqueId)"
[attr.aria-label]="
isOpened(category.uniqueId)
? ('header.navigation.collapse_category.aria_label' | translate : { '0': category.name })
: ('header.navigation.expand_category.aria_label' | translate : { '0': category.name })
"
tabindex="0"
>
<fa-icon *ngIf="isOpened(category.uniqueId); else closed" [icon]="['fas', 'minus']" />
<ng-template #closed> <fa-icon [icon]="['fas', 'plus']" /> </ng-template>
</button>
</a>
<ish-sub-category-navigation [categoryUniqueId]="category.uniqueId" [subCategoriesDepth]="1" [view]="view" />
</ng-container>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@
>{{ subcategory.name }}</a
>
<ng-container *ngIf="subCategoriesDepth < mainNavigationMaxSubCategoriesDepth && subcategory.hasChildren">
<button
type="button"
class="dropdown-toggle btn btn-link btn-link-action"
<a
class="dropdown-toggle"
[ngClass]="{ 'd-none': view === 'full' }"
(click)="toggleOpen(subcategory.uniqueId)"
(keydown.enter)="toggleOpen(subcategory.uniqueId)"
[attr.aria-label]="
isOpened(subcategory.uniqueId)
? ('header.navigation.collapse_category.aria_label' | translate : { '0': subcategory.name })
: ('header.navigation.expand_category.aria_label' | translate : { '0': subcategory.name })
"
tabindex="0"
>
<fa-icon *ngIf="isOpened(subcategory.uniqueId); else closed" [icon]="['fas', 'minus']" />
<ng-template #closed> <fa-icon [icon]="['fas', 'plus']" /> </ng-template>
</button>
</a>
<ish-sub-category-navigation
[categoryUniqueId]="subcategory.uniqueId"
[subCategoriesDepth]="subCategoriesDepth + 1"
Expand Down
7 changes: 7 additions & 0 deletions src/styles/global/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
margin-left: 0;
}

&.btn-link {
font-family: $font-family-regular;
text-decoration: none;
text-transform: unset;
}

&.btn-link-inline {
display: inline;
padding: 0;
Expand Down Expand Up @@ -112,6 +118,7 @@ button.btn-link {

&.btn-link-action {
padding: 0;
font-size: unset;
}

&:hover,
Expand Down

0 comments on commit 55eb2e3

Please sign in to comment.