1/*! 2 * VisualEditor MediaWiki Initialization MobileArticleTarget styles. 3 * 4 * @copyright 2011-2020 VisualEditor Team and others; see AUTHORS.txt 5 * @license The MIT License (MIT); see LICENSE.txt 6 */ 7 8.ve-init-mw-target-surface { 9 // margin-left and margin-right defined by the skin 10 // (see .content styles in Minerva) 11 margin-bottom: 1em; 12 13 > .ve-ce-surface .ve-ce-attachedRootNode, 14 > .ve-ui-surface-placeholder { 15 padding: 0; 16 17 &:before { 18 // This is done in this weird way to allow the margin to collapse with the margin of first 19 // element inside the editing surface. See I69d4d4bd9390a1007bc40cda9e78a6b3e7a1bd1d. 20 margin-top: 1em; 21 content: ''; 22 display: block; 23 } 24 } 25 26 > .ve-ce-surface .ve-ce-attachedRootNode { 27 // Ensure whole page is focusable (T109508) 28 // Subtract toolbar height, margin-bottom and a little more 29 // to prevent scrolling. 30 /* stylelint-disable-next-line plugin/no-unsupported-browser-features */ 31 min-height: ~'calc( 100vh - 5em )'; 32 33 .ve-init-target-ios & { 34 // More spacing required on iOS to prevent scrolling. 35 /* stylelint-disable-next-line plugin/no-unsupported-browser-features */ 36 min-height: ~'calc( 100vh - 10em )'; 37 } 38 39 .ve-ui-targetWidget & { 40 min-height: 0; 41 } 42 } 43} 44 45.ve-ui-mwTargetWidget { 46 /* stylelint-disable-next-line selector-class-pattern */ 47 .ve-ui-mwSurface.content { 48 // When content is applied to surface in a TargetWidget, don't add margins 49 margin: 0; 50 } 51} 52 53/* stylelint-disable-next-line selector-class-pattern */ 54.ve-init-mw-mobileArticleTarget.overlay { 55 // Override MobileFrontend `.overlay` styles. 56 // `padding-top` is instead set on a different element in adjustContentPadding(). 57 padding-top: 0; 58} 59 60.ve-init-mw-mobileArticleTarget .ve-ui-overlay-local { 61 // Reset line height set by .content 62 line-height: 1.4; 63} 64 65.oo-ui-windowManager-ios-modal-ready .ve-init-mw-mobileArticleTarget { 66 height: 100%; 67 overflow: hidden; 68} 69 70@media screen and ( max-width: 767px ) { 71 .ve-init-mw-target-surface > .ve-ui-surface-placeholder > * { 72 /* Fix margin overlap */ 73 margin-top: 0; 74 /* Placeholder doesn't need a border as well */ 75 border: 0; 76 } 77} 78 79.ve-ui-debugBar { 80 margin: 0 -16px; 81 padding: 0 16px; 82 border-top: 1px solid #c8ccd1; 83 box-shadow: 0 10px 10px -10px rgba( 0, 0, 0, 0.15 ) inset; 84 85 @media screen and ( min-width: 720px ) { 86 margin: 0 -3.35em; 87 padding: 0 3.35em; 88 } 89 padding-top: 0.8em; 90} 91 92.ve-ui-targetWidget .ve-ui-debugBar { 93 margin: 0; 94} 95 96.ve-ui-debugBar-selectionLabel { 97 min-width: auto; 98 width: 100%; 99} 100 101/* Hide toolbar shortcuts, no use on mobile */ 102.oo-ui-popupToolGroup-tools .oo-ui-tool-link .oo-ui-tool-accel { 103 display: none; 104} 105 106/* Restrict width of context to tablet width */ 107.ve-ui-mobileContext-menu { 108 max-width: 995px; 109 margin: 0 auto; 110} 111