Anonymous

Changes

From Polyphasic Sleep Wiki
no edit summary
Line 135: Line 135:  
}
 
}
   −
/* Default style for navigation boxes */
+
/* ====================
.navbox {                     /* Navbox container style */
+
        navboxes
box-sizing: border-box;
+
  ==================== */
border: 1px solid #a2a9b1;
+
 
width: 100%;
+
@navbox-indent: .85em;
clear: both;
+
@navbox-border: darken( @mystic, 5% );
font-size: 88%;
+
 
text-align: center;
+
.navbox {
padding: 1px;
+
    border: 1px solid @navbox-border;
margin: 1em auto 0;      /* Prevent preceding content from clinging to navboxes */
+
    box-shadow: @box-shadow;
 +
    font-size: .85em;
 +
 
 +
    // get rid of stray default mobile css
 +
    .content & ul {
 +
        padding-left: 0;
 +
 
 +
        li {
 +
        margin-bottom: 0;
 +
        }
 +
 
 +
    }
 +
 
 +
@media screen and (max-width: 719px) {
 +
 
 +
    td,
 +
    th,
 +
tr,
 +
tbody,
 +
.navbox-subgroup {
 +
    display: block;
 +
}
 +
 
 +
}
 +
 
 +
@media screen and (min-width: 720px) {
 +
 
 +
.content table&,
 +
.content & table {
 +
width: 100% !important;
 +
}
 +
 
 +
}
 +
 
 +
.navbox-subgroup {
 +
margin: 0;
 +
}
 +
 
 +
.navbar {
 +
display: none;
 +
}
 +
 
 +
//hide images to improve performance
 +
.pic-link,
 +
.chathead-link,
 +
img {
 +
display: none;
 +
}
 +
 
 
}
 
}
.navbox .navbox {
+
 
margin-top: 0;           /* No top margin for nested navboxes */
+
// main navbox heading
 +
.navbox-title {
 +
    color: @white;
 +
    background-color: @steel-blue;
 +
    font-size: 140%;
 +
    font-weight: bold;
 +
    text-align: center;
 +
    padding: .25em 0;
 +
 
 +
    a,
 +
    a:not([href]) /* selflinks */ {
 +
    color: @white !important;
 +
    }
 +
 
 +
@media screen and (min-width: 720px) {
 +
border-bottom: 1px solid @navbox-border;
 +
}
 +
 
 
}
 
}
.navbox + .navbox {
+
 
margin-top: -1px;         /* Single pixel border between adjacent navboxes */
+
// group headings
 +
.navbox-group-title {
 +
    background-color: lighten( @loblolly, 5% );
 +
    font-weight: bold;
 +
    padding: .2em @navbox-indent;
 +
 
 +
    // truncate header
 +
@media screen and (max-width: 719px) {
 +
    overflow: hidden;
 +
    white-space: nowrap;
 +
    text-overflow: ellipsis;
 +
}
 +
 
 +
@media screen and (min-width: 720px) {
 +
border: 1px solid @navbox-border;
 +
border-width: 0 1px 1px 0;
 +
width: 12vw;
 +
}
 +
 
 
}
 
}
.navbox-inner,
+
 
.navbox-subgroup {
+
// hide title for half-normal-half-subgroup groups
width: 100%;
+
.navbox-group-title-hidden {
}
+
display: none;
.navbox-group,
  −
.navbox-title,
  −
.navbox-abovebelow {
  −
padding: 0.25em 1em;      /* Title, group and above/below styles */
  −
line-height: 1.5em;
  −
text-align: center;
  −
}
  −
th.navbox-group {            /* Group style */
  −
white-space: nowrap;
  −
/* @noflip */
  −
text-align: right;
  −
}
  −
.navbox,
  −
.navbox-subgroup {
  −
background-color: #fdfdfd; /* Background color */
   
}
 
}
 +
 
.navbox-list {
 
.navbox-list {
line-height: 1.5em;
+
padding: 0;
border-color: #fdfdfd;   /* Must match background color */
+
position: relative; // needed for ::after
 +
 
 +
@media screen and (min-width: 720px) {
 +
border-bottom: 1px solid @navbox-border;
 +
}
 +
 
 +
ul {
 +
 
 +
@media screen and (max-width: 719px) {
 +
white-space: nowrap;
 +
overflow-x: auto; // don't combine these into one overflow:
 +
overflow-y: hidden;
 +
-webkit-overflow-scrolling: touch; // for inertia scrolling
 +
}
 +
 
 +
@media screen and (min-width: 720px) {
 +
padding: .2em @navbox-indent .5em !important;
 +
}
 +
 
 +
}
 +
 
 +
li {
 +
    display: inline-flex;
 +
    align-items: center;
 +
    height: 3.5em;
 +
    margin: 0 0 0 @navbox-indent;
 +
 
 +
@media screen and (min-width: 720px) {
 +
height: 2.1em;
 +
 
 +
&:first-child {
 +
margin-left: 0;
 +
}
 +
 
 +
}
 +
 
 +
    & + li {
 +
        margin-left: .5em;
 +
    }
 +
 
 +
    // create separator between links
 +
    & + li > a::before {
 +
content: '•';
 +
display: inline-block;
 +
white-space: pre-wrap;
 +
        position: relative;
 +
        left: -@navbox-indent / 2;
 +
        color: @gray-chateau;
 +
pointer-events: none;
 +
    }
 +
 
 +
    // for list items that use [[File: instead of plink/chatl,
 +
// hide the second interpunct
 +
    & + li > a + a::before {
 +
    display: none;
 +
    }
 +
 
 +
    &:last-child {
 +
        margin-right: 2em;
 +
    }
 +
 
 +
}
 +
 
 +
// gradient fade to indicate more content
 +
// <https://stackoverflow.com/questions/35801932/>
 +
&::after {
 +
content: '';
 +
display: block;
 +
position: absolute;
 +
background-image: linear-gradient(to right, fade( @white, 0% ), @white 95%, @white );
 +
height: 100%;
 +
width: 2.5em;
 +
top: 0;
 +
right: 0;
 +
pointer-events: none;
 +
 
 +
@media screen and (min-width: 720px) {
 +
display: none;
 +
}
 +
 
 +
}
 +
 
 +
// for lists with subgroups as children instead of actual items
 +
&.navbox-parent {
 +
border-bottom: 0;
 +
padding: 0;
 +
 
 +
&::after {
 +
display: none;
 +
}
 +
 
 +
}
 +
 
 
}
 
}
/* cell spacing for navbox cells */
+
 
