From a6f4ec5b262ebd350041e8552058a430f337e364 Mon Sep 17 00:00:00 2001 From: oddvernes Date: Mon, 21 Aug 2023 13:49:05 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=92=84=20Breadcrumbs:=20add=20center?= =?UTF-8?q?=20vertical=20alignment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eds-core-react/src/components/Breadcrumbs/Breadcrumbs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumbs.tsx b/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumbs.tsx index 85467ee74d..4d1ddb6b50 100644 --- a/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumbs.tsx +++ b/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumbs.tsx @@ -16,9 +16,9 @@ const { spacings, typography, states } = tokens const OrderedList = styled.ol<{ $wrap: boolean }>` list-style: none; display: flex; + align-items: center; padding: 0; margin: 0; - flex-wrap: wrap; flex-wrap: ${({ $wrap }) => ($wrap ? 'wrap' : 'nowrap')}; ` From fea4e8aba9b81df8c7a67eb8d490de0597a52f4f Mon Sep 17 00:00:00 2001 From: oddvernes Date: Tue, 22 Aug 2023 11:24:08 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=92=84=20Breadcrumbs=20:fix=20center?= =?UTF-8?q?=20alignment=20when=20icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eds-core-react/src/components/Breadcrumbs/Breadcrumb.tsx | 3 ++- .../src/components/Breadcrumbs/Breadcrumbs.tsx | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumb.tsx b/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumb.tsx index 7fa497c17f..659bd77bdc 100644 --- a/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumb.tsx +++ b/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumb.tsx @@ -20,7 +20,8 @@ const StyledTypography = styled(Typography)` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - display: inline-block; + display: block; + line-height: 1; text-decoration: none; color: ${typography.color}; width: 100%; diff --git a/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumbs.tsx b/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumbs.tsx index 4d1ddb6b50..d8409322af 100644 --- a/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumbs.tsx +++ b/packages/eds-core-react/src/components/Breadcrumbs/Breadcrumbs.tsx @@ -16,6 +16,7 @@ const { spacings, typography, states } = tokens const OrderedList = styled.ol<{ $wrap: boolean }>` list-style: none; display: flex; + gap: 0.45em 0; align-items: center; padding: 0; margin: 0; @@ -23,13 +24,15 @@ const OrderedList = styled.ol<{ $wrap: boolean }>` ` const ListItem = styled.li` - display: inline-block; + display: block; min-width: 30px; ` const Separator = styled(Typography)` color: ${typography.color}; ${spacingsTemplate(spacings)} + display: block; + line-height: 1; ` const Collapsed = styled(Typography)` From 28090fc80a50a4b29905f8efec8964b92ca16275 Mon Sep 17 00:00:00 2001 From: oddvernes Date: Tue, 22 Aug 2023 11:25:45 +0200 Subject: [PATCH 3/3] Update snapshot --- .../__snapshots__/Breadcrumbs.test.tsx.snap | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/eds-core-react/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap b/packages/eds-core-react/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap index 06a78db439..4df80f208e 100644 --- a/packages/eds-core-react/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +++ b/packages/eds-core-react/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap @@ -18,18 +18,20 @@ exports[`Breadcrumbs Matches snapshot 1`] = ` display: -webkit-flex; display: -ms-flexbox; display: flex; + gap: 0.45em 0; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; padding: 0; margin: 0; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; } .c1 { - display: inline-block; + display: block; min-width: 30px; } @@ -37,13 +39,16 @@ exports[`Breadcrumbs Matches snapshot 1`] = ` color: var(--eds_text__static_icons__tertiary,rgba(111,111,111,1)); padding-left: 16px; padding-right: 16px; + display: block; + line-height: 1; } .c3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - display: inline-block; + display: block; + line-height: 1; -webkit-text-decoration: none; text-decoration: none; color: var(--eds_text__static_icons__tertiary,rgba(111,111,111,1));