diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-03-27 07:03:29 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-03-27 07:03:29 +0000 |
| commit | 64ed2087567e9982e89abc32b33f932314c271bd (patch) | |
| tree | e4f76034c0b7c478f4db5116210a0941af859db7 /src/style.cpp | |
| parent | make horizontal scrollbar automatic (diff) | |
| download | inkscape-64ed2087567e9982e89abc32b33f932314c271bd.tar.gz inkscape-64ed2087567e9982e89abc32b33f932314c271bd.zip | |
comment on the order of parsing declarations
(bzr r2769)
Diffstat (limited to 'src/style.cpp')
| -rw-r--r-- | src/style.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/style.cpp b/src/style.cpp index 722f1677d..3ccdb7e97 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -1128,6 +1128,9 @@ sp_style_merge_from_props(SPStyle *const style, CRPropList *const props) 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); } |
