Skip to content

Commit

Permalink
fix(collapse): update focus style to align with halo design (#1095)
Browse files Browse the repository at this point in the history
  • Loading branch information
bualoy-napat authored Feb 1, 2024
1 parent 333c86d commit 447dd18
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/elemental-theme/src/custom-elements/ef-collapse.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
padding: 0;
&[focused='visible'] {
background-color: @button-hover-background-color;
outline: 1px solid @input-focused-border-color;
outline-offset: -1px;
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/elements/src/accordion/__demo__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
height: 100px;
}
ef-checkbox {
padding-right: 8px;
margin-right: 8px;
}
.inner {
padding-left: 15px;
margin-left: 15px;
}
</style>
</head>
Expand Down
5 changes: 5 additions & 0 deletions packages/elements/src/collapse/__snapshots__/Collapse.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
aria-controls="content"
aria-expanded="false"
id="header-label"
part="header-label"
role="button"
tabindex="0"
>
Expand Down Expand Up @@ -65,6 +66,7 @@
aria-controls="content"
aria-expanded="false"
id="header-label"
part="header-label"
role="button"
tabindex="0"
>
Expand Down Expand Up @@ -116,6 +118,7 @@
aria-controls="content"
aria-expanded="false"
id="header-label"
part="header-label"
role="button"
tabindex="0"
>
Expand Down Expand Up @@ -168,6 +171,7 @@
aria-controls="content"
aria-expanded="false"
id="header-label"
part="header-label"
role="button"
tabindex="0"
>
Expand Down Expand Up @@ -219,6 +223,7 @@
aria-controls="content"
aria-expanded="false"
id="header-label"
part="header-label"
role="button"
tabindex="0"
>
Expand Down
1 change: 1 addition & 0 deletions packages/elements/src/collapse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export class Collapse extends BasicElement {
>
<div
id="header-label"
part="header-label"
role="button"
tabindex="0"
aria-expanded="${this.expanded}"
Expand Down
2 changes: 1 addition & 1 deletion packages/halo-theme/src/custom-elements/ef-collapse.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}
}

// header level 3
// header level 4
&[level='4'] {
background-color: lighten(@header-level4-bg-color, @dark-modifier);
& when (@variant = light) {
Expand Down

0 comments on commit 447dd18

Please sign in to comment.