// ===================================================================================== // // header_02 // // ===================================================================================== @use 'sass:math'; @use 'scss/global' as g; @use 'scss/components/btn'; // ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ // Roots外スタイル // - ヘッダーをposition:fixedにするため全体枠に余白を作る // - 例外的にRoots外のスタイリング(=ルール違反)を許容するか、該当の.scssへコピーしてください // ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ .all { padding-top: 53px; @include g.mq(tablet, pc) { padding-top: 53px; } } // ------------------------------------------------------------------------------------- // 変数 // ------------------------------------------------------------------------------------- // スマホナビ展開アニメーションの継続時間 $duration: 0.3s; // スマホナビ展開アニメーションのイージング $easing: g.$ease_out_cubic; // スマホナビ展開ボタンの継続時間 $btn_duration: 0.3s; // スマホナビ展開ボタンのイージング $btn_easing: g.$ease_out_expo; // ------------------------------------------------------------------------------------- // ヘッダー全体 // ------------------------------------------------------------------------------------- .header_02 { position: fixed; top: 0; left: 0; display: flex; justify-content: space-between; width: 100%; height: 53px; padding: 0 0 0 15px; @include g.mq(tablet, pc) { height: 70px; padding-left: 24px; } } // ------------------------------------------------------------------------------------- // ヘッダー全体 > ロゴ // ------------------------------------------------------------------------------------- .header_02--logo { width: 44px; margin: 20px 0 0; @include g.mq(tablet, pc) { width: 90px; } img { display: block; width: 100%; } } // ------------------------------------------------------------------------------------- // ヘッダー全体 > ナビゲーション全体 // ------------------------------------------------------------------------------------- .header_02--nav { position: fixed; top: 0; left: 0; display: none; width: 100%; height: 100%; padding: 60px; overflow-x: hidden; background: #dbdbdb; @include g.mq(tablet, pc) { position: relative; display: flex; align-items: center; width: auto; padding: 0; overflow-y: visible; background: transparent; } &.is_open { display: block; } &.header_02-close_anim { display: block; animation: header_nav_toggle math.div($duration, 2) $easing reverse; } &.header_02-open_anim { display: block; animation: header_nav_toggle $duration $easing; } } @keyframes header_nav_toggle { 0% { opacity: 0; transform: scale(0.98); } 100% { opacity: 1; transform: scale(1); } } // ------------------------------------------------------------------------------------- // ヘッダー全体 > ナビゲーション全体 > スマホメニュー閉じるボタン // ------------------------------------------------------------------------------------- .header_02--nav_close_btn { position: absolute; top: 0; right: 0; box-sizing: border-box; display: inline-block; width: 52px; height: 52px; cursor: pointer; @include g.mq(tablet, pc) { display: none; } span { position: absolute; top: 23px; left: 17px; box-sizing: border-box; display: inline-block; width: 20px; height: 2px; background-color: g.$color_primary; transition: all $btn_duration $btn_easing; &:nth-of-type(1) { transform: rotate(45deg); } &:nth-of-type(2) { transform: rotate(-45deg); } } } // ------------------------------------------------------------------------------------- // ヘッダー全体 > ナビゲーション全体 > リンク // ------------------------------------------------------------------------------------- .header_02--links { margin: 0 0 70px; border-top: 1px solid #707070; @include g.mq(tablet, pc) { margin: 0; border: none; } } .header_02--links_item { border-bottom: 1px solid #707070; @include g.mq(tablet, pc) { display: inline-block; margin: 0 32px 0 0; border: none; } @include g.mq(tablet) { margin-right: 24px; } a { position: relative; display: block; padding: 16px 20px; color: g.$color_text_base; text-align: left; background-image: url('data:image/svg+xml;charset=UTF-8,'); background-repeat: no-repeat; background-position: right 16px top 50%; background-size: 12px 12px; @include g.mq(tablet, pc) { display: inline-block; padding: 0; background: none; } } } // ------------------------------------------------------------------------------------- // ヘッダー全体 > ナビゲーション全体 > Call to Action // ------------------------------------------------------------------------------------- .header_02--cta { text-align: center; } // ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ // 他のRootsの拡張はルール違反だが、一旦そのまま(ルールの方を見直したほうが良さそうなため) // ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ .header_02--cta_btn { @extend .btn, .btn-s; outline: none; } .header_02--cta_btn_primary { @extend .btn, .btn-auto, .btn-primary; height: 70px; padding-top: 0; padding-bottom: 0; line-height: 70px; } // ------------------------------------------------------------------------------------- // ヘッダー全体 > スマホメニュー展開ボタン // ------------------------------------------------------------------------------------- .header_02--nav_open_btn { position: relative; box-sizing: border-box; display: inline-block; width: 52px; height: 52px; cursor: pointer; background: g.$color_primary; transition: all $btn_duration $btn_easing; @include g.mq(tablet, pc) { display: none; } span { position: absolute; left: 16px; box-sizing: border-box; display: inline-block; width: 20px; height: 2px; background-color: #fff; transition: all $btn_duration $btn_easing; &:nth-of-type(1) { top: 17px; } &:nth-of-type(2) { top: 25px; opacity: 1; } &:nth-of-type(3) { bottom: 17px; } } }