blob: cc2f0bab6d9d56f0195030c4ba839b0add63fdeb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include "html.h"
#include "el_style.h"
#include "document.h"
litehtml::el_style::el_style(const std::shared_ptr<document>& doc) : element(doc)
{
}
void litehtml::el_style::parse_attributes()
{
string text;
for(auto& el : m_children)
{
el->get_text(text);
}
get_document()->add_stylesheet( text.c_str(), nullptr, get_attr("media") );
}
bool litehtml::el_style::appendChild(const ptr &el)
{
m_children.push_back(el);
return true;
}
litehtml::string_id litehtml::el_style::tag() const
{
return _style_;
}
const char* litehtml::el_style::get_tagName() const
{
return "style";
}
|