Open kozmaz87 opened 8 years ago
This seems to be related to #239. I cannot think of any reason not to push the styles down where they need to be. An optimising processor might also spot repeated (computed) style attribute values downstream and where possible float them up to the highest common level but that's really not essential for us to worry about.
@kozmaz87 has this been done?
This code is too spaghetti at the moment. The general problem is the following. You assume that there is a 1:1 correspondence with source styles and segmented styles, which is true as long as it is a singular document. But as soon as it gets into the merging phase of multiple documents it will cause trouble to find which styles were ultimately unused/moved or split into parts becasue of the horrid sizing requirements.
My guess is that the style on the body should be moved down to all the divs because styles on the body cannot be merged semantically in some cases.