MCPcopy Create free account
hub / github.com/SpartanJ/eepp / print

Method print

src/eepp/ui/css/stylesheet.cpp:197–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197std::string StyleSheet::print() {
198 std::string str;
199 std::map<MediaQueryList::ptr, std::vector<StyleSheetStyle*>> byMQ;
200
201 for ( size_t i = 0; i < mNodes.size(); ++i ) {
202 auto node = mNodes[i];
203 byMQ[node->getMediaQueryList()].emplace_back( node.get() );
204 }
205
206 for ( const auto& mq : byMQ ) {
207 bool first = true;
208 for ( size_t q = 0; q < mq.second.size(); ++q ) {
209 const auto& style = mq.second[q];
210 str += style->build( first, q == mq.second.size() - 1 );
211 first = false;
212 }
213 }
214
215 return str;
216}
217
218void StyleSheet::combineStyleSheet( const StyleSheet& styleSheet ) {
219 for ( auto& style : styleSheet.getStyles() ) {

Callers 2

handle_stacktraceMethod · 0.45

Calls 3

sizeMethod · 0.45
getMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected