113 lines
2.2 KiB
CSS
113 lines
2.2 KiB
CSS
|
|
/*---------------------------------------------*/
|
|
/*NAVBAR*/
|
|
.navbar {
|
|
flex-direction: row;
|
|
/*we have to set the height to use the height % for childs elements*/
|
|
height: var(--nav-height);
|
|
background-color: var(--color-back-base);
|
|
}
|
|
.navbar * {
|
|
display: flex;
|
|
flex-direction: row;
|
|
margin: auto;
|
|
height: 100%;
|
|
}
|
|
/* nav_left is used for links to pages*/
|
|
.navbar .nav_left {
|
|
margin-left: 0px;
|
|
}
|
|
.navbar .nav_left a {
|
|
padding: 0px 20px;
|
|
}
|
|
.navbar .nav_left #nav_logo {
|
|
padding-left: 40px;
|
|
padding-right: 40px;
|
|
}
|
|
.navbar a p {
|
|
/*to center vertically the text*/
|
|
height: auto;
|
|
}
|
|
.navbar .nav_left img {
|
|
height: calc(100% - 4px);
|
|
}
|
|
.navbar 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*/
|
|
.navbar .nav_right {
|
|
margin-right: 2px;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*---------------------------------------------*/
|
|
/*DROPDOWN*/
|
|
/*
|
|
.dropdown
|
|
.drop_title .drop
|
|
.drop_items
|
|
.drop
|
|
.drop
|
|
*/
|
|
.navbar .nav_right .dropdown {
|
|
position: relative;
|
|
height: 100%;
|
|
flex-direction: column;
|
|
}
|
|
.navbar .nav_right .dropdown .drop {
|
|
position: relative;
|
|
padding: 0px 20px;
|
|
background-color: var(--color-back-base);
|
|
}
|
|
.navbar .nav_right .dropdown .drop_items {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0px;
|
|
height: 100%;
|
|
flex-direction: column;
|
|
display: none;
|
|
}
|
|
/* horizontal space between flag and name*/
|
|
.navbar .nav_right .dropdown .drop > * {
|
|
margin: auto 3px;
|
|
}
|
|
/*flag size*/
|
|
.navbar .nav_right .dropdown img.flag {
|
|
height: 12px;
|
|
}
|
|
/*flag size*/
|
|
.navbar .nav_right .dropdown .drop p {
|
|
font-size: 1.6em;
|
|
}
|
|
/*the menu appears when focus on an element inside*/
|
|
.navbar .nav_right .dropdown:focus-within * {
|
|
display: flex;
|
|
}
|
|
/*a rectangle cover the div when focus, so you can click on it to unfocus*/
|
|
.navbar .nav_right .dropdown:focus-within:after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
/*the little arrow point down*/
|
|
.navbar .nav_right .dropdown .drop_title:after {
|
|
content: "▼"; /* ▲ */
|
|
content: "v";
|
|
position: absolute;
|
|
right: 10px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
}
|
|
/*the little arrow point up*/
|
|
.navbar .nav_right .dropdown .drop_title:focus:after {
|
|
transform: rotate(180deg) translateY(20%);
|
|
}
|
|
|