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

Method build

src/eepp/ui/css/stylesheetstyle.cpp:26–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26std::string StyleSheetStyle::build( bool emitMediaQueryStart, bool emitMediaQueryEnd ) {
27 std::string css;
28
29 if ( emitMediaQueryStart && mMediaQueryList && !mMediaQueryList->getQueryString().empty() )
30 css += mMediaQueryList->getQueryString() + " {\n\n";
31
32 css += mSelector.getName() + " {\n";
33
34 for ( auto& it : mVariables )
35 css += "\t" + it.second.getName() + ": " + it.second.getValue() + ";\n";
36
37 for ( auto& it : mProperties ) {
38 StyleSheetProperty& prop = it.second;
39
40 css += "\t" + prop.getName() + ": " + prop.getValue() + ";\n";
41 }
42
43 css += "}\n\n";
44
45 if ( emitMediaQueryEnd && mMediaQueryList && !mMediaQueryList->getQueryString().empty() )
46 css += "}\n\n";
47
48 return css;
49}
50
51const StyleSheetSelector& StyleSheetStyle::getSelector() const {
52 return mSelector;

Callers 1

printMethod · 0.45

Calls 3

emptyMethod · 0.45
getNameMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected