summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b97764)
raw | patch | inline | side by side (parent: 2b97764)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 27 Mar 2007 07:03:29 +0000 (07:03 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 27 Mar 2007 07:03:29 +0000 (07:03 +0000) |
src/style.cpp | patch | blob | history |
diff --git a/src/style.cpp b/src/style.cpp
index 722f1677d6cdbff319a81aafe9b076970dfe0aea..3ccdb7e97f0e98e6c521caf9d4a29332694924c4 100644 (file)
--- a/src/style.cpp
+++ b/src/style.cpp
static void
sp_style_merge_from_decl_list(SPStyle *const style, CRDeclaration const *const decl_list)
{
+ // read the decls from end to start, using head recursion, so that latter declarations override
+ // (Ref: http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order point 4.)
+ // because sp_style_merge_style_from_decl only sets properties that are unset
if (decl_list->next) {
sp_style_merge_from_decl_list(style, decl_list->next);
}