Skip to content

Commit

Permalink
fix(accordion/notification): style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ariellalgilmore committed Dec 5, 2023
1 parent 14e0f66 commit fdf5b24
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ class CDSAccordionItem extends FocusMixin(LitElement) {
)
);
}
const content = this.shadowRoot.querySelector(`.${prefix}--accordion__wrapper`);

if (this.open) {
// accordion opens
content.style.maxBlockSize = content.scrollHeight + 15 + 'px';
} else {
// accordion closes
content.style.maxBlockSize = '';
}
}

/**
Expand Down Expand Up @@ -213,8 +222,10 @@ class CDSAccordionItem extends FocusMixin(LitElement) {
<slot name="title">${title}</slot>
</div>
</button>
<div id="content" part="content" class="${contentClasses}">
<slot></slot>
<div class="${prefix}--accordion__wrapper">
<div id="content" part="content" class="${contentClasses}">
<slot></slot>
</div>
</div>
`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ $css--plex: true !default;
.#{$prefix}--inline-notification__close-button:focus {
@include focus-outline('outline');
}

.#{$prefix}--inline-notification__title {
margin-block-start: 0;
margin-block-end: 0;
}
}

:host(#{$prefix}-inline-notification[low-contrast])::before {
Expand Down

0 comments on commit fdf5b24

Please sign in to comment.