dokuwiki-template-sprintdoc.../css/area_main-sidebar-nav.less
2017-03-23 12:59:44 +01:00

271 lines
6.5 KiB
Text
Executable file

/**
* This file provides the design styles the navigational elements in the sidebar
*
* @author Jana Deutschlaender <deutschlaender@cosmocode.de>
* @author Andreas Gohr <gohr@cosmocode.de>
*/
#dokuwiki__aside {
@icon-size: @font-size-big;
@menu-margin: @icon-size + @margin-small*2; // FIXME this is still wrong
> * {
margin-left: @menu-margin; // moves *all* sidebar content to the right
}
a {
&:link,
&:visited {
opacity: .9;
color: @ini_nav_menu_color;
}
* {
color: inherit;
}
}
// the toggle element
a.nav {
cursor: pointer;
display: flex;
display: -ms-flexbox;
flex-direction: row;
-ms-flex-direction: row;
align-items: center;
height: @icon-size + @margin-small;
opacity: 1;
border: 1px solid transparent;
border-radius: @fix_border-radius;
color: @ini_nav_menu_color;
font-size: @font-size-head6;
font-weight: normal;
margin: -1px 0 (@font-size-head6 / 2) (@menu-margin * -1); // moves the toggles back to the left
transition: @transition color, @transition background-color, @transition border-color;
span {
display: inline-block;
vertical-align: middle;
color: inherit;
}
span.lbl {
flex-grow: 1;
}
span.ico {
width: @menu-margin;
height: @icon-size;
flex-grow: 0;
border-right: 1px solid @ini_border;
text-align: center;
margin-right: @margin-small;
color: inherit;
// simple fake icon
strong {
display: inline-block;
font-size: @icon-size * 0.5;
width: @icon-size * 0.9;
height: @icon-size * 0.9;
line-height: @icon-size * 0.9;
margin: @icon-size * 0.05;
vertical-align: baseline;
text-align: center;
color: inherit;
border: 2px solid @ini_nav_menu_color;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
}
// real icon
svg {
width: @icon-size;
height: @icon-size;
path {
fill: @ini_nav_menu_color;
transition: @transition all;
}
}
}
&:hover,
&:focus,
&:active {
background-color: @ini_nav_menu_hover_bg;
border-color: @ini_nav_menu_hover_color;
color: @ini_nav_menu_hover_color;
text-decoration: none;
span.ico {
strong {
border-color: @ini_nav_menu_hover_bg;
}
svg {
path {
fill: @ini_nav_menu_hover_color;
}
}
}
}
}
// the panel (hidden by default)
div.nav-panel {
display: none;
margin-top: .5rem;
ul {
margin-bottom: 1rem;
}
}
}
/* + + + + + + wide page content + + + + +
.wide-content {
#dokuwiki__aside {
a.nav {
position: relative;
&::after {
content: '';
position: absolute;
bottom: -1px;
left: 0;
width: 100%;
height: 1px;
border-bottom: solid 1px @ini_border;
}
&:hover,
&:focus,
&:active {
&::after {
display: none;
}
}
}
}
} */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* min-width: 1440px */
@media @screen_min-xlg {
#dokuwiki__aside {
nav {
li:not([class]),
.li {
font-size: @font-size-head6;
padding: .15em 0;
* {
font-size: inherit;
font-weight: inherit;
}
a {
font-size: (@font-size-head6 - .05);
}
}
}
}
}
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* max-width: 1023px */
@media @screen_max-md {
// hide on medium and smaller screens
#dokuwiki__aside {
display: none;
}
// show when toggled
body.show-mobile-sidebar {
.search.main-sidebar {
display: block !important;
position: relative;
form {
margin-bottom: 1rem;
.no {
display: block;
}
}
}
#dokuwiki__aside {
display: block !important;
position: absolute;
left: 1.25rem; //left margin of content container
z-index: 200; // above all
box-shadow: @box-shadow-right-bottom;
min-width: 45%;
max-width: 90%;
height: auto;
&:after {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
background: @ini_background;
background: -webkit-linear-gradient(left, @ini_background, @color-content-bg);
background: linear-gradient(left, @ini_background, @color-content-bg);
z-index: 0;
}
> nav {
position: relative;
z-index: 2;
&:first-child {
margin-top: 1.2rem;
}
}
a.nav {
border-radius: 0;
border-right-width: 0;
border-left-width: 0;
}
.nav-panel,
a.nav {
padding-right: .8em;
}
}
}
}
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* max-width: 1439px */
@media @screen_max-xlg {
#dokuwiki__aside {
nav {
li:not([class]),
.li {
font-size: @font-size-default;
padding: .15em 0 .15em .25rem;
* {
font-size: inherit;
font-weight: inherit;
}
}
}
}
}