diff --git a/packages/css/src/avatar.css b/packages/css/src/avatar.css index 872dce7fe4..e69540d73d 100644 --- a/packages/css/src/avatar.css +++ b/packages/css/src/avatar.css @@ -11,7 +11,6 @@ border-radius: var(--dsc-avatar-border-radius); box-sizing: border-box; color: var(--dsc-avatar-color); - display: inline-flex; flex-shrink: 0; font-weight: var(--ds-font-weight-medium); height: var(--dsc-avatar-size); @@ -22,6 +21,10 @@ user-select: none; width: var(--dsc-avatar-size); + &:not([hidden]) { + display: inline-flex; + } + &:not(:has(img)) { padding: var(--dsc-avatar-padding); } diff --git a/packages/css/src/badge.css b/packages/css/src/badge.css index 97325f3ffc..8fb4abf59e 100644 --- a/packages/css/src/badge.css +++ b/packages/css/src/badge.css @@ -31,11 +31,14 @@ .ds-badge--position { box-sizing: border-box; - display: inline-flex; position: relative; height: fit-content; width: fit-content; + &:not([hidden]) { + display: inline-flex; + } + & .ds-badge::before { position: absolute; } diff --git a/packages/css/src/breadcrumbs.css b/packages/css/src/breadcrumbs.css index bd47f4cc62..240ab605cb 100644 --- a/packages/css/src/breadcrumbs.css +++ b/packages/css/src/breadcrumbs.css @@ -5,12 +5,15 @@ --dsc-breadcrumbs-color: var(--ds-color-text-subtle); & > :is(ol, ul) { - display: flex; flex-wrap: wrap; list-style-type: none; margin: 0; padding: 0; gap: var(--dsc-breadcrumbs-spacing) 0; + + &:not([hidden]) { + display: flex; + } } & a[aria-current='page'] { diff --git a/packages/css/src/card.css b/packages/css/src/card.css index 903332ed12..3860907664 100644 --- a/packages/css/src/card.css +++ b/packages/css/src/card.css @@ -24,13 +24,16 @@ border: var(--dsc-card-border); box-sizing: border-box; color: var(--dsc-card-color); - display: block; font-family: inherit; margin: 0; overflow: clip; /* Needed to clip media elements and and Card.Block */ padding: var(--dsc-card-padding); text-align: inherit; + &:not([hidden]) { + display: block; + } + &:not([data-size]) { font-size: inherit; /* Ensure inheriting font-size when