0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/assets/sass/modules/global.scss

457 lines
9.4 KiB
SCSS
Raw Normal View History

2014-02-23 15:07:01 +01:00
/*
* Global styles for Ghost which are used throughout the admin interface
* Utility classes defined here to keep other libraries (Normalize) from
* being modified, preventing upgrade later.
*
* Table of Contents
*
* Utility Classes
* Global Styles
* Global Navigation
* Mobile Navigation
* Drop-down / Pop-up Menu
* Notifications
* Modals
* Main Elements
* Floating Headers
* Image Uploader
* Misc
*/
/* ==========================================================================
Utility Classes
========================================================================== */
.hidden { @include hidden; } // TODO: Merge this with .visuallyhidden
.invisible { visibility: hidden; }
.right { float: right; }
.left { float: left; }
2014-03-11 23:23:42 +00:00
.wrapper { position: relative; }
2014-02-23 15:07:01 +01:00
.markdown, pre, code { font-family: $font-family-mono; }
.visuallyhidden,
.screen-reader-text {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
}
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }
/* ==========================================================================
Global Styles
========================================================================== */
html {
font: normal 81.2%/1.65 "Open Sans", sans-serif;
}
body {
width:100%;
color: $darkgrey;
font-weight: 300;
background: $lightbrown;
@include breakpoint($mobile) { background: #fff; }
}
::-moz-selection {
color: $darkgrey;
background: lighten($blue, 20%);
text-shadow: none;
}
::selection {
color: $darkgrey;
background: lighten($blue, 20%);
text-shadow: none;
}
article aside {
width: 30%;
padding: 0 2.2em;
margin: 0 2.2em 1.6em 2.2em;
float: right;
background: $lightbrown;
border-radius: 3px;
}
// Headings
h1, h2, h3,
h4, h5, h6 {
color: $darkgrey;
text-rendering: optimizeLegibility;
line-height: 1;
margin-top: 0;
}
h2 {
padding-top: 0.8em;
margin-top: 0.8em;
border-top: $lightbrown 1px solid;
}
h1 a:hover {
text-decoration: none;
box-shadow: $blue 0 -5px 0 inset;
}
h2 a:hover {
text-decoration: none;
box-shadow: $blue 0 -4px 0 inset;
}
h3 a:hover {
text-decoration: none;
box-shadow: $blue 0 -3px 0 inset;
}
h4 a:hover,
h5 a:hover,
h6 a:hover {
text-decoration: none;
box-shadow: $blue 0 -1px 0 inset;
}
hgroup {
@include baseline;
h1, h2, h3,
h4, h5, h6 {
padding:0;
margin:0;
border:none;
margin-bottom: 5px;
a {
color: $darkgrey;
&:hover {
box-shadow: $darkgrey 0 -1px 0 inset;
}
}
/*
* Make everything except the first
* heading appear smaller/thinner.
*/
&:nth-child(n+2) {
font-size: 1.8em;
font-weight: 300;
color: $brown;
}
}
}
// Text elements
p, ul, ol { @include baseline; }
ol ol, ul ul,
ul ol, ol ul {
margin: 0.4em 0;
}
a {
color:$blue;
text-decoration:none;
@include transition(all 0.15s ease-in-out);
&:hover {
text-decoration:underline;
}
&.highlight {
color: $orange;
font-weight: bold;
}
}
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid $lightbrown;
margin: 3.2em 0;
padding: 0;
}
blockquote {
@include baseline;
@include box-sizing(border-box);
padding: 0 1.6em 0 1.6em;
border-left: $lightbrown 0.6em solid;
p {
margin:0.8em 0;
font-size:1.2em;
font-weight: 300;
}
small {
display: inline-block;
margin: 0.8em 0 0.8em 1.5em;
font-size:0.9em;
color: $brown;
&:before { content: '\2014 \00A0'; }
}
cite {
font-weight:bold;
a { font-weight: normal; }
}
}
dl {
@include baseline;
dt {
float: left;
width: 180px;
overflow: hidden;
clear: left;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: bold;
margin-bottom: 1em
}
dd {
margin-left: 200px;
margin-bottom: 1em
}
}
mark {
background-color: #ffc336;
}
/* ==========================================================================
Main Elements
========================================================================== */
main {
position: absolute;
top: 55px;
right: 15px;
bottom: 0;
left: 15px;
padding: 0;
@include breakpoint($mobile) {
top: 40px;
left:0;
right:0;
}
}
/* ==========================================================================
Floating Headers
========================================================================== */
// Semi-opaque fixed-position headers - used on content/editor
.floatingheader {
@include box-sizing(border-box);
position: absolute;
top:0;
left:0;
right:0;
z-index: 400;
height: 40px;
padding: 10px 15px;
text-transform: uppercase;
color: $brown;
//Transparent gradient to make bg fade out as it goes out the top.
@include linear-gradient(top, white 0%, white 25%, rgba(255,255,255,0.9) 100%, $fallback: transparent);
button, .button {
display: inline-block;
font-size: 10px;
min-height: 20px;
height: 20px;
padding: 3px 4px;
vertical-align: top;
&.button-back {
position: relative;
top: -2px;
left: 3px;
display: none;
padding: 0 6px 0 3px;
&:active {
box-shadow: none;
}
&:before {
left: -8px;
border-width: 10px 8px 10px 0;
}
@include breakpoint($tablet) {
display: inline-block;
}
}
}
small {
font-size: 0.85em;
}
a {
color: $brown;
&:hover { color: $darkgrey; }
}
}//.floatingheader
// Special case, when scrolling, add shadows to content headers.
.scrolling {
.floatingheader {
box-shadow:
rgba(0,0,0,0.02) 0 1px 2px,
rgba(255, 255, 255, 0.5) 0 -1px 0 inset;
&::before {
content: "";
height:40px;
width: 80%;
position:absolute;
bottom:0;
left:50%;
margin-left: -40%;
box-shadow: rgba(0,0,0,0.02) 0 2px 2px;
}
&::after {
content: "";
height:40px;
width: 30%;
position:absolute;
bottom:0;
left:50%;
margin-left: -15%;
box-shadow: rgba(0,0,0,0.02) 0 3px 3px;
}
}
}
/* ==========================================================================
NProgress
========================================================================== */
/* Make clicks pass-through */
#nprogress {
pointer-events: none;
-webkit-pointer-events: none;
}
#nprogress .bar {
background: $blue;
position: fixed;
z-index: 100;
top: 0;
left: 0;
width: 100%;
height: 2px;
}
/* Fancy blur effect */
#nprogress .peg {
display: block;
position: absolute;
right: 0px;
width: 100px;
height: 100%;
box-shadow: 0 0 10px $blue, 0 0 5px $blue;
opacity: 1.0;
-webkit-transform: rotate(3deg) translate(0px, -4px);
-moz-transform: rotate(3deg) translate(0px, -4px);
-ms-transform: rotate(3deg) translate(0px, -4px);
-o-transform: rotate(3deg) translate(0px, -4px);
transform: rotate(3deg) translate(0px, -4px);
}
/* Remove these to get rid of the spinner */
#nprogress .spinner {
display: block;
position: fixed;
z-index: 100;
top: 15px;
right: 15px;
}
#nprogress .spinner-icon {
width: 14px;
height: 14px;
border: solid 2px transparent;
border-top-color: $blue;
border-left-color: $blue;
border-radius: 10px;
-webkit-animation: nprogress-spinner 400ms linear infinite;
-moz-animation: nprogress-spinner 400ms linear infinite;
-ms-animation: nprogress-spinner 400ms linear infinite;
-o-animation: nprogress-spinner 400ms linear infinite;
animation: nprogress-spinner 400ms linear infinite;
}
@-webkit-keyframes nprogress-spinner {
0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@-moz-keyframes nprogress-spinner {
0% { -moz-transform: rotate(0deg); transform: rotate(0deg); }
100% { -moz-transform: rotate(360deg); transform: rotate(360deg); }
}
@-o-keyframes nprogress-spinner {
0% { -o-transform: rotate(0deg); transform: rotate(0deg); }
100% { -o-transform: rotate(360deg); transform: rotate(360deg); }
}
@-ms-keyframes nprogress-spinner {
0% { -ms-transform: rotate(0deg); transform: rotate(0deg); }
100% { -ms-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes nprogress-spinner {
0% { transform: rotate(0deg); transform: rotate(0deg); }
100% { transform: rotate(360deg); transform: rotate(360deg); }
}