mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 23:33:54 +00:00
Set width of preview to match reading
Preview width is set at 60em, but the container as a different font-size to .vector-body and so the preview was displaying at the wrong width. This change removes the font-size from the grantparent and re-sets it on the contents of #wikiPreview, ensuring that the final size matches the actual non-editing width of the body content. In addition, the 'submit' action is added to the list of those excluded from constrained width, so that the editing textarea remains at full width even when previewing. Bug: T312963 Change-Id: I1a1df32b00d5faecb73f8c53256342d356a9352c
This commit is contained in:
parent
5cadd0b9b0
commit
c2e7595809
|
@ -485,7 +485,7 @@
|
|||
"exclude": {
|
||||
"mainpage": false,
|
||||
"querystring": {
|
||||
"action": "(history|edit)",
|
||||
"action": "(history|edit|submit)",
|
||||
"diff": ".+"
|
||||
},
|
||||
"namespaces": [
|
||||
|
|
|
@ -1,7 +1,18 @@
|
|||
@import '../resources/common/variables.less';
|
||||
|
||||
// Reset the font-size for the whole body, but then re-override this below
|
||||
// to ensure the preview width (which is based on font-size) is correct.
|
||||
.vector-body {
|
||||
font-size: @font-size-reset;
|
||||
}
|
||||
|
||||
// Even if the editing form is max-width, the preview should be constrained.
|
||||
.skin-vector-disable-max-width #wikiPreview {
|
||||
max-width: @max-width-content-container;
|
||||
margin: auto;
|
||||
|
||||
// Change font-size for the actual preview content.
|
||||
.mw-parser-output {
|
||||
font-size: @font-size-base;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue