mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Make images look better, account for e82629895b38 in MW core
Prevent images from getting double borders due to slugs, and prevent extraneous margins from piling up in captions. Also add the ve-ce-mwBlockImageNode class which shockingly wasn't being set (only ve-ce-mwBlockImageNode-TYPE was set). Change-Id: I86b95aa0c0def92a9790b7cdb4b05837fb8f65e2
This commit is contained in:
parent
a7bf8b6a7f
commit
9e9a671fc1
|
@ -48,7 +48,7 @@ ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode( model, config ) {
|
|||
this.$figure = this.$( '<figure>' )
|
||||
.appendTo( this.$element )
|
||||
.append( this.$a )
|
||||
.addClass( 've-ce-mwBlockImageNode-type-' + type )
|
||||
.addClass( 've-ce-mwBlockImageNode ve-ce-mwBlockImageNode-type-' + type )
|
||||
// 'typeof' should appear with the proper Parsoid-generated
|
||||
// type. The model deals with converting it
|
||||
.attr( 'typeof', this.typeToRdfa[ type ] );
|
||||
|
|
|
@ -10,3 +10,13 @@
|
|||
figure[typeof~='mw:Image'].mw-halign-center + .ve-ce-protectedNode-shield {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Override border on shields for images */
|
||||
.ve-ce-mwBlockImageNode .ve-ce-protectedNode-shield {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Override paragraph margins inside of captions */
|
||||
.ve-ce-mwBlockImageNode figcaption p {
|
||||
margin: 0 !important;
|
||||
}
|
|
@ -9,3 +9,7 @@
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Override border on shields for images */
|
||||
.ve-ce-mwInlineImageNode .ve-ce-protectedNode-shield {
|
||||
border: none;
|
||||
}
|
Loading…
Reference in a new issue