Closed msclecram closed 1 year ago
GumboNode* node = current_node;
if ( node->type == GUMBO_NODE_ELEMENT )
{
//get-all-attr
for (unsigned int i = 0; i < node->v.element.attributes.length; ++i)
{
GumboAttribute * attr = node->v.element.attributes.data[i];
...
}
//get-one-attr
GumboAttribute * href = gumbo_get_attribute(&node->v.element.attributes, "style");
...
}
Hope it can help you.
Hi,
I'm trying to get some style properties of each node, mainly color and background color.
I'm using gumbo-query and katana-parser together with gumbo-parser. I parse the css files, inline and style selectors with katana and I do queries with gumbo query. However doing a query to get which nodes affect a selector is very slow with big css files and also it seems I'm applying wrong the css priority rules.
Is there another solution to get the style properties of a node using gumbo-parser or libraries for gumbo parser?
Thanks.