/*---------------------------------------------*/ /*NAVBAR*/ nav { border-bottom: 1px solid var(--color-lines-4); } nav * { display: flex; flex-direction: row; margin: auto; height: 100%; } /* nav_left is used for links to pages*/ nav .nav_left { margin-left: 0px; } nav .nav_left a { padding: 0px 20px; } nav .nav_left #nav_logo { padding-left: 40px; padding-right: 40px; } nav a p { /*to center vertically the text*/ height: auto; } nav .nav_left img { height: calc(100% - 4px); } nav a:not(#nav_logo):hover, nav a:not(#nav_logo):focus { background-color: var(--color-back-dark); } /* nav_right is used for actions such as connection, search or language*/ nav .nav_right { margin-right: 2px; } /*---------------------------------------------*/ /*DROPDOWN*/ /* .dropdown .drop_title .drop .drop_items .drop .drop */ nav .nav_right .dropdown { position: relative; height: 100%; flex-direction: column; } nav .nav_right .dropdown .drop { position: relative; padding: 0px 20px; background-color: var(--color-back-base); } nav .nav_right .dropdown .drop_items { position: absolute; top: 100%; left: 0px; height: 100%; flex-direction: column; display: none; } /* horizontal space between flag and name*/ nav .nav_right .dropdown .drop > * { margin: auto 3px; } /*flag size*/ nav .nav_right .dropdown img.flag { height: 12px; } /*flag size*/ nav .nav_right .dropdown .drop p { font-size: 1.6em; } /*the menu appears when focus on an element inside*/ nav .nav_right .dropdown:focus-within * { display: flex; } /*a rectangle cover the div when focus, so you can click on it to unfocus*/ nav .nav_right .dropdown:focus-within:after { content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; } /*the little arrow point down*/ nav .nav_right .dropdown .drop_title:after { content: "▼"; /* ▲ */ content: "v"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); } /*the little arrow point up*/ nav .nav_right .dropdown .drop_title:focus:after { transform: rotate(180deg) translateY(20%); }