mediawiki-extensions-Visual.../modules/ve/ce/styles/ve.ce.Node.css
Christian Williams 05c3e088d0 Fixing native selection rendering for floats
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
2012-11-07 15:07:43 -08:00

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;
}