mirror of
https://github.com/primer/css.git
synced 2024-11-23 11:27:26 +03:00
370 lines
5.3 KiB
SCSS
370 lines
5.3 KiB
SCSS
---
|
|
# Use a comment to ensure Jekyll reads the file to be transformed into CSS later
|
|
# only main files contain this front matter, not partials.
|
|
---
|
|
|
|
/*
|
|
* Primer documentation styles
|
|
* http://primercss.io
|
|
*
|
|
* Released under MIT license. Copyright 2015 GitHub, Inc.
|
|
*/
|
|
|
|
//
|
|
// Import Primer itself
|
|
//
|
|
|
|
@import "../scss/primer";
|
|
@import "bower_components/octicons/octicons/octicons.css";
|
|
@import "bower_components/primer-user-content/components/markdown";
|
|
@import "css/anchor";
|
|
@import "css/syntax";
|
|
|
|
|
|
//
|
|
// Overrides
|
|
//
|
|
|
|
// Global type
|
|
html {
|
|
font-size: 16px;
|
|
}
|
|
|
|
body {
|
|
font-family: "Helvetica Neue", $body-font;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
// Make containers responsive
|
|
.container {
|
|
width: auto;
|
|
max-width: 1020px;
|
|
padding-left: 20px;
|
|
padding-right: 20px;
|
|
}
|
|
|
|
.markdown-body {
|
|
overflow: visible;
|
|
}
|
|
|
|
|
|
//
|
|
// Custom button
|
|
//
|
|
|
|
.btn-reverse {
|
|
color: $text-white;
|
|
background: none;
|
|
border: 1px solid #fff;
|
|
|
|
&:hover,
|
|
&:active {
|
|
color: $text-blue;
|
|
background: $bg-white;
|
|
border-color: $white;
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
|
|
|
|
//
|
|
// Site header
|
|
//
|
|
|
|
.masthead {
|
|
padding-top: 1rem;
|
|
padding-bottom: 1rem;
|
|
margin-bottom: 1.5rem;
|
|
text-align: center;
|
|
background-color: $bg-blue;
|
|
|
|
a {
|
|
color: rgba(255,255,255,.5);
|
|
|
|
&:hover {
|
|
color: $text-white;
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
|
|
.masthead-logo {
|
|
display: inline-block;
|
|
font-size: 1.5rem;
|
|
color: $text-white;
|
|
|
|
.mega-octicon {
|
|
float: left;
|
|
margin-right: .5rem;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 34em) {
|
|
text-align: left;
|
|
|
|
.masthead-logo {
|
|
float: left;
|
|
}
|
|
}
|
|
}
|
|
|
|
.masthead-nav {
|
|
margin-top: 1rem;
|
|
font-size: 1rem;
|
|
|
|
a {
|
|
display: inline-block;
|
|
|
|
&:not(:last-child) {
|
|
margin-right: 1.25rem;
|
|
}
|
|
}
|
|
|
|
.active {
|
|
color: $text-white;
|
|
font-weight: 500;
|
|
}
|
|
|
|
@media (max-width: 34em) {
|
|
padding-top: 1rem;
|
|
border-top: .075rem solid rgba(255, 255, 255, 0.25);
|
|
}
|
|
|
|
@media (min-width: 34em) {
|
|
float: right;
|
|
margin-top: .5rem;
|
|
}
|
|
}
|
|
|
|
|
|
//
|
|
// Homepage jumbotron
|
|
//
|
|
|
|
.jumbotron {
|
|
margin-top: -2rem;
|
|
margin-bottom: 3rem;
|
|
padding-top: 2rem;
|
|
padding-bottom: 4rem;
|
|
background-color: $bg-blue;
|
|
font-size: 1.25rem;
|
|
color: $text-white;
|
|
text-align: center;
|
|
|
|
h1 {
|
|
font-size: 2.5em;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.btn {
|
|
padding: .75em 1.15em;
|
|
font-size: inherit;
|
|
font-weight: normal;
|
|
line-height: 1;
|
|
}
|
|
|
|
@media (min-width: 34em) {
|
|
padding-top: 6rem;
|
|
padding-bottom: 8rem;
|
|
font-size: 1.5rem;
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
.about-that {
|
|
|
|
@media (max-width: 760px) {
|
|
.column {
|
|
float: none;
|
|
width: 100%;
|
|
margin-bottom: 30px;
|
|
}
|
|
}
|
|
|
|
p {
|
|
padding-right: .5rem;
|
|
color: #555;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
h2 {
|
|
font-weight: normal;
|
|
}
|
|
}
|
|
|
|
|
|
//
|
|
// Layout
|
|
//
|
|
|
|
// Override the default layout to make it stack
|
|
.docs-layout {
|
|
@media (max-width: 34em) {
|
|
> .column {
|
|
float: none;
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
//
|
|
// Footer
|
|
//
|
|
|
|
.footer {
|
|
padding-top: 3rem;
|
|
padding-bottom: 3rem;
|
|
margin-top: 3rem;
|
|
line-height: 1.75;
|
|
color: #7a7a7a;
|
|
border-top: 1px solid #eee;
|
|
|
|
strong {
|
|
color: $text-gray-dark;
|
|
}
|
|
}
|
|
|
|
|
|
//
|
|
// Side menu
|
|
//
|
|
|
|
.docs-menu {
|
|
margin-bottom: 1.5rem;
|
|
font-size: 14px;
|
|
|
|
@media (min-width: 34em) {
|
|
margin-right: 1rem;
|
|
}
|
|
}
|
|
|
|
|
|
//
|
|
// Examples
|
|
//
|
|
|
|
.highlight {
|
|
margin: 0;
|
|
}
|
|
|
|
.docs-example {
|
|
position: relative;
|
|
padding: 15px;
|
|
font-size: 13px;
|
|
line-height: 1.4;
|
|
border: 1px solid #e5e5e5;
|
|
border-radius: .25rem .25rem 0 0;
|
|
|
|
// Undo `.markdown-body`
|
|
p,
|
|
h1, h2, h3, h4, h5, h6 {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
+ .highlight {
|
|
margin-top: -1px;
|
|
border: 1px solid #e5e5e5;
|
|
border-radius: 0 0 .25rem .25rem;
|
|
}
|
|
|
|
> p:last-child,
|
|
> .menu:last-child,
|
|
> .tabnav:last-child,
|
|
> blockquote:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.menu,
|
|
.filter-list,
|
|
.sunken-menu {
|
|
max-width: 200px;
|
|
}
|
|
|
|
// Grid
|
|
.container {
|
|
width: 100%;
|
|
padding-left: $grid-gutter;
|
|
padding-right: $grid-gutter;
|
|
}
|
|
.columns + .columns {
|
|
margin-top: 10px;
|
|
}
|
|
.column {
|
|
padding: $grid-gutter;
|
|
font-family: $mono-font;
|
|
background-color: lighten($green, 40%);
|
|
border: 1px solid lighten($green, 30%);
|
|
}
|
|
|
|
// Override Markdown styles to restore values from `_type.scss`
|
|
ul,
|
|
ol {
|
|
padding-left: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.form-group {
|
|
margin: 15px 0;
|
|
|
|
&:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
&:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
> dt {
|
|
margin: 0 0 6px;
|
|
font-style: normal;
|
|
}
|
|
|
|
> dd {
|
|
padding: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
// Flex table
|
|
.flex-table-item > .btn {
|
|
margin-left: 10px;
|
|
}
|
|
}
|
|
|
|
.page-title + .markdown-body > p:first-child {
|
|
@extend .lead;
|
|
}
|
|
|
|
|
|
//
|
|
// Markdown generated ToC
|
|
//
|
|
|
|
// Hide the first child li because it's always going to be "Contents".
|
|
#markdown-toc > li:first-child {
|
|
display: none;
|
|
}
|
|
|
|
|
|
//
|
|
// Branding colors
|
|
//
|
|
|
|
.swatch {
|
|
display: inline-block;
|
|
width: 6rem;
|
|
height: 6rem;
|
|
border-radius: .25rem;
|
|
}
|
|
|
|
.swatch-blue { background-color: $bg-blue; }
|
|
.swatch-green { background-color: $bg-green; }
|
|
.swatch-red { background-color: $bg-red; }
|
|
.swatch-orange { background-color: $bg-orange; }
|
|
.swatch-purple { background-color: $bg-purple; }
|
|
|
|
.swatch-gray-light { background-color: $bg-gray-light; }
|
|
.swatch-gray { background-color: $bg-gray; }
|
|
.swatch-gray-dark { background-color: $bg-gray-dark; }
|