mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 16:44:51 +00:00
89aecd54ba
There are several conditions to defaultSize behavior of thumbnails and frameless images and other images when it comes to default size. In the same principle is 'border' which is not quite a type despite the fact it 'behaves' as such in wikitext (and has a unique identifier that comes instead of the other types. This commit aims to organize this behavior for the user in an understandable manner. * Add 'basic' image type for images that have no specified type ('none') * Handle the difference in 'default' size behavior between basic images and thumbnails/frameless. The thumb/frameless images have the default wiki size. Other images' default size is their original dimensions. * Force wiki-configured default size for thumbnails and frameless images in the DM. This is done because at the moment Parsoid's output is of Wikipedia's default size rather than the local wiki's. The size is adapted if needed, directly in the DM. * Added 'border' as a pseudo-type checkbox flag that sets css class 'mw-image-border' is for parsoid rendering on save. * Add 'make full size' to the size widget select and treat it as a faux default button for basic and frame images. Bug: 62013 Bug: 62024 Bug: 61155 Bug: 61059 Bug: 61282 Change-Id: I6778705306f0dd6bb96afeb91383089a4ddab7ed
54 lines
1.3 KiB
CSS
54 lines
1.3 KiB
CSS
/*!
|
|
* VisualEditor MediaWiki Initialization ViewPageTarget shared styles.
|
|
* These are styles that are common to the vector, monobook, and apex skins, but may not
|
|
* be applied to other skins (for example, minerva).
|
|
*
|
|
* @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/* ve.ce.MWBlockImageNode */
|
|
|
|
figure[typeof*='mw:Image'] {
|
|
margin: 0;
|
|
}
|
|
|
|
figure[typeof*='mw:Image'] a {
|
|
border: 0;
|
|
}
|
|
|
|
/* TODO: Merge with div.tright styles */
|
|
/* Due to a weird cssjanus bug, noflip rules
|
|
are set as single-rules rather than for the
|
|
whole class */
|
|
figure[typeof*='mw:Image'].mw-halign-right {
|
|
/* @noflip */
|
|
margin: .5em 0 1.3em 1.4em;
|
|
}
|
|
|
|
/* TODO: Merge with div.tleft styles */
|
|
/* Due to a weird cssjanus bug, noflip rules
|
|
are set as single-rules rather than for the
|
|
whole class */
|
|
figure[typeof*='mw:Image'].mw-halign-left {
|
|
/* @noflip */
|
|
margin: .5em 1.4em 1.3em 0;
|
|
}
|
|
|
|
/* TODO: Merge with div.thumbinner styles */
|
|
figure[typeof='mw:Image/Thumb'], figure[typeof='mw:Image/Frame'] {
|
|
background-color: #f9f9f9;
|
|
border: 1px solid #cccccc;
|
|
padding: 3px !important;
|
|
font-size: 94%;
|
|
}
|
|
|
|
/* TODO: Merge with .thumbimage styles */
|
|
figure[typeof*='mw:Image'] .ve-ce-mwBlockImageNode-thumbimage {
|
|
border: 1px solid #cccccc;
|
|
}
|
|
|
|
figure[typeof*='mw:Image'].mw-image-border img {
|
|
border: 1px solid #cccccc;
|
|
}
|