Ghost/ghost/admin/assets/sass/patterns/_shame.scss
2014-07-30 14:56:37 +03:00

340 lines
7.0 KiB
SCSS

//
// Utilities
// --------------------------------------------------
// We have more robust alternatives in global.scss
// Are any of these actually even used anywhere?
.hidden,
.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;
}
//
// Box
// --------------------------------------------------
.box {
padding: 15px;
margin-bottom: 15px;
background: #fff;
position: relative;
box-shadow: $shadow;
header {
height:14px;
border-bottom: 1px solid $lightbrown;
padding-bottom: 15px;
margin-bottom: 15px;
text-transform: uppercase;
font-size:0.85em;
color: $brown;
}
footer {
height:14px;
border-top: 1px solid $lightbrown;
padding-top: 10px;
margin-top:15px;
text-transform: uppercase;
font-size:0.85em;
color: $brown;
}
header a,
footer a {
color:$brown;
&:hover {
color:$darkgrey;
text-decoration: none;
}
}
}
//
// Main
// --------------------------------------------------
main {
position: absolute;
top: 55px;
right: 15px;
bottom: 0;
left: 15px;
padding: 0;
@media (max-width: 400px) {
top: 40px;
left: 0;
right: 0;
}
}
//
// Floating Header
// --------------------------------------------------
// Semi-opaque fixed-position headers - used on content/editor
.floatingheader {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 400;
height: 40px;
padding: 6px 15px 14px;
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;
}
@media (max-width: 800px) {
display: inline-block;
}
}
}
small {
font-size: 0.85em;
}
a,
button {
color: $brown;
&:hover {
color: $darkgrey;
}
}
} // .floatingheader
//
// Scroll Shadows
// --------------------------------------------------
.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;
}
} // .floatingheader
} // .scrolling
//
// Old Dropdowns
// --------------------------------------------------
.dropdown {
@include icon-after($i-chevron-down, 8px) {
padding-left: 6px;
vertical-align: 0;
};
&.active {
color: $darkgrey;
@include icon-after($i-chevron-down, 8px);
}
} // .dropdown
/* ==========================================================================
Dropdown Show & Hide
---
Sadly !important is needed, to counteract the stringer selectors applying
a display property.
========================================================================== */
.ghost-popover {
display: none !important;
}
.ghost-popover.open {
display: block !important;
}
/* ==========================================================================
Menu
---
This is the base menu extend used for styles on interaction menus
Default: Pop menu, chiclet bottom center.
========================================================================== */
.menu {
display: inline-block;
position: absolute;
z-index: 960;
padding:6px 0;
border: none;
list-style: none;
color: $lightgrey;
background: $darkgrey;
border-radius: 3px;
box-shadow: rgba(0,0,0,0.5) 0 1px 15px;
// The triangle chiclet that points to where the menu came from
// By default, this is bottom center.
&:before {
content: "";
position: absolute;
bottom: -10px;
left: 50%;
margin-left: -10px;
border-width: 10px 10px 0 10px;
border-style: solid;
border-color: $darkgrey transparent;
display: block;
width: 0;
} // &:before
// Stop :hover shadow from overflowing
li {
overflow: hidden;
}
a, p {
display: block;
position: relative;
padding: 10px 25px 10px 35px;
border: none;
color: $lightgrey !important; // It's dirty, but it's needed.
text-transform: none;
text-decoration: none;
&:hover {
background: $blue;
box-shadow: rgba(255,255,255,0.2) 0 1px 0 inset;
}
} // a, p
// Add a check mark to the currently active menu item
.active a {
@include icon($i-check) {
position: absolute;
top: 14px;
left: 11px;
}
}
} // .menu
/* ==========================================================================
Menu Positioning Options
---
Combine above classes into one usable class
========================================================================== */
// This extend moves the chiclet to the top, for menus which drop down.
.menu-drop {
@extend .menu;
&:before {
top: -10px;
bottom: auto;
border-width:0 10px 10px 10px;
}
}
// Chiclet to the left, for menus appearing close to left edge of the screen.
.menu-left {
@extend .menu;
&:before {
left:10px;
margin-left:0;
}
}
// Chiclet to the right, for menus appearing close to right edge of the screen.
.menu-right {
@extend .menu;
&:before {
left: auto;
right:10px;
margin-left:0;
}
}
// Drop left, chiclet top left.
.menu-drop-left {
@extend .menu;
@extend .menu-drop;
@extend .menu-left;
}
// Drop right, chiclet top right.
.menu-drop-right {
@extend .menu;
@extend .menu-drop;
@extend .menu-right;
}