Upgrade Slate sample to Slate 2.7.1

Closes gh-693
This commit is contained in:
Andy Wilkinson
2020-09-02 10:56:05 +01:00
parent 536e87acc9
commit 9fa94022d2
40 changed files with 13461 additions and 11622 deletions

View File

@@ -2,6 +2,7 @@
@import 'normalize';
@import 'variables';
@import 'icon-font';
// @import 'rtl'; // uncomment to switch to RTL format
/*
Copyright 2008-2013 Concur Technologies, Inc.
@@ -10,7 +11,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
@@ -46,16 +47,7 @@ html, body {
width: 20px;
}
@mixin embossed-bg {
background:
linear-gradient(to bottom, rgba(#000, 0.2), rgba(#000, 0) 8px),
linear-gradient(to top, rgba(#000, 0.2), rgba(#000, 0) 8px),
linear-gradient(to bottom, rgba($nav-embossed-border-top, 1), rgba($nav-embossed-border-top, 0) 1.5px),
linear-gradient(to top, rgba($nav-embossed-border-bottom, 1), rgba($nav-embossed-border-bottom, 0) 1.5px),
$nav-subitem-bg;
}
.tocify-wrapper {
.toc-wrapper {
transition: left 0.3s ease-in-out;
overflow-y: auto;
@@ -80,9 +72,10 @@ html, body {
}
// This is the logo at the top of the ToC
&>img {
.logo {
display: block;
max-width: 100%;
margin-bottom: $logo-margin;
}
&>.search {
@@ -95,7 +88,7 @@ html, body {
padding: 6px 0 6px 20px;
box-sizing: border-box;
margin: $nav-v-padding $nav-padding;
width: $nav-width - 30;
width: $nav-width - ($nav-padding*2);
outline: none;
color: $nav-text;
border-radius: 0; /* ios has a default border radius */
@@ -110,10 +103,6 @@ html, body {
}
}
img+.tocify, .lang-selector+.tocify {
margin-top: $logo-margin;
}
.search-results {
margin-top: 0;
box-sizing: border-box;
@@ -123,13 +112,12 @@ html, body {
transition-property: height, margin;
transition-duration: 180ms;
transition-timing-function: ease-in-out;
background: $nav-subitem-bg;
&.visible {
height: 30%;
margin-bottom: 1em;
}
@include embossed-bg;
li {
margin: 1em $nav-padding;
line-height: 1;
@@ -146,14 +134,6 @@ html, body {
}
.tocify-item>a, .toc-footer li {
padding: 0 $nav-padding 0 $nav-padding;
display: block;
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
// The Table of Contents is composed of multiple nested
// unordered lists. These styles remove the default
// styling of an unordered list because it is ugly.
@@ -168,32 +148,30 @@ html, body {
color: $nav-text;
transition-property: background;
transition-timing-function: linear;
transition-duration: 230ms;
transition-duration: 200ms;
}
// This is the currently selected ToC entry
.tocify-focus {
box-shadow: 0px 1px 0px $nav-active-shadow;
.toc-link.active {
background-color: $nav-active-bg;
color: $nav-active-text;
}
// Subheaders are the submenus that slide open
// in the table of contents.
.tocify-subheader {
display: none; // tocify will override this when needed
// this is parent links of the currently selected ToC entry
.toc-link.active-parent {
background-color: $nav-active-parent-bg;
color: $nav-active-parent-text;
}
.toc-list-h2 {
display: none;
background-color: $nav-subitem-bg;
font-weight: 500;
.tocify-item>a {
padding-left: $nav-padding + $nav-indent;
font-size: 12px;
}
}
// for embossed look:
@include embossed-bg;
&>li:last-child {
box-shadow: none; // otherwise it'll overflow out of the subheader
}
.toc-h2 {
padding-left: $nav-padding + $nav-indent;
font-size: 12px;
}
.toc-footer {
@@ -216,7 +194,19 @@ html, body {
text-decoration: none;
}
}
}
.toc-link, .toc-footer li {
padding: 0 $nav-padding 0 $nav-padding;
display: block;
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-decoration: none;
color: $nav-text;
transition-property: background;
transition-timing-function: linear;
transition-duration: 130ms;
}
// button to show navigation on mobile devices
@@ -288,12 +278,13 @@ html, body {
}
.lang-selector {
display: flex;
background-color: $lang-select-bg;
width: 100%;
font-weight: bold;
overflow-x: auto;
a {
display: block;
float:left;
display: inline;
color: $lang-select-text;
text-decoration: none;
padding: 0 10px;
@@ -324,6 +315,8 @@ html, body {
// This is all the stuff with the light background in the left half of the page
.content {
// fixes webkit rendering bug for some: see #538
-webkit-transform: translateZ(0);
// to place content above the dark box
position: relative;
z-index: 30;
@@ -339,7 +332,6 @@ html, body {
padding: 0 $main-padding;
box-sizing: border-box;
display: block;
text-shadow: $main-embossed-text-shadow;
@extend %left-col;
}
@@ -355,14 +347,14 @@ html, body {
h1 {
@extend %header-font;
font-size: 30px;
font-size: 25px;
padding-top: 0.5em;
padding-bottom: 0.5em;
border-bottom: 1px solid #ccc;
margin-bottom: $h1-margin-bottom;
margin-top: 2em;
border-top: 1px solid #ddd;
background-image: linear-gradient(to bottom, #fff, #f9f9f9);
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
background-color: #fdfdfd;
}
h1:first-child, div:first-child + h1 {
@@ -372,13 +364,13 @@ html, body {
h2 {
@extend %header-font;
font-size: 20px;
font-size: 19px;
margin-top: 4em;
margin-bottom: 0;
border-top: 1px solid #ccc;
padding-top: 1.2em;
padding-bottom: 1.2em;
background-image: linear-gradient(to bottom, rgba(#fff, 0.4), rgba(#fff, 0));
background-image: linear-gradient(to bottom, rgba(#fff, 0.2), rgba(#fff, 0));
}
// h2s right after h1s should bump right up
@@ -412,6 +404,9 @@ html, body {
text-align: left;
vertical-align: top;
line-height: 1.6;
code {
white-space: nowrap;
}
}
th {
@@ -470,7 +465,6 @@ html, body {
aside {
padding-top: 1em;
padding-bottom: 1em;
text-shadow: 0 1px 0 lighten($aside-notice-bg, 15%);
margin-top: 1.5em;
margin-bottom: 1.5em;
background: $aside-notice-bg;
@@ -478,12 +472,10 @@ html, body {
&.warning {
background-color: $aside-warning-bg;
text-shadow: 0 1px 0 lighten($aside-warning-bg, 15%);
}
&.success {
background-color: $aside-success-bg;
text-shadow: 0 1px 0 lighten($aside-success-bg, 15%);
}
}
@@ -507,10 +499,9 @@ html, body {
.search-highlight {
padding: 2px;
margin: -2px;
margin: -3px;
border-radius: 4px;
border: 1px solid #F7E633;
text-shadow: 1px 1px 0 #666;
background: linear-gradient(to top left, #F7E633 0%, #F1D32F 100%);
}
}
@@ -521,11 +512,14 @@ html, body {
// This is all the stuff that appears in the right half of the page
.content {
&>div.highlight {
clear:none;
}
pre, blockquote {
background-color: $code-bg;
color: #fff;
padding: 2em $main-padding;
margin: 0;
width: $examples-width;
@@ -533,7 +527,6 @@ html, body {
clear:right;
box-sizing: border-box;
text-shadow: 0px 1px 2px rgba(0,0,0,0.4);
@extend %right-col;
@@ -548,16 +541,16 @@ html, body {
pre {
@extend %code-font;
padding-top: 2em;
padding-bottom: 2em;
padding: 2em $main-padding;
}
blockquote {
&>p {
background-color: $code-annotation-bg;
border-radius: 5px;
padding: $code-annotation-padding;
color: #ccc;
border-top: 1px solid #000;
border-bottom: 1px solid #404040;
padding: $code-annotation-padding 2em;
color: #eee;
}
}
}
@@ -569,7 +562,7 @@ html, body {
// There are also a couple styles disperesed
@media (max-width: $tablet-width) {
.tocify-wrapper {
.toc-wrapper {
left: -$nav-width;
&.open {
@@ -585,7 +578,7 @@ html, body {
display: block;
}
.tocify-wrapper .tocify-item > a {
.toc-link {
padding-top: 0.3em;
padding-bottom: 0.3em;
}
@@ -600,7 +593,7 @@ html, body {
margin-right: 0;
}
.tocify-wrapper .lang-selector {
.toc-wrapper .lang-selector {
display: block;
}
@@ -625,3 +618,16 @@ html, body {
.highlight, .highlight .w {
background-color: $code-bg;
}
.copy-clipboard {
float: right;
fill: #9DAAB6;
cursor: pointer;
opacity: 0.4;
height: 18px;
width: 18px;
}
.copy-clipboard:hover {
opacity: 0.8;
}