Revise examples a little bit.
This commit is contained in:
parent
27ff72f2a5
commit
8ba0aff55c
|
@ -15,10 +15,8 @@ int main() {
|
|||
|
||||
html.push_back({"title", {}, "Google"});
|
||||
|
||||
docpp::CSS::Stylesheet sheet{};
|
||||
|
||||
sheet.push_back(docpp::CSS::Element(
|
||||
".center", {
|
||||
docpp::CSS::Stylesheet sheet{{
|
||||
{".center", {
|
||||
{"display", "flex"},
|
||||
{"flex-wrap", "wrap"},
|
||||
{"justify-content", "center"},
|
||||
|
@ -26,14 +24,11 @@ int main() {
|
|||
{"font-size", "10vw"},
|
||||
{"height", "10vw"},
|
||||
{"padding", "10vw"},
|
||||
}
|
||||
));
|
||||
|
||||
sheet.push_back(docpp::CSS::Element(
|
||||
"input[type=text], select", {
|
||||
}},
|
||||
{"input[type=text], select", {
|
||||
{"width", "50vw"},
|
||||
}
|
||||
));
|
||||
}},
|
||||
}};
|
||||
|
||||
html.push_back({"style", {}, sheet.get(docpp::CSS::FORMATTING_PRETTY)});
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ int main() {
|
|||
*
|
||||
* Note that it is very important that you do not append a section or element to a section until you have finished its construction,
|
||||
* because push_back() makes a copy of the object you pass to it. If you need to make changes later, you can use methods such as find() and swap(),
|
||||
* or construct a new object.
|
||||
* or construct a new object. An alternative is to append using the += operator, which does the same thing as push_back().
|
||||
*
|
||||
* To get the section as an std::string object, call section.get().
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue