Skip to content

Commit 4450290

Browse files
committed
ハンバーガーレイアウト調整
1 parent 9523e96 commit 4450290

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

assets/css/layout.css

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@
271271
5. ハンバーガーメニュー
272272
========================================================================== */
273273
.nav-toggle {
274+
display: none;
274275
background: none;
275276
border: none;
276277
cursor: pointer;
@@ -310,7 +311,6 @@
310311
top: 8px;
311312
}
312313

313-
/* メニューが開いたときのアニメーション */
314314
.nav-toggle.is-active .nav-toggle__icon {
315315
background: transparent; /* 真ん中の線を消す */
316316
}
@@ -372,44 +372,43 @@
372372
font-size: 0.8rem;
373373
}
374374
.site-header__inner {
375-
flex-direction: row; /* モバイルでもロゴとトグルは横並び */
375+
flex-direction: row;
376376
align-items: center;
377-
justify-content: space-between; /* 両端に配置 */
377+
justify-content: space-between;
378378
padding: 0.75rem 1.25rem;
379379
}
380380

381381
.site-logo {
382-
margin-bottom: 0; /* 元に戻す */
382+
margin-bottom: 0;
383383
}
384384

385385
.nav-toggle {
386-
display: block; /* モバイルで表示 */
386+
display: block;
387387
}
388388

389389
.site-nav {
390-
/* 初期状態ではメニューを非表示 */
391390
display: block;
392391
position: fixed;
393392
top: 0;
394-
left: -100%; /* 画面外に隠す */
393+
left: -100%;
395394
width: 100%;
396395
height: 100vh;
397-
background: var(--color-panel); /* 背景色 */
396+
background: var(--color-panel);
398397
flex-direction: column;
399398
justify-content: center;
400399
align-items: center;
401400
gap: 1.5rem;
402401
transition: left 0.3s ease-in-out;
403-
z-index: 25; /* ヘッダーの下、トグルの上に */
404-
padding-top: 5rem; /* ヘッダー分スペースを確保 */
402+
z-index: 25;
403+
padding-top: 5rem;
405404
}
406405

407406
.site-nav.is-open {
408-
left: 0; /* メニューを開く */
407+
left: 0;
409408
}
410409

411410
.site-nav a {
412-
font-size: 1.5rem; /* メニュー項目の文字サイズを大きく */
411+
font-size: 1.5rem;
413412
padding: 0.75rem 1.5rem;
414413
width: fit-content;
415414
margin: 0 auto;

0 commit comments

Comments
 (0)