github carbon-design-system/carbon-components-svelte v0.114.9

38 minutes ago

Highlights

  • Opening a portaled popup no longer scrolls the page. An OverflowMenu with portalMenu further down a page used to jump to the top.
  • An icon in Button's icon slot is styled without class="bx--btn__icon".
  • TagSet counts its overflow again once IBM Plex loads, so the "+N" tag no longer gets pushed out of view.

Bug Fixes

  • portal: give focus back without scrolling the page by @metonym in #5822
  • button: style an icon in the icon slot without its class by @metonym in #5823
  • tag-set: count the overflow again once web fonts load by @metonym in #5824

Portal

Portal moves its content into the page after it renders, and gave focus back with a plain focus() when focus was inside. A menu that focuses itself on open is still unpositioned at that moment, at the top of the page, so opening a portaled menu or popup further down scrolled to the top and left it offscreen. Focus now comes back without scrolling. This affects every portaled popup, not only OverflowMenu.

A portaled OverflowMenu open in a scrolled grid

Button

An svg in the icon slot now takes the button's icon spacing, size and color on its own, so the class is no longer needed. Icons that pass it are unchanged. A slotted icon now renders at the button's 16px icon size, as the icon prop does.

<Button>
  Download
  <Download slot="icon" />
</Button>

Buttons with slotted icons

TagSet

TagSet measured its tags before a web font such as IBM Plex had loaded, and the font changes each tag's width but not the set's, so the count stayed as the fallback font had it. It now measures again once fonts load.

Full Changelog: v0.114.8...v0.114.9

Don't miss a new carbon-components-svelte release

NewReleases is sending notifications on new releases.