summaryrefslogtreecommitdiffstats
path: root/share/attributes/genMapDataCSS.pl
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2012-10-08 10:58:24 +0000
committertavmjong-free <tavmjong@free.fr>2012-10-08 10:58:24 +0000
commita922470cc955d8f37b9d52b5ca5b3dc230e37448 (patch)
tree92e30456f006a9027b3c73b9247dcc9e5f613fb2 /share/attributes/genMapDataCSS.pl
parentextensions. maintain gettext compatibility with rev 11749 (diff)
downloadinkscape-a922470cc955d8f37b9d52b5ca5b3dc230e37448.tar.gz
inkscape-a922470cc955d8f37b9d52b5ca5b3dc230e37448.zip
Add Inkscape's flowed text elements and "text-align" property. Allow "title" attribute.
The "title" attribute is not in the SVG spec but is widely supported by browsers. (bzr r11753)
Diffstat (limited to 'share/attributes/genMapDataCSS.pl')
-rwxr-xr-xshare/attributes/genMapDataCSS.pl18
1 files changed, 16 insertions, 2 deletions
diff --git a/share/attributes/genMapDataCSS.pl b/share/attributes/genMapDataCSS.pl
index 498ce8bbe..76580c642 100755
--- a/share/attributes/genMapDataCSS.pl
+++ b/share/attributes/genMapDataCSS.pl
@@ -16,12 +16,14 @@ use HTML::TokeParser;
# Groups of elements defined in spec.
# Note "use" is not a container element but it acts like one!
+# Note "flowRoot, flowPara, flowSpan, flowRegion, and flowRect are Inkscape
+# specific (failed SVG1.2 items)
my @container_elements = ("a", "defs", "glyph", "g", "marker", "mask", "missing-glyph", "pattern", "svg", "switch", "symbol", "use");
my @graphics_elements = ("circle", "ellipse", "image", "line", "path", "polygon", "polyline", "rect", "text", "use");
my @filter_primitives = ("feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix",
"feDiffuseLighting", "feDisplacementMap", "feFlood", "feGaussianBlur", "feImage",
"feMerge", "feMorphology", "feOffset", "feSpecularLighting", "feTile", "feTurbulence" );
-my @text_content_elements = ("altGlyph", "textPath", "text", "tref", "tspan");
+my @text_content_elements = ("altGlyph", "textPath", "text", "tref", "tspan", "flowRoot", "flowPara", "flowSpan");
my @shapes = ("path", "rect", "circle", "ellipse", "line", "polyline", "polygon");
my @viewport = ("svg", "symbol", "foreignObject" );
@@ -154,6 +156,11 @@ push @{$properties{ "display" }->{elements}}, @graphics_elements;
push @{$properties{ "image-rendering" }->{elements}}, "pattern", "image", "feImage";
+# "title" isn't in the SVG spec (except for style sheets) but it is commonly supported by browsers
+push @{$properties{ "title" }->{elements}}, @graphics_elements, "g";
+$properties{ "title" }->{default} = "NO DEFAULT";
+$properties{ "title" }->{inherit} = "no";
+
push @{$properties{ "visibility" }->{elements}}, @graphics_elements;
@@ -166,10 +173,17 @@ $properties{ "marker-mid" }->{inherit} = $properties{ "marker-start" }->{inherit
# Inkscape uses CSS property 'line-height' even though this is not part of SVG spec.
-push @{$properties{ "line-height" }->{elements}}, "text";
+push @{$properties{ "line-height" }->{elements}}, "text", "flowRoot", "flowPara";
$properties{ "line-height" }->{default} = "NO DEFAULT";
$properties{ "line-height" }->{inherit} = "no";
+# Inkscape uses CSS property 'text-align' for flowed text. It is not an SVG 1.1 property
+# but is found in SVG 1.2 Tiny.
+push @{$properties{ "text-align" }->{elements}}, "flowRoot";
+$properties{ "text-align" }->{default} = "start";
+$properties{ "text-align" }->{inherit} = "yes";
+
+
# Output
open( DEFAULTS, ">css_defaults_new" ) or die "Couldn't open output";