You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
devdocs/assets/stylesheets/components/_content.scss

467 lines
7.3 KiB

11 years ago
//
// Content
//
._container {
position: relative;
z-index: $contentZ;
height: 100%;
margin-left: $sidebarWidth;
pointer-events: none;
@extend %border-box;
@media #{$mediumScreen} { margin-left: $sidebarMediumWidth; }
._sidebar-hidden & { margin-left: 0; }
body:not(._native-scrollbars) & { -webkit-margin-end: -1px; }
11 years ago
}
._content {
position: relative;
height: 100%;
overflow-y: scroll;
10 years ago
margin-left: .875rem;
8 years ago
padding: 1.125rem 1.5rem 0;
11 years ago
font-size: .875rem;
pointer-events: auto;
-webkit-overflow-scrolling: touch;
@extend %border-box;
8 years ago
._sidebar-hidden &:before {
content: '';
display: block;
margin-top: $headerHeight;
}
._overlay-scrollbars & { padding-left: .625rem; }
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { margin-left: 0; }
@supports (-ms-overflow-style: none) { margin-left: 0; }
10 years ago
body:not(._native-scrollbars) & {
-webkit-padding-start: .625rem;
-webkit-padding-end: .75rem;
10 years ago
}
11 years ago
}
%loading {
content: 'Loading\2026';
position: absolute;
top: 50%;
left: 0;
right: 0;
line-height: 1;
margin-top: -.6em;
font-size: 4rem;
font-weight: 300;
letter-spacing: -.125rem;
color: $loadingText;
text-align: center;
cursor: default;
}
11 years ago
._content-loading:before {
@extend %loading;
11 years ago
}
//
// Splash screen
//
._splash-title {
10 years ago
color: $splashText;
@extend %loading, %user-select-none;
11 years ago
}
//
// Intro
//
8 years ago
._intro {
8 years ago
display: -ms-flexbox;
8 years ago
display: flex;
8 years ago
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-pack: center;
8 years ago
justify-content: center;
8 years ago
-ms-flex-align: center;
align-items: center;
8 years ago
min-height: calc(100vh - 2.375rem);
._sidebar-hidden & {
min-height: calc(100vh - 2.375rem - #{$headerHeight});
}
}
11 years ago
._intro-message {
max-width: 37rem;
8 years ago
margin: .5rem 0;
11 years ago
padding: 1rem 1.25rem;
@extend %note, %note-green;
}
._intro-hide {
float: right;
line-height: 1.5rem;
cursor: pointer;
}
._intro-title {
margin: 0 0 1rem;
font-size: 1rem;
line-height: 1.5rem;
}
._intro-list {
margin: 1rem 0;
padding-left: 2.25rem;
}
._intro-link { cursor: pointer; }
//
// Error
//
._error {
position: absolute;
top: 50%;
left: 0;
right: 0;
padding: 0 2rem;
line-height: 1.5rem;
text-align: center;
}
._error-title {
margin: -5.5rem 0 1rem;
line-height: 2rem;
11 years ago
font-size: 1.5rem;
}
._error-text {
margin: 0 0 1rem;
color: $textColorLight;
}
._error-links {
font-size: 1rem;
font-weight: $boldFontWeight;
11 years ago
}
._error-link { padding: 0 .5rem; }
//
// Heading
//
._lined-heading,
%lined-heading {
8 years ago
display: flex;
align-items: center;
11 years ago
> * { margin: 0 .3125rem; }
11 years ago
&:after {
content: '';
8 years ago
flex-grow: 1;
11 years ago
height: 1px;
8 years ago
margin-top: .25rem;
11 years ago
margin-left: 1rem;
10 years ago
background: $boxBorderLight;
11 years ago
}
}
8 years ago
._block-heading { @extend %block-heading; }
._heading-links {
float: right;
font-weight: normal;
> a + a { margin-left: .25rem; }
}
11 years ago
//
// Table of contents
//
._toc {
float: right;
max-width: 15em;
margin: .25rem 0 1.5rem 1.5rem;
padding: .625rem 1rem;
11 years ago
@extend %box;
10 years ago
+ h1, + ._lined-heading { margin-top: 0; }
11 years ago
}
._toc-title {
margin: 0 0 .5rem;
11 years ago
font-size: inherit;
font-weight: $boldFontWeight;
11 years ago
}
._toc-list {
margin: 0;
padding: 0 1em 0 0;
list-style: none;
}
._toc-link { @extend %internal-link; }
11 years ago
//
// Static page
//
._static {
padding-bottom: 2em;
> ._lined-heading:first-child { margin-top: 0; }
}
//
// Credits table
//
._credits {
width: 100%;
}
//
// Doc table
//
._docs {
width: 100%;
margin-top: .25rem;
line-height: 1.5rem;
th, td {
width: 1%;
&:first-child { width: auto; }
&:last-child { width: 12rem; }
}
}
._docs-name:before {
float: left;
margin: .25rem .5rem .25rem 0;
@extend %doc-icon;
}
8 years ago
._docs-size {
text-align: right;
> small { color: $textColorLight; }
}
._docs-tools {
8 years ago
display: -ms-flexbox;
display: flex;
8 years ago
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-pack: justify;
justify-content: space-between;
8 years ago
-ms-flex-align: center;
align-items: center;
line-height: 1.5rem;
margin-top: -.5rem;
input[type=checkbox] {
vertical-align: top;
margin: .25rem;
}
}
._docs-links {
8 years ago
-ms-flex: 0 0 auto;
flex: 0 0 auto;
margin: .5rem 0;
padding: .25rem 0;
@extend %box;
._btn-link {
vertical-align: top;
padding: 0 .75rem;
}
._btn-link:not(._show) { display: none; }
._btn-link._show ~ ._btn-link._show { border-left: 1px solid $boxBorder; }
}
11 years ago
//
// News
//
._content {
._news-row {
position: relative;
padding-left: 10em;
font-size: .8125rem;
color: $textColorLight;
+ ._news-row { margin-top: 1em; }
}
._news-title {
display: block;
font-size: .875rem;
color: $textColor;
}
._news-date {
position: absolute;
top: 0;
left: 0;
font-size: .875rem;
}
}
//
// Keyboard shortcuts
//
._shortcuts-title {
width: 16rem;
max-width: 40%;
margin: 2rem 0 1rem;
font-size: 1rem;
text-align: right;
}
._shortcuts-dl { margin: 1rem 0; }
._shortcuts-dt {
float: left;
clear: left;
margin: 0 0 .75rem;
11 years ago
width: 16rem;
max-width: 40%;
font-weight: normal;
text-align: right;
}
._shortcuts-dd {
display: block;
margin: 0 0 .75rem;
padding: 1px 0 1px .75rem;
overflow: hidden;
}
._shortcut-code {
display: inline-block;
vertical-align: top;
padding: 0 .5em;
@extend %label;
}
//
// Search aliases
//
._aliases {
display: flex;
justify-content: space-between;
> table {
margin-top: 0;
width: calc(50% - 0.5rem);
}
}
11 years ago
//
// Utilities
//
._bold { font-weight: $boldFontWeight; }
11 years ago
._note { @extend %note; }
._note-green { @extend %note-green; }
._label { @extend %label; }
._code { @extend %code; }
10 years ago
._highlight { background: $highlightBackground !important; }
11 years ago
._table { width: 100%; }
._mobile ._table { overflow-x: auto; }
._pre-clip {
display: none;
position: absolute;
top: 0;
right: 0;
opacity: .5;
padding: .375rem;
cursor: pointer;
pre:hover > & { display: block; }
&:hover { opacity: 1; }
> svg { @extend %svg-icon; }
@if $style == 'dark' {
> svg { fill: white; }
} @else {
> svg { fill: black; }
}
&._pre-clip-success > svg,
&._pre-clip-error > svg {
display: none;
}
&._pre-clip-success:before { content: 'Copied'; }
&._pre-clip-error:before { content: 'Error'; }
}
._btn {
display: inline-block;
vertical-align: top;
line-height: normal;
white-space: nowrap;
padding: .375rem .675rem;
background-image: linear-gradient(lighten($boxBackground, 4%), darken($boxBackground, 2%));
border: 1px solid $boxBorder;
border-radius: 3px;
box-shadow: 0 1px rgba($boxBorder, .08);
cursor: pointer;
&:active {
background-color: $boxBackground;
box-shadow: inset 0 1px 1px rgba(black, .05), inset 0 1px 4px $boxBorder;
}
}
._file-btn {
position: relative;
overflow: hidden;
> input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
visibility: hidden;
}
}
._btn-link {
line-height: inherit;
color: $linkColor;
text-decoration: $linkTextDecoration;
&:hover {
color: $linkColorHover;
text-decoration: underline;
}
}
._reset-btn,
._reset-btn:hover {
color: $textColorRed;
}
11 years ago
._github-btn {
display: inline-block;
vertical-align: text-top;
margin-left: .25rem;
}