| 1 |
/*! |
| 2 |
* VisualEditor MediaWiki DesktopArticleTarget init styles. |
| 3 |
* |
| 4 |
* @copyright See AUTHORS.txt |
| 5 |
* @license The MIT License (MIT); see LICENSE.txt |
| 6 |
*/ |
| 7 |
@import 'mediawiki.skin.variables.less'; |
| 8 |
|
| 9 |
/* stylelint-disable selector-max-id */ |
| 10 |
|
| 11 |
/*! |
| 12 |
* State | <html> classes |
| 13 |
* - mw.DesktopArticleTarget.init.css is loaded |
| 14 |
* Reading | ve-available |
| 15 |
* Loading editor | ve-available ve-activated ve-loading |
| 16 |
* - mw.DesktopArticleTarget.css is loaded |
| 17 |
* Activate editor | ve-available ve-activated ve-loading ve-activating |
| 18 |
* Active | ve-available ve-activated ve-active |
| 19 |
* Deactivate editor | ve-available ve-deactivating |
| 20 |
* Deactivated | ve-available |
| 21 |
*/ |
| 22 |
|
| 23 |
.ve-active { |
| 24 |
// Hide banners only on skins where they would be shown in the editable area (T324055) |
| 25 |
.ve-init-mw-desktopArticleTarget-targetContainer #siteNotice, |
| 26 |
.mw-indicators, |
| 27 |
#t-print, |
| 28 |
#t-permalink, |
| 29 |
#p-coll-print_export, |
| 30 |
#t-cite, |
| 31 |
.ve-init-mw-desktopArticleTarget-editableContent, |
| 32 |
.ve-init-mw-tempWikitextEditorWidget { |
| 33 |
display: none; |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
.ve-deactivating .ve-ui-surface { |
| 38 |
display: none; |
| 39 |
} |
| 40 |
|
| 41 |
.ve-activating { |
| 42 |
/* The surface needs to be measurable but not visible while |
| 43 |
being setup as some nodes render based on their dimensions, |
| 44 |
e.g. ve.ce.FocusableNode#updateInvisibleIcon */ |
| 45 |
.ve-ui-surface { |
| 46 |
height: 0; |
| 47 |
padding: 0 !important; /* stylelint-disable-line declaration-no-important */ |
| 48 |
overflow: hidden; |
| 49 |
} |
| 50 |
} |
| 51 |
|
| 52 |
/*! |
| 53 |
* Styles to make the original read view look disabled |
| 54 |
* Don't "disable": |
| 55 |
* - while loading: the placeholder toolbar |
| 56 |
* - while loading: the target, as this momentarily appears at the end of the loading sequence |
| 57 |
* and contains the real toolbar |
| 58 |
* Do "disable": |
| 59 |
* - while loading: anything marked "original content" as on the second load this is where the read mode content will be |
| 60 |
* - after activation: anything marked as "uneditable content" |
| 61 |
*/ |
| 62 |
.ve-loading .ve-init-mw-desktopArticleTarget-targetContainer > :not( .ve-init-mw-desktopArticleTarget-toolbarPlaceholder ):not( .ve-init-mw-desktopArticleTarget ), |
| 63 |
.ve-loading .ve-init-mw-desktopArticleTarget-originalContent, |
| 64 |
.ve-activated:not( .ve-loading ) .ve-init-mw-desktopArticleTarget-uneditableContent { |
| 65 |
pointer-events: none; |
| 66 |
-webkit-user-select: none; |
| 67 |
-moz-user-select: none; |
| 68 |
-ms-user-select: none; |
| 69 |
user-select: none; |
| 70 |
opacity: 0.5; |
| 71 |
} |
| 72 |
|
| 73 |
.ve-activated { |
| 74 |
.ve-init-mw-desktopArticleTarget-targetContainer #firstHeading { |
| 75 |
/* Override the styles above to allow the heading to be selected, for copy-pasting */ |
| 76 |
-webkit-user-select: text; |
| 77 |
-moz-user-select: text; |
| 78 |
-ms-user-select: text; |
| 79 |
user-select: text; |
| 80 |
pointer-events: auto; |
| 81 |
cursor: text; |
| 82 |
|
| 83 |
a { |
| 84 |
/* Re-disable any gadget-added links inside the heading, e.g. section 0 edit links */ |
| 85 |
pointer-events: none; |
| 86 |
} |
| 87 |
} |
| 88 |
|
| 89 |
.ve-init-mw-desktopArticleTarget-originalContent #catlinks { |
| 90 |
cursor: pointer; |
| 91 |
|
| 92 |
&:hover { |
| 93 |
/* focusableNode highlight equivalent styling */ |
| 94 |
background: #e9f2fd; |
| 95 |
} |
| 96 |
|
| 97 |
a { |
| 98 |
opacity: 1; |
| 99 |
} |
| 100 |
} |
| 101 |
} |
| 102 |
/* stylelint-enable selector-max-id */ |
| 103 |
|
| 104 |
.ve-init-mw-desktopArticleTarget-loading-overlay { |
| 105 |
z-index: 2; |
| 106 |
position: absolute; |
| 107 |
width: 100%; |
| 108 |
top: 1em; |
| 109 |
} |
| 110 |
|
| 111 |
.ve-init-mw-desktopArticleTarget-toolbarPlaceholder { |
| 112 |
overflow: hidden; |
| 113 |
transition: height 250ms ease; |
| 114 |
height: 0; |
| 115 |
padding-bottom: 2px; |
| 116 |
|
| 117 |
/* Shadow is styled in theme files */ |
| 118 |
|
| 119 |
&-bar { |
| 120 |
transform: translateY( -100% ); |
| 121 |
transition: transform 250ms ease; |
| 122 |
} |
| 123 |
|
| 124 |
&-open .ve-init-mw-desktopArticleTarget-toolbarPlaceholder-bar { |
| 125 |
transform: translateY( 0 ); |
| 126 |
} |
| 127 |
|
| 128 |
&-floating { |
| 129 |
// No height transition required when toolbar starts off floating |
| 130 |
transition: none; |
| 131 |
|
| 132 |
.ve-init-mw-desktopArticleTarget-toolbarPlaceholder-bar { |
| 133 |
position: fixed; |
| 134 |
top: 0; |
| 135 |
z-index: 1; |
| 136 |
background: @background-color-base; |
| 137 |
} |
| 138 |
} |
| 139 |
} |
| 140 |
|
| 141 |
/* OOUI may not have loaded yet */ |
| 142 |
.oo-ui-element-hidden { |
| 143 |
display: none !important; /* stylelint-disable-line declaration-no-important */ |
| 144 |
} |
| 145 |
|
| 146 |
/* Section edit links */ |
| 147 |
|
| 148 |
.mw-editsection { |
| 149 |
&::before { |
| 150 |
content: '\200B'; |
| 151 |
} |
| 152 |
|
| 153 |
a { |
| 154 |
white-space: nowrap; |
| 155 |
} |
| 156 |
} |