Loading editor/src/htmlimport.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -502,6 +502,21 @@ void applyFlexLayoutAttributes(tinyxml2::XMLElement *w, w->SetAttribute("direction", "vertical"); knownCss.push_back("flex-direction"); } } else { auto dispIt = cssProps.find("display"); if (dispIt != cssProps.end() && (dispIt->second == "flex" || dispIt->second == "inline-flex")) { // CSS defaults flex-direction to row when display:flex/inline-flex // is set without an explicit flex-direction. Without this, the // widget's own "direction" default (vertical/column -- see e.g. // Container::Render's `direction == "horizontal" ? "row" : // "column"` ternary) silently stacks children the source page // laid out side by side, and Container/Section/Article never // even switch on flex layout at all (their Render() only emits // `display: flex` when direction/align_items/vertical_align is // non-empty). w->SetAttribute("direction", "horizontal"); } } } Loading Loading
editor/src/htmlimport.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -502,6 +502,21 @@ void applyFlexLayoutAttributes(tinyxml2::XMLElement *w, w->SetAttribute("direction", "vertical"); knownCss.push_back("flex-direction"); } } else { auto dispIt = cssProps.find("display"); if (dispIt != cssProps.end() && (dispIt->second == "flex" || dispIt->second == "inline-flex")) { // CSS defaults flex-direction to row when display:flex/inline-flex // is set without an explicit flex-direction. Without this, the // widget's own "direction" default (vertical/column -- see e.g. // Container::Render's `direction == "horizontal" ? "row" : // "column"` ternary) silently stacks children the source page // laid out side by side, and Container/Section/Article never // even switch on flex layout at all (their Render() only emits // `display: flex` when direction/align_items/vertical_align is // non-empty). w->SetAttribute("direction", "horizontal"); } } } Loading