Skip to content

Commit e6138c2

Browse files
committed
style: improve line breaking for CJK text per MDN recomendations
1 parent 3a21dc8 commit e6138c2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/modules/service-catalog/components/service-catalog-item/CollapsibleDescription.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const DescriptionWrapper = styled.div`
1313
${(props) => getColorV8("grey", 300, props.theme)};
1414
padding-bottom: ${(props) => props.theme.space.lg};
1515
margin-inline-end: ${(props) => props.theme.space.xl};
16-
word-break: break-all;
1716
1817
@media (max-width: ${(props) => props.theme.breakpoints.md}) {
1918
margin-inline-end: 0;
@@ -23,6 +22,8 @@ const DescriptionWrapper = styled.div`
2322
const ItemTitle = styled(XXXL)`
2423
font-weight: ${(props) => props.theme.fontWeights.semibold};
2524
margin-bottom: 0;
25+
overflow-wrap: break-word;
26+
max-width: 100%;
2627
`;
2728

2829
const CollapsibleText = styled.div<{ isCollapsed: boolean }>`
@@ -33,6 +34,7 @@ const CollapsibleText = styled.div<{ isCollapsed: boolean }>`
3334
overflow: hidden;
3435
margin-top: ${(props) => props.theme.space.md};
3536
padding-inline-end: ${(props) => props.theme.space.xl};
37+
overflow-wrap: break-word;
3638
3739
@media (max-width: ${(props) => props.theme.breakpoints.md}) {
3840
padding-inline-end: 0;

src/modules/service-catalog/components/service-catalog-item/ItemRequestForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const LeftColumn = styled.div`
7272
flex-direction: column;
7373
gap: ${(props) => props.theme.space.lg};
7474
margin-inline-end: ${(props) => props.theme.space.xl};
75+
min-width: 0;
7576
7677
@media (max-width: ${(props) => props.theme.breakpoints.md}) {
7778
margin-inline-end: 0;

0 commit comments

Comments
 (0)