layout/style/contenteditable.css

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/style/contenteditable.css	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,338 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
    1.10 +
    1.11 +*|*::-moz-canvas {
    1.12 +  cursor: text;
    1.13 +}
    1.14 +
    1.15 +*|*:focus:-moz-read-write :-moz-read-only {
    1.16 +  -moz-user-select: all !important;
    1.17 +}
    1.18 +
    1.19 +input:-moz-read-write > .anonymous-div:-moz-read-only,
    1.20 +textarea:-moz-read-write > .anonymous-div:-moz-read-only {
    1.21 +  -moz-user-select: text !important;
    1.22 +}
    1.23 +
    1.24 +/* Use default arrow over objects with size that 
    1.25 +   are selected when clicked on.
    1.26 +   Override the browser's pointer cursor over links
    1.27 +*/
    1.28 +
    1.29 +img:-moz-read-write, img:-moz-read-write[usemap], area:-moz-read-write,
    1.30 +object:-moz-read-write, object:-moz-read-write[usemap], 
    1.31 +applet:-moz-read-write, hr:-moz-read-write, button:-moz-read-write,
    1.32 +select:-moz-read-write,
    1.33 +a:-moz-read-write:link img, a:-moz-read-write:visited img,
    1.34 +a:-moz-read-write:active img, a:-moz-read-write:-moz-only-whitespace[name] {
    1.35 +  cursor: default;
    1.36 +}
    1.37 +
    1.38 +*|*:-moz-any-link:-moz-read-write {
    1.39 +  cursor: text;
    1.40 +}
    1.41 +
    1.42 +/* Prevent clicking on links from going to link */
    1.43 +a:link:-moz-read-write img, a:visited:-moz-read-write img,
    1.44 +a:active:-moz-read-write img {
    1.45 +  -moz-user-input: none;
    1.46 +}
    1.47 +
    1.48 +/* We suppress user/author's prefs for link underline, 
    1.49 +   so we must set explicitly. This isn't good!
    1.50 +*/
    1.51 +a:link:-moz-read-write {
    1.52 +  text-decoration: underline -moz-anchor-decoration;
    1.53 +  color: -moz-hyperlinktext;
    1.54 +}
    1.55 +
    1.56 +/* Allow double-clicks on these widgets to open properties dialogs
    1.57 +   XXX except when the widget has disabled attribute */
    1.58 +*|*:-moz-read-write > input:-moz-read-only,
    1.59 +*|*:-moz-read-write > button:-moz-read-only,
    1.60 +*|*:-moz-read-write > textarea:-moz-read-only {
    1.61 +  -moz-user-select: all !important;
    1.62 +  -moz-user-input: auto !important;
    1.63 +  -moz-user-focus: none !important;
    1.64 +}
    1.65 +
    1.66 +/* XXX Still need a better way of blocking other events to these widgets */
    1.67 +select:-moz-read-write,
    1.68 +*|*:-moz-read-write > input:disabled,
    1.69 +*|*:-moz-read-write > input[type="checkbox"],
    1.70 +*|*:-moz-read-write > input[type="radio"],
    1.71 +*|*:-moz-read-write > input[type="file"],
    1.72 +input[contenteditable="true"]:disabled,
    1.73 +input[contenteditable="true"][type="checkbox"],
    1.74 +input[contenteditable="true"][type="radio"],
    1.75 +input[contenteditable="true"][type="file"] {
    1.76 +  -moz-user-select: all !important;
    1.77 +  -moz-user-input: none !important;
    1.78 +  -moz-user-focus: none !important;
    1.79 +}
    1.80 +
    1.81 +/* emulation of non-standard HTML <marquee> tag */
    1.82 +marquee:-moz-read-write {
    1.83 +  -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-horizontal-editable');
    1.84 +}
    1.85 +
    1.86 +marquee[direction="up"]:-moz-read-write, marquee[direction="down"]:-moz-read-write {
    1.87 +  -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-vertical-editable');
    1.88 +}
    1.89 +
    1.90 +*|*:-moz-read-write > input[type="hidden"],
    1.91 +input[contenteditable="true"][type="hidden"] {
    1.92 +  border: 1px solid black !important;
    1.93 +  visibility: visible !important;
    1.94 +}
    1.95 +
    1.96 +label:-moz-read-write {
    1.97 +    -moz-user-select: all !important;
    1.98 +}
    1.99 +
   1.100 +*|*::-moz-display-comboboxcontrol-frame {
   1.101 +  -moz-user-select: text !important;
   1.102 +}
   1.103 +
   1.104 +option:-moz-read-write {
   1.105 +  -moz-user-select: text !important;
   1.106 +}
   1.107 +
   1.108 +/* the following rules are for Image Resizing */
   1.109 +
   1.110 +span[\_moz_anonclass="mozResizer"] {
   1.111 +  width: 5px;
   1.112 +  height: 5px;
   1.113 +  position: absolute;
   1.114 +  border: 1px black solid;
   1.115 +  background-color: white;
   1.116 +  -moz-user-select: none;
   1.117 +  z-index: 2147483646; /* max value -1 for this property */
   1.118 +}
   1.119 +
   1.120 +/* we can't use :active below */
   1.121 +span[\_moz_anonclass="mozResizer"][\_moz_activated],
   1.122 +span[\_moz_anonclass="mozResizer"]:hover {
   1.123 +  background-color: black;
   1.124 +}
   1.125 +
   1.126 +span[\_moz_anonclass="mozResizer"].hidden,
   1.127 +span[\_moz_anonclass="mozResizingShadow"].hidden,
   1.128 +img[\_moz_anonclass="mozResizingShadow"].hidden,
   1.129 +span[\_moz_anonclass="mozGrabber"].hidden,
   1.130 +span[\_moz_anonclass="mozResizingInfo"].hidden,
   1.131 +a[\_moz_anonclass="mozTableRemoveRow"].hidden,
   1.132 +a[\_moz_anonclass="mozTableRemoveColumn"].hidden {
   1.133 +  display: none !important;
   1.134 +}
   1.135 +
   1.136 +span[\_moz_anonclass="mozResizer"][anonlocation="nw"] {
   1.137 +  cursor: nw-resize;
   1.138 +}
   1.139 +span[\_moz_anonclass="mozResizer"][anonlocation="n"] {
   1.140 +  cursor: n-resize;
   1.141 +}
   1.142 +span[\_moz_anonclass="mozResizer"][anonlocation="ne"] {
   1.143 +  cursor: ne-resize;
   1.144 +}
   1.145 +span[\_moz_anonclass="mozResizer"][anonlocation="w"] {
   1.146 +  cursor: w-resize;
   1.147 +}
   1.148 +span[\_moz_anonclass="mozResizer"][anonlocation="e"] {
   1.149 +  cursor: e-resize;
   1.150 +}
   1.151 +span[\_moz_anonclass="mozResizer"][anonlocation="sw"] {
   1.152 +  cursor: sw-resize;
   1.153 +}
   1.154 +span[\_moz_anonclass="mozResizer"][anonlocation="s"] {
   1.155 +  cursor: s-resize;
   1.156 +}
   1.157 +span[\_moz_anonclass="mozResizer"][anonlocation="se"] {
   1.158 +  cursor: se-resize;
   1.159 +}
   1.160 +
   1.161 +span[\_moz_anonclass="mozResizingShadow"],
   1.162 +img[\_moz_anonclass="mozResizingShadow"] {
   1.163 +  outline: thin dashed black;
   1.164 +  -moz-user-select: none;
   1.165 +  opacity: 0.5;
   1.166 +  position: absolute;
   1.167 +  z-index: 2147483647; /* max value for this property */
   1.168 +}
   1.169 +
   1.170 +span[\_moz_anonclass="mozResizingInfo"] {
   1.171 +  font-family: sans-serif;
   1.172 +  font-size: x-small;
   1.173 +  color: black;
   1.174 +  background-color: #d0d0d0;
   1.175 +  border: ridge 2px #d0d0d0;
   1.176 +  padding: 2px;
   1.177 +  position: absolute;
   1.178 +  z-index: 2147483647; /* max value for this property */
   1.179 +}
   1.180 +
   1.181 +img[\_moz_resizing] {
   1.182 +  outline: thin solid black;
   1.183 +}
   1.184 +
   1.185 +*[\_moz_abspos] {
   1.186 +  outline: silver ridge 2px;
   1.187 +  z-index: 2147483645 !important; /* max value -2 for this property */
   1.188 +}
   1.189 +*[\_moz_abspos="white"] {
   1.190 +  background-color: white !important;
   1.191 +}
   1.192 +*[\_moz_abspos="black"] {
   1.193 +  background-color: black !important;
   1.194 +}
   1.195 +
   1.196 +span[\_moz_anonclass="mozGrabber"] {
   1.197 +  outline: ridge 2px silver;
   1.198 +  padding: 2px;
   1.199 +  position: absolute;
   1.200 +  width: 12px;
   1.201 +  height: 12px;
   1.202 +  background-image: url("resource://gre/res/grabber.gif");
   1.203 +  background-repeat: no-repeat;
   1.204 +  background-position: center center;
   1.205 +  -moz-user-select: none;
   1.206 +  cursor: move;
   1.207 +}
   1.208 +
   1.209 +/* INLINE TABLE EDITING */
   1.210 +
   1.211 +a[\_moz_anonclass="mozTableAddColumnBefore"] {
   1.212 +  position: absolute;
   1.213 +  z-index: 2147483647; /* max value for this property */
   1.214 +  text-decoration: none !important;
   1.215 +  border: none 0px !important;
   1.216 +  width: 4px;
   1.217 +  height: 8px;
   1.218 +  background-image: url("resource://gre/res/table-add-column-before.gif");
   1.219 +  background-repeat: no-repeat;
   1.220 +  background-position: center center;
   1.221 +  -moz-user-select: none !important;
   1.222 +  -moz-user-focus: none !important;
   1.223 +}
   1.224 +
   1.225 +a[\_moz_anonclass="mozTableAddColumnBefore"]:hover {
   1.226 +  background-image: url("resource://gre/res/table-add-column-before-hover.gif");
   1.227 +}
   1.228 +
   1.229 +a[\_moz_anonclass="mozTableAddColumnBefore"]:active {
   1.230 +  background-image: url("resource://gre/res/table-add-column-before-active.gif");
   1.231 +}
   1.232 +
   1.233 +a[\_moz_anonclass="mozTableAddColumnAfter"] {
   1.234 +  position: absolute;
   1.235 +  z-index: 2147483647; /* max value for this property */
   1.236 +  text-decoration: none !important;
   1.237 +  border: none 0px !important;
   1.238 +  width: 4px;
   1.239 +  height: 8px;
   1.240 +  background-image: url("resource://gre/res/table-add-column-after.gif");
   1.241 +  background-repeat: no-repeat;
   1.242 +  background-position: center center;
   1.243 +  -moz-user-select: none !important;
   1.244 +  -moz-user-focus: none !important;
   1.245 +}
   1.246 +
   1.247 +a[\_moz_anonclass="mozTableAddColumnAfter"]:hover {
   1.248 +  background-image: url("resource://gre/res/table-add-column-after-hover.gif");
   1.249 +}
   1.250 +
   1.251 +a[\_moz_anonclass="mozTableAddColumnAfter"]:active {
   1.252 +  background-image: url("resource://gre/res/table-add-column-after-active.gif");
   1.253 +}
   1.254 +
   1.255 +a[\_moz_anonclass="mozTableRemoveColumn"] {
   1.256 +  position: absolute;
   1.257 +  z-index: 2147483647; /* max value for this property */
   1.258 +  text-decoration: none !important;
   1.259 +  border: none 0px !important;
   1.260 +  width: 8px;
   1.261 +  height: 8px;
   1.262 +  background-image: url("resource://gre/res/table-remove-column.gif");
   1.263 +  background-repeat: no-repeat;
   1.264 +  background-position: center center;
   1.265 +  -moz-user-select: none !important;
   1.266 +  -moz-user-focus: none !important;
   1.267 +}
   1.268 +
   1.269 +a[\_moz_anonclass="mozTableRemoveColumn"]:hover {
   1.270 +  background-image: url("resource://gre/res/table-remove-column-hover.gif");
   1.271 +}
   1.272 +
   1.273 +a[\_moz_anonclass="mozTableRemoveColumn"]:active {
   1.274 +  background-image: url("resource://gre/res/table-remove-column-active.gif");
   1.275 +}
   1.276 +
   1.277 +a[\_moz_anonclass="mozTableAddRowBefore"] {
   1.278 +  position: absolute;
   1.279 +  z-index: 2147483647; /* max value for this property */
   1.280 +  text-decoration: none !important;
   1.281 +  border: none 0px !important;
   1.282 +  width: 8px;
   1.283 +  height: 4px;
   1.284 +  background-image: url("resource://gre/res/table-add-row-before.gif");
   1.285 +  background-repeat: no-repeat;
   1.286 +  background-position: center center;
   1.287 +  -moz-user-select: none !important;
   1.288 +  -moz-user-focus: none !important;
   1.289 +}
   1.290 +
   1.291 +a[\_moz_anonclass="mozTableAddRowBefore"]:hover {
   1.292 +  background-image: url("resource://gre/res/table-add-row-before-hover.gif");
   1.293 +}
   1.294 +
   1.295 +a[\_moz_anonclass="mozTableAddRowBefore"]:active {
   1.296 +  background-image: url("resource://gre/res/table-add-row-before-active.gif");
   1.297 +}
   1.298 +
   1.299 +a[\_moz_anonclass="mozTableAddRowAfter"] {
   1.300 +  position: absolute;
   1.301 +  z-index: 2147483647; /* max value for this property */
   1.302 +  text-decoration: none !important;
   1.303 +  border: none 0px !important;
   1.304 +  width: 8px;
   1.305 +  height: 4px;
   1.306 +  background-image: url("resource://gre/res/table-add-row-after.gif");
   1.307 +  background-repeat: no-repeat;
   1.308 +  background-position: center center;
   1.309 +  -moz-user-select: none !important;
   1.310 +  -moz-user-focus: none !important;
   1.311 +}
   1.312 +
   1.313 +a[\_moz_anonclass="mozTableAddRowAfter"]:hover {
   1.314 +  background-image: url("resource://gre/res/table-add-row-after-hover.gif");
   1.315 +}
   1.316 +
   1.317 +a[\_moz_anonclass="mozTableAddRowAfter"]:active {
   1.318 +  background-image: url("resource://gre/res/table-add-row-after-active.gif");
   1.319 +}
   1.320 +
   1.321 +a[\_moz_anonclass="mozTableRemoveRow"] {
   1.322 +  position: absolute;
   1.323 +  z-index: 2147483647; /* max value for this property */
   1.324 +  text-decoration: none !important;
   1.325 +  border: none 0px !important;
   1.326 +  width: 8px;
   1.327 +  height: 8px;
   1.328 +  background-image: url("resource://gre/res/table-remove-row.gif");
   1.329 +  background-repeat: no-repeat;
   1.330 +  background-position: center center;
   1.331 +  -moz-user-select: none !important;
   1.332 +  -moz-user-focus: none !important;
   1.333 +}
   1.334 +
   1.335 +a[\_moz_anonclass="mozTableRemoveRow"]:hover {
   1.336 +  background-image: url("resource://gre/res/table-remove-row-hover.gif");
   1.337 +}
   1.338 +
   1.339 +a[\_moz_anonclass="mozTableRemoveRow"]:active {
   1.340 +  background-image: url("resource://gre/res/table-remove-row-active.gif");
   1.341 +}

mercurial