mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
e48b5edbb4
Closes #4032 - Created "mobile" views: `parent-view`, `content-view` and `index-view` - `mobile/parent-view` has three callbacks for managing layout, and a mediaQuery listener to keep in sync with the user - content-view and index-view use their parent-views callbacks to bring themselves into and out of the viewport as appropriate - fixed media queries for post content list from 800px to 900px - Created `mobile-index-route` to intelligently transition to a new route on desktops (used by both PostsIndexRoute and SettingsIndexRoute) - Extract mobile interactions from settings views to new mobile utility views - `js-` prefixed settings view transitions - removed unused openEditor action from PostsRoute - removed unused mobile util "responsiveAction"
146 lines
3.0 KiB
SCSS
146 lines
3.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;
|
|
}
|
|
|
|
|
|
//
|
|
// 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: 10px 20px;
|
|
font-size: 1.3rem;
|
|
text-transform: uppercase;
|
|
color: $brown;
|
|
//Transparent gradient to make bg fade out as it goes out the top.
|
|
background: linear-gradient(to bottom, white 0%, white 25%, rgba(255,255,255,0.9) 100%);
|
|
|
|
// 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: 900px) {
|
|
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.03) 0 1px 3px,
|
|
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.03) 0 2px 3px;
|
|
}
|
|
&: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 4px;
|
|
}
|
|
} // .floatingheader
|
|
|
|
} // .scrolling
|
|
|
|
|
|
/* ==========================================================================
|
|
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;
|
|
}
|