Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7e916a2

Browse files
authored
fix(web): prevent toolbar button text wrapping for CJK languages (nexu-io#178)
Add white-space: nowrap to .viewer-action, .viewer-toggle, and .viewer-tab to prevent Chinese/Japanese text from breaking to a new line when the toolbar runs out of horizontal space. English text was unaffected because browsers treat whole words as atomic units, but CJK characters can break between any two characters by default.
1 parent e268f1f commit 7e916a2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

apps/web/src/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3228,6 +3228,7 @@ code {
32283228
border-radius: var(--radius-sm);
32293229
color: var(--text-muted);
32303230
font-size: 12.5px;
3231+
white-space: nowrap;
32313232
}
32323233
.viewer-action:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text); }
32333234
.viewer-action.primary {
@@ -3253,6 +3254,7 @@ code {
32533254
color: var(--text-muted);
32543255
padding: 4px 10px;
32553256
border-radius: var(--radius-sm);
3257+
white-space: nowrap;
32563258
}
32573259
.viewer-toggle .switch {
32583260
position: relative;
@@ -3284,6 +3286,7 @@ code {
32843286
font-size: 12px;
32853287
border-radius: var(--radius-sm);
32863288
color: var(--text-muted);
3289+
white-space: nowrap;
32873290
}
32883291
.viewer-tab:hover { background: var(--bg-subtle); color: var(--text); }
32893292
.viewer-tab.active {

0 commit comments

Comments
 (0)