2012-07-19 00:11:26 +00:00
|
|
|
/**
|
|
|
|
* VisualEditor user interface Inspector styles.
|
2012-07-19 21:25:16 +00:00
|
|
|
*
|
2012-07-19 00:11:26 +00:00
|
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
2012-08-27 21:34:08 +00:00
|
|
|
.ve-ui-inspector {
|
2012-06-20 01:20:28 +00:00
|
|
|
font-family: sans-serif;
|
2011-12-09 01:28:44 +00:00
|
|
|
position: absolute;
|
|
|
|
padding: 0.75em;
|
|
|
|
padding-top: 2.5em;
|
|
|
|
min-width: 15em;
|
|
|
|
z-index: 3;
|
|
|
|
}
|
|
|
|
|
2012-08-27 21:34:08 +00:00
|
|
|
.ve-ui-inspector-button {
|
2011-12-09 01:28:44 +00:00
|
|
|
position: absolute;
|
2012-10-24 22:20:41 +00:00
|
|
|
top: 0.5em;
|
|
|
|
width: 1.5em;
|
|
|
|
height: 1.5em;
|
2011-12-09 01:28:44 +00:00
|
|
|
background-position: center center;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
cursor: pointer;
|
2012-10-24 22:20:41 +00:00
|
|
|
filter: alpha(opacity=8);
|
|
|
|
opacity: 0.8;
|
2011-12-09 01:28:44 +00:00
|
|
|
}
|
|
|
|
|
2012-08-27 21:34:08 +00:00
|
|
|
.ve-ui-inspector-button:hover {
|
Kranitor #3: jQuerlyfornication ft. The Cascaders
* Classicifation (JS)
Use addClass instead of attr( 'class' ) whenever possible.
addClass will manipulate the properties directly instead of
(re-)setting an attribute which (most) browsers then sync
with the properties.
Difference between:
elem.className
and
elem.setAttribute( 'class', .. );
Just like .checked, .value, .disabled and other interactive
properties, the HTML attributes should only be used for initial
values from the html document. When in javascript, only set
properties. Attributes are either ignored or slow.
* Styling (JS)
Use .css() instead of attr( 'style' ).
Again, setting properties instead of attributes is much faster,
easier and safer. And this way it takes care of cross-browser
issues where applicable, and less prone to error due to dealing
with key-value pairs instead of css strings.
Difference between:
elem.style.foo = 'bar';
and
elem.setAttribute( 'style', 'foo: bar;' );
* Finding (JS)
Use .find( 'foo bar' ) instead of .find( 'foo' ).find( 'bar' ).
It is CSS!
* Vendor prefixes (CSS)
It is important to always list newer (standards-compliant) versions
*after* the older/prefixed variants.
See also http://css-tricks.com/ordering-css3-properties/
So the following three:
-webkit-gradient (Chrome, Safari 4)
-webkit-linear-gradient (Chrome 10, Safari 5+)
linear-gradient (CSS3 standard)
... must be in that order.
Notes:
- "-moz-opacity" is from before Mozilla 1.7 (Firefox < 0.8)
Has not been renamed to "opacity" since Firefox 0.9.
- Removed redundant "-moz-opacity"
- Added "filter: alpha(opacity=**);" where missing
- Fixed order of css3 properties (old to new)
- Add standardized css3 versions where missing
(some 'border-radius' groups didn't have the non-prefixed version)
- Spacing
- @embed
- Shorten hex colors where possible (#dddddd -> #ddd)
$ ack '#([0-9a-f])\1{5}' --css
$ ack '#([0-9a-f])\1{2};' --css
Change-Id: I386fedb9058c2567fd0af5f55291e9859a53329d
2012-07-28 19:15:23 +00:00
|
|
|
filter: alpha(opacity=100);
|
2011-12-09 23:04:55 +00:00
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
2012-08-27 21:34:08 +00:00
|
|
|
.ve-ui-inspector-closeButton {
|
2012-10-24 22:20:41 +00:00
|
|
|
left: 0.5em;
|
2012-08-30 20:04:22 +00:00
|
|
|
/* @see ve.ui.Icons */
|
2011-12-09 01:28:44 +00:00
|
|
|
}
|
|
|
|
|
The great inspector and context rewrite of 2012
ve.AnnotationAction
* Added filter to the clearAll method to allow clearing all matching annotations only
ve.dm.Document
* Some variable renaming for consistency
ve.dm.SurfaceFragment
* Added truncateRange method
* Added annotation scope to expandRange method
* Added support for passing an annotation object into annotateContent method
* Switched to using name instead of type in annotateContent method to match the ve.dm.Annotation class
* Fixed logic in annotation mode of expandSelection so that expansion only takes place if the annotation is found
ve.ui.LinkInspector
* Moved most of the functionality elsewhere
* General reorganization
* Changed setOverlayPosition to accept 2 arguments instead of an object with 2 properties and renamed it to positionOverlayBelow
* Check for annotation object before extracting target information from it
* Initialize default target as empty string to avoid undefined being cast to a string and the default target becoming 'undefined'
icons.ai, inspector.png, inspector.svg
* Added generic inspector icon which will be used when a custom icon is not specified in future inspector subclasses
ve.ui.Inspector.Icons
* Added inspector icon
* Renamed clear icon to remove to match it's actual image
ve.ui.Context
* Greatly simplified the interface, reducing the number of methods by inlining a few things and combining others
* Now always listening to resize events on the window rather than only while document is focused
* Not listening to scroll events anymore, they used to affect the top/bottom positioning of the menu which we don't do anymore
* Lots of cleanup and reorganization
* No need to fallback to empty array since getInspectorsForAnnotations does so already
* Only consider fully-covered annotations for inspectors
ve.ui.Frame
* Simplified the constructor by introducing the createFrame method
* General cleanup
* Typo fixes
ve.ui.Inspector
* Generalized lots of functionality previously located in the link inspector class which will be useful to all inspectors (such as title, clear button, saving changes, etc.)
* Added setDisabled and isDisabled methods to manage CSS changes and avoid needing to check the CSS to determine the state of the inspector (storing state in the view is evil)
* Added getMatchingAnnotations method for convenience
* Added prepareSelection stub
* Lots of cleanup and documentation
* Type pattern is now defined in base class
* Added stubs for onOpen and onClose with documentation so that subclass authors know what these methods do
* Removed checks for onOpen or onClose methods since they are now noop stubs and are always there
* Added stub and removed checks for onRemove
* Made esc key close and accept - the illusion is supposed to be that the link changes are applied instantly, even though they are only updated when you close, so all closing except for when removing should apply changes - i.e. esc is now equal to back rather than being a special function that doesn't have an associated affordance
* Only consider fully-covered annotations when getting matching annotations
ve.ui.InspectorFactory
* Depending on type pattern now since it's always there
* Added getInspectorsForAnnotations method
* Return empty array if annotation set is empty
VisualEditor, VisualEditor.i18n
* Added default inspector message
Change-Id: I1cc008445bcbc8cba6754ca4b6ac0397575980d5
2012-11-16 20:40:05 +00:00
|
|
|
.ve-ui-inspector-titleIcon {
|
2012-10-24 22:20:41 +00:00
|
|
|
position: absolute;
|
|
|
|
left: 2.25em;
|
|
|
|
top: 0.5em;
|
|
|
|
width: 2em;
|
|
|
|
height: 1.5em;
|
|
|
|
background-position: right center;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
border-left: solid 1px #eee;
|
|
|
|
filter: alpha(opacity=8);
|
|
|
|
opacity: 0.8;
|
2011-12-09 01:28:44 +00:00
|
|
|
}
|
|
|
|
|
The great inspector and context rewrite of 2012
ve.AnnotationAction
* Added filter to the clearAll method to allow clearing all matching annotations only
ve.dm.Document
* Some variable renaming for consistency
ve.dm.SurfaceFragment
* Added truncateRange method
* Added annotation scope to expandRange method
* Added support for passing an annotation object into annotateContent method
* Switched to using name instead of type in annotateContent method to match the ve.dm.Annotation class
* Fixed logic in annotation mode of expandSelection so that expansion only takes place if the annotation is found
ve.ui.LinkInspector
* Moved most of the functionality elsewhere
* General reorganization
* Changed setOverlayPosition to accept 2 arguments instead of an object with 2 properties and renamed it to positionOverlayBelow
* Check for annotation object before extracting target information from it
* Initialize default target as empty string to avoid undefined being cast to a string and the default target becoming 'undefined'
icons.ai, inspector.png, inspector.svg
* Added generic inspector icon which will be used when a custom icon is not specified in future inspector subclasses
ve.ui.Inspector.Icons
* Added inspector icon
* Renamed clear icon to remove to match it's actual image
ve.ui.Context
* Greatly simplified the interface, reducing the number of methods by inlining a few things and combining others
* Now always listening to resize events on the window rather than only while document is focused
* Not listening to scroll events anymore, they used to affect the top/bottom positioning of the menu which we don't do anymore
* Lots of cleanup and reorganization
* No need to fallback to empty array since getInspectorsForAnnotations does so already
* Only consider fully-covered annotations for inspectors
ve.ui.Frame
* Simplified the constructor by introducing the createFrame method
* General cleanup
* Typo fixes
ve.ui.Inspector
* Generalized lots of functionality previously located in the link inspector class which will be useful to all inspectors (such as title, clear button, saving changes, etc.)
* Added setDisabled and isDisabled methods to manage CSS changes and avoid needing to check the CSS to determine the state of the inspector (storing state in the view is evil)
* Added getMatchingAnnotations method for convenience
* Added prepareSelection stub
* Lots of cleanup and documentation
* Type pattern is now defined in base class
* Added stubs for onOpen and onClose with documentation so that subclass authors know what these methods do
* Removed checks for onOpen or onClose methods since they are now noop stubs and are always there
* Added stub and removed checks for onRemove
* Made esc key close and accept - the illusion is supposed to be that the link changes are applied instantly, even though they are only updated when you close, so all closing except for when removing should apply changes - i.e. esc is now equal to back rather than being a special function that doesn't have an associated affordance
* Only consider fully-covered annotations when getting matching annotations
ve.ui.InspectorFactory
* Depending on type pattern now since it's always there
* Added getInspectorsForAnnotations method
* Return empty array if annotation set is empty
VisualEditor, VisualEditor.i18n
* Added default inspector message
Change-Id: I1cc008445bcbc8cba6754ca4b6ac0397575980d5
2012-11-16 20:40:05 +00:00
|
|
|
.ve-ui-inspector-removeButton {
|
2012-10-24 22:20:41 +00:00
|
|
|
right: 0.25em;
|
2012-08-30 20:04:22 +00:00
|
|
|
/* @see ve.ui.Icons */
|
2011-12-09 01:28:44 +00:00
|
|
|
}
|
|
|
|
|
2012-08-27 21:34:08 +00:00
|
|
|
.ve-ui-inspector form {
|
2011-12-09 01:28:44 +00:00
|
|
|
margin: 0;
|
2012-10-24 22:20:41 +00:00
|
|
|
padding: 0;
|
2011-12-09 01:28:44 +00:00
|
|
|
white-space: nowrap;
|
2012-08-20 19:32:42 +00:00
|
|
|
font-size: 0.8em;
|
2011-12-09 01:28:44 +00:00
|
|
|
}
|
|
|
|
|
2012-08-27 21:34:08 +00:00
|
|
|
.ve-ui-inspector form input {
|
2011-12-09 01:28:44 +00:00
|
|
|
display: inline-block;
|
2012-08-15 18:26:11 +00:00
|
|
|
width: 20em;
|
2011-12-09 01:28:44 +00:00
|
|
|
font-size: 1em;
|
2012-08-20 19:32:42 +00:00
|
|
|
font-family: sans-serif;
|
|
|
|
background-color: #fff;
|
The great inspector and context rewrite of 2012
ve.AnnotationAction
* Added filter to the clearAll method to allow clearing all matching annotations only
ve.dm.Document
* Some variable renaming for consistency
ve.dm.SurfaceFragment
* Added truncateRange method
* Added annotation scope to expandRange method
* Added support for passing an annotation object into annotateContent method
* Switched to using name instead of type in annotateContent method to match the ve.dm.Annotation class
* Fixed logic in annotation mode of expandSelection so that expansion only takes place if the annotation is found
ve.ui.LinkInspector
* Moved most of the functionality elsewhere
* General reorganization
* Changed setOverlayPosition to accept 2 arguments instead of an object with 2 properties and renamed it to positionOverlayBelow
* Check for annotation object before extracting target information from it
* Initialize default target as empty string to avoid undefined being cast to a string and the default target becoming 'undefined'
icons.ai, inspector.png, inspector.svg
* Added generic inspector icon which will be used when a custom icon is not specified in future inspector subclasses
ve.ui.Inspector.Icons
* Added inspector icon
* Renamed clear icon to remove to match it's actual image
ve.ui.Context
* Greatly simplified the interface, reducing the number of methods by inlining a few things and combining others
* Now always listening to resize events on the window rather than only while document is focused
* Not listening to scroll events anymore, they used to affect the top/bottom positioning of the menu which we don't do anymore
* Lots of cleanup and reorganization
* No need to fallback to empty array since getInspectorsForAnnotations does so already
* Only consider fully-covered annotations for inspectors
ve.ui.Frame
* Simplified the constructor by introducing the createFrame method
* General cleanup
* Typo fixes
ve.ui.Inspector
* Generalized lots of functionality previously located in the link inspector class which will be useful to all inspectors (such as title, clear button, saving changes, etc.)
* Added setDisabled and isDisabled methods to manage CSS changes and avoid needing to check the CSS to determine the state of the inspector (storing state in the view is evil)
* Added getMatchingAnnotations method for convenience
* Added prepareSelection stub
* Lots of cleanup and documentation
* Type pattern is now defined in base class
* Added stubs for onOpen and onClose with documentation so that subclass authors know what these methods do
* Removed checks for onOpen or onClose methods since they are now noop stubs and are always there
* Added stub and removed checks for onRemove
* Made esc key close and accept - the illusion is supposed to be that the link changes are applied instantly, even though they are only updated when you close, so all closing except for when removing should apply changes - i.e. esc is now equal to back rather than being a special function that doesn't have an associated affordance
* Only consider fully-covered annotations when getting matching annotations
ve.ui.InspectorFactory
* Depending on type pattern now since it's always there
* Added getInspectorsForAnnotations method
* Return empty array if annotation set is empty
VisualEditor, VisualEditor.i18n
* Added default inspector message
Change-Id: I1cc008445bcbc8cba6754ca4b6ac0397575980d5
2012-11-16 20:40:05 +00:00
|
|
|
border: solid 1px #ccc;
|
2012-08-20 19:32:42 +00:00
|
|
|
padding: 0.5em;
|
|
|
|
-webkit-border-radius: 0.25em;
|
|
|
|
-moz-border-radius: 0.25em;
|
|
|
|
-o-border-radius: 0.25em;
|
|
|
|
border-radius: 0.25em;
|
|
|
|
}
|
2012-08-27 21:34:08 +00:00
|
|
|
.ve-ui-inspector form input:focus {
|
2012-08-20 19:32:42 +00:00
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
2012-08-31 20:46:03 +00:00
|
|
|
.ve-ui-inspector form input.ve-ui-linkInspector-location {
|
2012-08-30 20:04:22 +00:00
|
|
|
/* @see ve.ui.Icons */
|
2012-08-31 20:46:03 +00:00
|
|
|
background-position: 18.75em center;
|
2012-08-20 19:32:42 +00:00
|
|
|
background-repeat: no-repeat;
|
2012-08-31 20:46:03 +00:00
|
|
|
padding-right: 1.5em;
|
2011-12-09 01:28:44 +00:00
|
|
|
}
|
|
|
|
|
2012-08-27 21:34:08 +00:00
|
|
|
.ve-ui-inspector form label {
|
2011-12-09 01:28:44 +00:00
|
|
|
display: inline-block;
|
|
|
|
width: 6em;
|
|
|
|
}
|
|
|
|
|
2012-08-27 21:34:08 +00:00
|
|
|
.ve-ui-inspector-title {
|
2011-12-09 01:28:44 +00:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
2012-10-24 22:20:41 +00:00
|
|
|
left: 5.125em;
|
|
|
|
height: 2.8em;
|
|
|
|
line-height: 2.8em;
|
|
|
|
color: #333;
|
|
|
|
font-size: 0.9em;
|
2011-12-09 01:28:44 +00:00
|
|
|
}
|
2012-08-15 18:26:11 +00:00
|
|
|
|
2012-08-31 20:46:03 +00:00
|
|
|
.ve-iframe-overlay {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
2012-08-15 18:26:11 +00:00
|
|
|
.ve-ui-suggest-select {
|
|
|
|
position: absolute;
|
|
|
|
background: #FFFFFF;
|
|
|
|
/* @embed */
|
|
|
|
background-image: url(images/gray.png);
|
|
|
|
background-position: 8em top;
|
|
|
|
background-repeat: repeat-y;
|
|
|
|
width: 20em;
|
2012-08-20 19:32:42 +00:00
|
|
|
margin-top: -1px;
|
|
|
|
font-size: 0.8em;
|
2012-08-15 18:26:11 +00:00
|
|
|
z-index: 101;
|
2012-08-20 19:32:42 +00:00
|
|
|
border: solid 1px #ccc;
|
|
|
|
-webkit-border-radius: 0 0 0.25em 0.25em;
|
|
|
|
-moz-border-radius: 0 0 0.25em 0.25em;
|
|
|
|
-o-border-radius: 0 0 0.25em 0.25em;
|
|
|
|
border-radius: 0 0 0.25em 0.25em;
|
|
|
|
-webkit-box-shadow: 0 0.15em 1em 0 rgba(0, 0, 0, 0.2);
|
|
|
|
-moz-box-shadow: 0 0.15em 1em 0 rgba(0, 0, 0, 0.2);
|
|
|
|
box-shadow: 0 0.15em 1em 0 rgba(0, 0, 0, 0.2);
|
2012-08-15 18:26:11 +00:00
|
|
|
}
|
2012-08-17 22:13:19 +00:00
|
|
|
|
2012-08-31 20:46:03 +00:00
|
|
|
/* @noflip */
|
|
|
|
body.rtl .ve-ui-suggest-select {
|
|
|
|
background-position: 12em top;
|
|
|
|
}
|
|
|
|
|
2012-08-17 22:13:19 +00:00
|
|
|
.ve-ui-suggest-container {
|
2012-08-20 19:32:42 +00:00
|
|
|
margin: 0.5em 0;
|
2012-08-17 22:13:19 +00:00
|
|
|
}
|
|
|
|
|
2012-08-15 18:26:11 +00:00
|
|
|
.ve-ui-suggest-label {
|
|
|
|
float: left;
|
|
|
|
width: 6.5em;
|
|
|
|
padding: 0.33em 0.75em;
|
|
|
|
text-align: right;
|
2012-08-20 19:32:42 +00:00
|
|
|
color: #888;
|
2012-08-15 18:26:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.ve-ui-suggest-wrap {
|
2012-08-20 19:32:42 +00:00
|
|
|
float: left;
|
2012-08-15 18:26:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.ve-ui-suggest-dummy-item {
|
|
|
|
padding: 0.33em 0.75em;
|
|
|
|
width: 10.5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ve-ui-suggest-item {
|
|
|
|
padding: 0.33em 0.75em;
|
|
|
|
width: 10.5em;
|
2012-08-20 19:32:42 +00:00
|
|
|
cursor: pointer;
|
2012-08-27 21:34:08 +00:00
|
|
|
color: #0645AD;
|
2012-08-15 18:26:11 +00:00
|
|
|
}
|
|
|
|
|
2012-08-27 20:04:04 +00:00
|
|
|
.ve-ui-suggest-item-newPage {
|
2012-08-15 18:26:11 +00:00
|
|
|
color: #BA0000;
|
|
|
|
}
|
2012-08-20 19:32:42 +00:00
|
|
|
|
2012-08-27 20:04:04 +00:00
|
|
|
.ve-ui-suggest-item-externalLink,
|
|
|
|
.ve-ui-suggest-item-existingPage {
|
2012-08-20 19:32:42 +00:00
|
|
|
color: #0645AD;
|
2012-08-15 18:26:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.ve-ui-suggest-item.selected {
|
2012-08-20 19:32:42 +00:00
|
|
|
background-color: #b3d6f6;
|
2012-08-15 18:26:11 +00:00
|
|
|
}
|
2012-08-27 21:34:08 +00:00
|
|
|
|
2012-08-15 18:26:11 +00:00
|
|
|
.ve-ui-suggest-item > a {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|