Skip to content

Commit ad8e090

Browse files
committed
Prevent header labels from wrapping on HiDPI
1 parent a1325d0 commit ad8e090

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ function App() {
359359
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
360360
</svg>
361361
</div>
362-
<h1 className="text-lg font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 via-purple-500 to-indigo-600 animate-gradient-slow">
362+
<h1 className="text-lg font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 via-purple-500 to-indigo-600 animate-gradient-slow whitespace-nowrap">
363363
Log Analyzer
364364
</h1>
365365
<div className="ml-auto flex items-center gap-2">

src/components/Header.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ export function Header() {
1111
}, [lang, i18n]);
1212

1313
return (
14-
<div className="flex items-center gap-2">
14+
<div className="flex items-center gap-2 whitespace-nowrap">
1515
<div
1616
role="group"
1717
aria-label={t('header.language')}
18-
className="flex overflow-hidden rounded border text-xs"
18+
className="flex overflow-hidden rounded border text-xs whitespace-nowrap"
1919
>
2020
<button
2121
type="button"
2222
onClick={() => setLang('zh')}
2323
aria-pressed={lang === 'zh'}
24-
className={`px-2 py-1 transition-colors focus:outline-none ${
24+
className={`px-2 py-1 transition-colors focus:outline-none whitespace-nowrap ${
2525
lang === 'zh'
2626
? 'bg-blue-500 text-white'
2727
: 'bg-white text-gray-700 dark:bg-gray-800 dark:text-gray-300'
@@ -33,7 +33,7 @@ export function Header() {
3333
type="button"
3434
onClick={() => setLang('en')}
3535
aria-pressed={lang === 'en'}
36-
className={`px-2 py-1 transition-colors focus:outline-none ${
36+
className={`px-2 py-1 transition-colors focus:outline-none whitespace-nowrap ${
3737
lang === 'en'
3838
? 'bg-blue-500 text-white'
3939
: 'bg-white text-gray-700 dark:bg-gray-800 dark:text-gray-300'

0 commit comments

Comments
 (0)