tr + tr > .navbox-abovebelow,
+
// nested groups
tr + tr > .navbox-group,
+
.navbox-group {
tr + tr > .navbox-image,
+
 
tr + tr > .navbox-list {   /* Borders above 2nd, 3rd, etc. rows */
+
    // two levels deep
border-top: 2px solid #fdfdfd; /* Must match background color */
+
    & & {
}
+
 
.navbox th,
+
        .navbox-group-title {
.navbox-title {
+
            background-color: @mystic;
background-color: #ccccff;     /* Level 1 color */
+
            padding: 0 @navbox-indent 0 @navbox-indent * 2;
}
+
 
.navbox-abovebelow,
+
@media screen and (min-width: 720px) {
th.navbox-group,
+
padding-left: @navbox-indent;
.navbox-subgroup .navbox-title {
+
}
background-color: #ddddff;     /* Level 2 color */
+
 
}
+
        }
.navbox-subgroup .navbox-group,
+
 
.navbox-subgroup .navbox-abovebelow {
+
        .navbox-list {
background-color: #e6e6ff;     /* Level 3 color */
+
 
}
+
        ul {
.navbox-even {
+
        padding-left: @navbox-indent * 2;
background-color: #f7f7f7;     /* Even row striping */
+
        }
}
+
 
.navbox-odd {
+
            li {
background-color: transparent; /* Odd row striping */
+
            margin-bottom: 0;
}
+
 
.navbox .hlist td dl,
+
// realign first list item with heading
.navbox .hlist td ol,
+
            &:first-child {
.navbox .hlist td ul,
+
            margin-left: 0;
.navbox td.hlist dl,
+
            }
.navbox td.hlist ol,
+
 
.navbox td.hlist ul {
+
            }
padding: 0.125em 0;       /* Adjust hlist padding in navboxes */
+
 
 +
        }
 +
 
 +
// fake only one level of indentation
 +
&.navbox-group-split .navbox-list ul {
 +
padding-left: @navbox-indent;
 +
}
 +
 
 +
    }
 +
 
 +
    // three levels deep
 +
    & & & {
 +
 
 +
        &:first-child .navbox-group-title {
 +
            padding-top: .5em;
 +
 
 +
@media screen and (min-width: 720px) {
 +
padding-top: 0;
 +
}
 +
 
 +
        }
 +
 
 +
        .navbox-group-title {
 +
            background-color: transparent;
 +
            padding-left: @navbox-indent * 3;
 +
 
 +
@media screen and (min-width: 720px) {
 +
background-color: desaturate( lighten( @mystic, 3% ), 2% );
 +
padding-left: @navbox-indent;
 +
}
 +
 
 +
        }
 +
       
 +
        .navbox-list ul {
 +
    padding-left: @navbox-indent * 3;
 +
    }
 +
 
 +
// fake only two levels of indentation
 +
&.navbox-group-split .navbox-list ul {
 +
padding-left: @navbox-indent * 2;
 +
}
 +
 
 +
    }
 +
   
 
}
 
}
   −
/* Default styling for Navbar template */
  −
.navbar {
  −
display: inline;
  −
font-size: 88%;
  −
font-weight: normal;
  −
}
  −
.navbar ul {
  −
display: inline-block;
  −
white-space: nowrap;
  −
}
  −
.mw-body-content .navbar ul {
  −
line-height: inherit;
  −
}
  −
.navbar li {
  −
word-spacing: -0.125em;
  −
}
  −
.navbar.mini li abbr[title] {
  −
font-variant: small-caps;
  −
border-bottom: none;
  −
text-decoration: none;
  −
cursor: inherit;
  −
}
  −
/* Navbar styling when nested in infobox and navbox */
  −
.infobox .navbar {
  −
font-size: 100%;
  −
}
  −
.navbox .navbar {
  −
display: block;
  −
font-size: 100%;
  −
}
  −
.navbox-title .navbar {
  −
/* @noflip */
  −
float: left;
  −
/* @noflip */
  −
text-align: left;
  −
/* @noflip */
  −
margin-right: 0.5em;
  −
}
      
/* Styling for JQuery makeCollapsible, matching that of collapseButton */
 
/* Styling for JQuery makeCollapsible, matching that of collapseButton */
2,083

edits