1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 01:04:04 +03:00
css/docs/docs.scss
2015-03-22 21:09:41 -07:00

316 lines
4.6 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.
---
//
// 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";
//
// Override some shit
//
// 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: #fff;
background: none;
border: 1px solid #fff;
&:hover,
&:active {
color: $brand-blue;
background: #fff;
border-color: #fff;
box-shadow: none;
}
}
//
// Site header
//
.masthead {
padding-top: 1rem;
padding-bottom: 1rem;
margin-bottom: 1.5rem;
text-align: center;
background-color: $brand-blue;
a {
color: rgba(255,255,255,.5);
&:hover {
color: #fff;
text-decoration: none;
}
}
.masthead-logo {
display: inline-block;
font-size: 1.5rem;
color: #fff;
.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: #fff;
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: $brand-blue;
font-size: 1.25rem;
color: #fff;
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 {
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;
}
//
// Side menu
//
.docs-menu {
margin-bottom: 1.5rem;
font-size: 14px;
@media (min-width: 34em) {
margin-right: 1rem;
}
}
//
// Examples
//
.docs-example {
position: relative;
padding: 15px;
font-size: 13px;
line-height: 1.4;
border: 1px solid #e5e5e5;
border-radius: .25rem .25rem 0 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($brand-green, 40%);
border: 1px solid lighten($brand-green, 30%);
}
// Override markdown styles
ul {
padding: 0;
margin-top: 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: $brand-blue; }
.swatch-green { background-color: $brand-green; }
.swatch-red { background-color: $brand-red; }
.swatch-orange { background-color: $brand-orange; }
.swatch-purple { background-color: $brand-purple; }
.swatch-gray-light { background-color: $brand-gray-light; }
.swatch-gray { background-color: $brand-gray; }
.swatch-gray-dark { background-color: $brand-gray-dark; }