From 8aad5210148792cae75a11f2f619e8c54f160045 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Mon, 6 Jul 2020 12:49:28 +0200 Subject: [PATCH] Fix last menu item tip overflowing out of document --- assets/sass/layout.scss | 46 ++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/assets/sass/layout.scss b/assets/sass/layout.scss index 9aad28f..9c179ec 100644 --- a/assets/sass/layout.scss +++ b/assets/sass/layout.scss @@ -150,26 +150,34 @@ header { } @media (min-width: $menuLayoutSwitchTreshold) { - nav ul li a .tip { - visibility: hidden; - position: absolute; - display: block; - width: max-content; - height: 30px; - padding: 4px 8px; - line-height: 22px; - top: calc(100% + 8px); - left: 50%; - transform: translateX(-50%); + nav ul li { + a .tip { + visibility: hidden; + position: absolute; + display: block; + width: max-content; + height: 30px; + padding: 4px 8px; + line-height: 22px; + top: calc(100% + 8px); + left: 50%; + transform: translateX(-50%); - text-align: center; - font-size: 18px; - color: $defaultTextColor; - opacity: 0; - transition: opacity ease-out 100ms, visibility step-end 150ms; - transition-delay: 0ms; - background-color: #000; - border-radius: 5px; + text-align: center; + font-size: 18px; + color: $defaultTextColor; + opacity: 0; + transition: opacity ease-out 100ms, visibility step-end 150ms; + transition-delay: 0ms; + background-color: #000; + border-radius: 5px; + } + + &:last-child a .tip { + left: unset; + right: 4px; + transform: none; + } } } }