mediawiki-extensions-Visual.../modules/ve/ce/styles/ve.ce.Surface.css
Trevor Parscal a30e4c325b Cleaned up paste target and surface styles
Resolves a TODO related to the paste target div.

VisualEditor.php
* Added link to ve.Surface.css

ve.Surface.js
* Cleaned up initialization of .ve-surface element
* Removed float clearing div (see ve.Surface.css)
* Removed paste div (moved to ve.ce.Surface)

ve.Surface.css
* Added rule which adds an ":after" element to handle clearing floats

ve.ce.Surface.js
* Cleaned up initialization of DOM elements
* Added paste target div
* Replaced paste element selectors with direct references to this.$pasteTarget

ve.ce.Surface.css
* Changed paste div styles to use a namespaced class instead of a generic ID

demos/ve/index.php
* Added link to ve.Surface.css

Change-Id: Ib93d45ac82ae643fc8e659f5a063c02a8ddacdde
2013-01-17 15:02:47 -08:00

71 lines
1.5 KiB
CSS

/*!
* VisualEditor ContentEditable Surface styles.
*
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-ce-surface {
overflow: hidden;
font-size: 1em; /* to look more like MediaWiki use: 0.8em */;
}
.ve-ce-surface-textarea {
position: absolute;
z-index: -1;
filter: alpha(opacity=0);
opacity: 0;
color: white;
background-color: #fff;
border: none;
padding: 0;
margin: 0;
width: 1px;
}
.ve-ce-surface-textarea:focus {
outline: none;
}
.ve-ce-surface-cursor {
position: absolute;
background-color: #000;
width: 1px;
display: none;
}
.ve-ce-surface-phantoms {
cursor: not-allowed;
left: 0;
opacity: .85;
position: absolute;
top: 0;
}
.ve-ce-surface-phantom {
background-color: #C3E59A;
background-image: -ms-repeating-linear-gradient(-45deg, white 0px, white 5px, #C3E59A 5px, #C3E59A 10px );
background-image: -webkit-repeating-linear-gradient(-45deg, white 0px, white 5px, #C3E59A 5px, #C3E59A 10px );
background-image: -moz-repeating-linear-gradient(-45deg, white 0px, white 5px, #C3E59A 5px, #C3E59A 10px);
background-image: repeating-linear-gradient(-45deg, white 0px, white 5px, #C3E59A 5px, #C3E59A 10px );
background-size: 14px 14px;
position: absolute;
}
.ve-ce-surface-paste {
display: none;
height: 1px;
left: 0;
filter: alpha(opacity=0);
opacity: 0;
overflow: hidden;
position: fixed;
top: 0;
width: 1px;
}
.ve-ce-surface-paste * {
height: 1px !important;
width: 1px !important;
}