Skip to content

Commit 44d1e47

Browse files
authored
fix: preserve line breaks in tooltip field values (#3311)
Change white-space from no-wrap to pre-line for .row__value in tooltip table, so that newline characters in GeoJSON properties (e.g. desc tags) are properly displayed as line breaks. Also fixes the invalid CSS value 'no-wrap' (should be 'nowrap') on .row__name. Fixes #2369 Signed-off-by: pierreeurope <pierre.europe@pm.me>
1 parent e2cc341 commit 44d1e47

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/components/src/map/layer-hover-info.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,16 @@ const StyledTable = styled.table`
4545
color: ${props => props.theme.negativeBtnActBgd};
4646
}
4747
}
48-
& .row__value,
4948
& .row__name {
5049
overflow: hidden;
5150
text-overflow: ellipsis;
52-
white-space: no-wrap;
51+
white-space: nowrap;
52+
}
53+
& .row__value {
54+
overflow: hidden;
55+
text-overflow: ellipsis;
56+
white-space: pre-line;
57+
max-width: 250px;
5358
}
5459
`;
5560

0 commit comments

Comments
 (0)