Get rid of ve.init.mw.ViewPageTarget-vector-hd.css and use a media query instead

This will mean it will be more obvious if making a change to the SD or HD version
that an equivalent adjustment may be needed.

Change-Id: I6129220839ef55017fe69d723524ecdf6cf0234f
This commit is contained in:
James D. Forrester 2014-06-28 12:27:31 -07:00
parent 79a34aa844
commit e1b9f9c745
3 changed files with 23 additions and 31 deletions

View file

@ -161,9 +161,6 @@ $wgResourceModules += array(
'vector' => array(
'modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-shared.css',
'modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css',
'modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector-hd.css' => array(
'media' => 'screen and (min-width: 982px)'
),
),
'apex' => array(
'modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-shared.css',

View file

@ -1,23 +0,0 @@
/*!
* VisualEditor MediaWiki Initialization ViewPageTarget Vector skin high-definition styles.
*
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-init-mw-viewPageTarget-surface {
margin: 0.8em -1.5em 0 -1.5em;
}
.ve-init-mw-viewPageTarget-surface .ve-ce-documentNode {
padding: 0 1.714em; /* surface-margin-left (1.5em) / (mw-body-content font-size) 0.875em */
}
.ve-init-mw-viewPageTarget-toolbar {
margin: -1.25em -1.5em 1.5em -1.5em;
}
.ve-ui-debugBar {
padding: 1.5em;
margin: 1em -1.5em -1.5em -1.5em;
}

View file

@ -50,11 +50,29 @@
z-index: 101; /* #p-personal is z-index 100 in vector :( */
}
/*
Margin override in ve.ce.TableCellnode.css doesn't work due
to more specific rule in Vector (div#content p)
*/
/* ve.ce.TableCellnode.css's margin replaced by more specific rule in Vector (div#content p) */
/*csslint ids:false */
#content .ve-ce-tableCellNode .ve-ce-paragraphNode {
margin: 0;
}
}
/*csslint ids:true */
/* High-definition-specific styles (because Vector adds 1em to the leftNav if width is 982px+ */
@media screen and (min-width: 982px) {
.ve-init-mw-viewPageTarget-surface {
margin: 0.8em -1.5em 0 -1.5em;
}
.ve-init-mw-viewPageTarget-surface .ve-ce-documentNode {
padding: 0 1.714em; /* surface-margin-left (1.5em) / (mw-body-content font-size) 0.875em */
}
.ve-init-mw-viewPageTarget-toolbar {
margin: -1.25em -1.5em 1.5em -1.5em;
}
.ve-ui-debugBar {
padding: 1.5em;
margin: 1em -1.5em -1.5em -1.5em;
}
}