Clone in a terminal:
Commit 7825ea9
Johan Mattsson - 2016-01-14T23:58:33+00:00
7825ea96f0b0602a4a9b104e88194e0be2595a2fjohan.mattsson.m@gmail.com

Add custom values to the CSS inheritance table

Changed files (1)

Diff

diff --git a/libsvgbird/SvgStyle.vala b/libsvgbird/SvgStyle.valaindex 252c2e7..bc42b6f 100644--- a/libsvgbird/SvgStyle.vala+++ b/libsvgbird/SvgStyle.vala@@ -50,6 +50,19 @@ public class SvgStyle : GLib.Object { 		} 	} +	/** Specify inheritance for a CSS property. */+	public static bool set_inheritance (string property, bool inherit) {+		lock (inheritace) {+			if (unlikely (inheritance == null)) {+				create_inheritance_table ();+			}+			+			Gee.HashMap<string, string> inheritance = (!) inheritance;+			string inherit_property = inherit ? "yes" : "no";+			inheritance.set (property, inherit_property);+		}+	}+ 	public SvgStyle.for_properties (Defs? defs, string style) { 		parse_key_value_pairs (style); 		set_style_properties (defs, this);

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112