Skip to content

Commit

Permalink
refactor: rename data attr
Browse files Browse the repository at this point in the history
  • Loading branch information
dauriamarco committed Dec 12, 2023
1 parent e2fcb20 commit e28d94a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
}

// Apply show/hide animation unless it has a visible focus within.
&:not([data-has-visible-focus]:focus-within) {
&:not([data-has-visible-focus-within]:focus-within) {
transform: translateY(var(--sbb-dialog-header-margin-block-start));
transition: {
property: box-shadow, transform;
Expand All @@ -224,7 +224,7 @@
padding-block-start: var(--sbb-spacing-responsive-xs);
}

&[data-has-visible-focus]:focus-within,
&[data-has-visible-focus-within]:focus-within,
:host([data-overflows]:not([data-fullscreen], [negative], [data-hide-header])) & {
@include sbb.shadow-level-9-soft;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export class SbbDialogElement extends LitElement {
if (this._overflows) {
toggleDatasetEntry(
this._dialogHeaderElement,
'hasVisibleFocus',
'hasVisibleFocusWithin',
sbbInputModalityDetector.mostRecentModality === 'keyboard',
);
}
Expand All @@ -450,7 +450,7 @@ export class SbbDialogElement extends LitElement {
el.addEventListener(
'blur',
() => {
toggleDatasetEntry(this._dialogHeaderElement, 'hasVisibleFocus', false);
toggleDatasetEntry(this._dialogHeaderElement, 'hasVisibleFocusWithin', false);
},
{ signal: this._openDialogController.signal },
);
Expand Down

0 comments on commit e28d94a

Please sign in to comment.