mediawiki-extensions-Visual.../modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.less
Ed Sanders 042bfdfd9d Update VE core submodule to master (07687721b)
New changes:
77076f828 LinkAnnotationInspector: add a "label" field on mobile

Local changes:
* Updates for mobile link label editing

Bug: T229431
Change-Id: Ib0489f6f59b228ebc4a20f7a0a515be938a8f6d3
2019-08-23 00:25:51 +02:00

209 lines
4.3 KiB
Plaintext

/*!
* VisualEditor MediaWiki Initialization MobileArticleTarget styles.
*
* @copyright 2011-2019 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-init-mw-target-surface {
// margin-left and margin-right defined by the skin
// (see .content styles in Minerva)
margin-bottom: 1em;
.ve-ce-attachedRootNode,
.ve-ui-surface-placeholder {
padding: 0;
&:before {
// This is done in this weird way to allow the margin to collapse with the margin of first
// element inside the editing surface. See I69d4d4bd9390a1007bc40cda9e78a6b3e7a1bd1d.
margin-top: 1em;
content: '';
display: block;
}
}
.ve-ce-attachedRootNode {
// Ensure whole page is focusable (T109508)
// Subtract toolbar height, margin-bottom and a little more
// to prevent scrolling.
min-height: ~'calc( 100vh - 5em )';
.ve-init-target-ios & {
// More spacing required on iOS to prevent scrolling.
min-height: ~'calc( 100vh - 10em )';
}
}
}
/* stylelint-disable-next-line selector-class-pattern */
.ve-init-mw-mobileArticleTarget.overlay {
// Override MobileFrontend `.overlay` styles.
// `padding-top` is instead set on a different element in adjustContentPadding().
padding-top: 0;
}
.ve-init-mw-mobileArticleTarget .ve-ui-overlay-local {
// Reset line height set by .content
line-height: 1.4;
}
.oo-ui-windowManager-ios-modal-ready .ve-init-mw-mobileArticleTarget {
height: 100%;
overflow: hidden;
}
@media screen and ( max-width: 767px ) {
.ve-init-mw-target-surface .ve-ui-surface-placeholder > * {
/* Fix margin overlap */
margin-top: 0;
/* Placeholder doesn't need a border as well */
border: 0;
}
}
.ve-ui-debugBar {
margin: 0 -16px;
padding: 0 16px;
border-top: 1px solid #c8ccd1;
box-shadow: 0 10px 10px -10px rgba( 0, 0, 0, 0.15 ) inset;
@media screen and ( min-width: 720px ) {
margin: 0 -3.35em;
padding: 0 3.35em;
}
padding-top: 0.8em;
}
.ve-ui-debugBar-selectionLabel {
min-width: auto;
width: 100%;
}
/* Hide toolbar shortcuts, no use on mobile */
.oo-ui-popupToolGroup-tools .oo-ui-tool-link .oo-ui-tool-accel {
display: none;
}
/* Restrict width of context to tablet width */
.ve-ui-mobileContext-menu {
max-width: 995px;
margin: 0 auto;
}
.ve-init-mw-mobileArticleTarget-title-container {
width: 100%;
position: relative;
border-right: 1px solid #c8ccd1;
}
.ve-init-mw-mobileArticleTarget-title {
padding: 0 0.5em;
line-height: 3.164em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.ve-init-mw-mobileArticleTarget-pageTools,
.ve-init-mw-mobileArticleTarget-editTools {
display: flex;
.oo-ui-barToolGroup .oo-ui-tool-link {
min-height: 3em;
}
> .oo-ui-toolGroup {
&-empty {
display: none;
}
&:last-child {
border-right: 0;
}
}
}
.ve-init-mw-mobileArticleTarget-editTools {
/* stylelint-disable-next-line no-descending-specificity */
> .oo-ui-toolGroup {
flex: 1;
}
> .oo-ui-popupToolGroup > .oo-ui-popupToolGroup-handle {
/* stylelint-disable-next-line declaration-no-important */
padding: 3em 0 0 0 !important;
> .oo-ui-iconElement-icon,
> .oo-ui-indicatorElement-indicator {
left: 50%;
}
> .oo-ui-iconElement-icon {
margin-left: -1.142857em;
}
> .oo-ui-indicatorElement-indicator {
margin-left: 0.285714em;
}
}
> .oo-ui-barToolGroup {
text-align: center;
> .oo-ui-toolGroup-tools > .oo-ui-tool {
width: 100%;
> .oo-ui-tool-link {
padding: 0.875em 0;
> .oo-ui-iconElement-icon:not( .oo-ui-tool-checkIcon ) {
position: static;
display: inline-block;
vertical-align: middle;
}
> .oo-ui-tool-title {
vertical-align: middle;
margin-left: 0.3em;
@media screen and ( max-width: 767px ) {
// stylelint-disable-next-line declaration-no-important
display: none !important;
}
}
}
}
}
}
.ve-init-mw-mobileArticleTarget-pageTools {
/* stylelint-disable-next-line no-descending-specificity */
> .oo-ui-toolGroup,
> .ve-init-mw-mobileArticleTarget-title-container {
flex: auto;
}
.ve-ui-toolbar-group-editMode {
min-width: 4em;
}
}
.ve-init-mw-mobileArticleTarget-editTools-hidden,
.ve-init-mw-mobileArticleTarget-pageToolbar-hidden {
display: none;
}
.ve-init-mw-mobileArticleTarget-iosScreenMeasure {
position: absolute;
top: 0;
left: 0;
height: 100vh;
width: 1px;
}