Skip to content

Commit 7c5c6e5

Browse files
committed
Prevent counter unit from wrapping
Keep the unit together with the number on the same line to avoid awkward line breaks in the middle of values like "$100" or "100%". REDMINE-21218
1 parent 7270aa5 commit 7c5c6e5

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

entry_types/scrolled/package/src/contentElements/counter/Counter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ export function Counter({configuration, contentElementId, contentElementWidth, s
108108
<Text scaleCategory="counterUnit"
109109
typographySize={configuration.unitSize || 'md'}
110110
inline>
111-
<span style={configuration.unitColor ? {color: paletteColor(configuration.unitColor)} : undefined}>
111+
<span className={styles.unit}
112+
style={configuration.unitColor ? {color: paletteColor(configuration.unitColor)} : undefined}>
112113
{configuration.unit}
113114
</span>
114115
</Text>

entry_types/scrolled/package/src/contentElements/counter/Counter.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
word-break: break-word;
88
}
99

10+
.unit {
11+
white-space: nowrap;
12+
}
13+
1014
.numberCenter {
1115
text-align: center;
1216
}

0 commit comments

Comments
 (0)