mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
05c3e088d0
This fixes a problem with how Chrome renders native selection around floated elements. By adding pseudo elements before and after block aliens, the rendering is fixed. Change-Id: I7fdbb8f4c42e29d0574b308b8c5740066bb58e94
59 lines
1.2 KiB
CSS
59 lines
1.2 KiB
CSS
/**
|
|
* VisualEditor content editable Node styles.
|
|
*
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
|
|
.ve-ce-alienBlockNode,
|
|
.ve-ce-alienInlineNode,
|
|
.ve-ce-metaBlockNode,
|
|
.ve-ce-metaInlineNode,
|
|
.ve-ce-alienBlockNode *,
|
|
.ve-ce-alienInlineNode *,
|
|
.ve-ce-metaBlockNode *,
|
|
.ve-ce-metaInlineNode * {
|
|
background-color: #FFFFBA !important;
|
|
position: static !important;
|
|
}
|
|
|
|
/* Fix weird Chrome native selection involving floated elements */
|
|
.ve-ce-alienBlockNode:before,
|
|
.ve-ce-alienBlockNode:after {
|
|
content: '';
|
|
}
|
|
|
|
.ve-ce-alienBlockNode,
|
|
.ve-ce-metaBlockNode {
|
|
display: block;
|
|
}
|
|
|
|
.ve-ce-alienInlineNode,
|
|
.ve-ce-metaInlineNode {
|
|
display: inline;
|
|
}
|
|
|
|
.ve-ce-slug {
|
|
/*
|
|
display: inline-block;
|
|
margin-right: -1px;
|
|
width: 1px;
|
|
*/
|
|
}
|
|
|
|
.ve-ce-branchNode h1:empty:before,
|
|
.ve-ce-branchNode h2:empty:before,
|
|
.ve-ce-branchNode h3:empty:before,
|
|
.ve-ce-branchNode h4:empty:before,
|
|
.ve-ce-branchNode h5:empty:before,
|
|
.ve-ce-branchNode h6:empty:before,
|
|
.ve-ce-branchNode p:empty:before {
|
|
content: url('data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==');
|
|
}
|
|
|
|
li.ve-ce-branchNode p.ve-ce-branchNode:first-child {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|