The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Add custom values to the CSS inheritance table

These changes was commited to the Birdfont repository Thu, 14 Jan 2016 23:56:06 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Thu, 14 Jan 2016 23:56:06 +0000]

Updated Files

libsvgbird/SvgStyle.vala
--- a/libsvgbird/SvgStyle.vala +++ b/libsvgbird/SvgStyle.vala @@ -47,6 +47,19 @@ string inherited_property = (!) inherited; return inherited_property == "yes"; + } + } + + /** 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); } }