svg.css (2045B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 @namespace url(http://www.w3.org/2000/svg); 8 @namespace xml url(http://www.w3.org/XML/1998/namespace); 9 10 style, 11 script { 12 display: none; 13 } 14 15 svg { 16 -moz-min-font-size-ratio: 0%; 17 } 18 19 svg:not(:root), 20 symbol, 21 image, 22 marker, 23 pattern, 24 foreignObject { 25 overflow: hidden; 26 } 27 28 @media all and (-moz-is-glyph) { 29 :root { 30 fill: context-fill; 31 fill-opacity: context-fill-opacity; 32 stroke: context-stroke; 33 stroke-opacity: context-stroke-opacity; 34 stroke-width: context-value; 35 stroke-dasharray: context-value; 36 stroke-dashoffset: context-value; 37 } 38 } 39 40 foreignObject { 41 appearance: none !important; 42 margin: 0 !important; 43 padding: 0 !important; 44 border-width: 0 !important; 45 white-space: normal; 46 } 47 48 @media all and (-moz-is-resource-document) { 49 foreignObject *|* { 50 appearance: none !important; 51 } 52 } 53 54 *|*::-moz-svg-foreign-content { 55 display: block !important; 56 /* We need to be an absolute and fixed container */ 57 transform: translate(0) !important; 58 text-indent: 0; 59 } 60 61 /* Set |transform-origin:0 0;| for all SVG elements except outer-<svg>, 62 noting that 'svg' as a child of 'foreignObject' counts as outer-<svg>. 63 */ 64 *:not(svg), 65 *:not(foreignObject) > svg { 66 transform-origin: 0 0; 67 } 68 69 *|*::-moz-svg-text { 70 unicode-bidi: inherit; 71 vector-effect: inherit; 72 } 73 74 *[xml|space="preserve"] { 75 white-space: preserve-spaces; 76 } 77 78 *|*::-moz-svg-marker-anon-child { 79 clip-path: inherit; 80 filter: inherit; 81 mask: inherit; 82 opacity: inherit; 83 } 84 85 /* Make SVG shapes unselectable to avoid triggering AccessibleCaret on tap. 86 <mesh> will be supported in bug 1238882. */ 87 circle, 88 ellipse, 89 line, 90 mesh, 91 path, 92 polygon, 93 polyline, 94 rect { 95 user-select: none; 96 } 97 98 a:any-link { 99 /* We don't want SVG link to be underlined */ 100 text-decoration: none; 101 }