2 * This is the main entry point for the CSS micro-engine. It throws
3 * all the power of the stylesheets at a given element. */
5 #ifndef EL__DOCUMENT_CSS_APPLY_H
6 #define EL__DOCUMENT_CSS_APPLY_H
8 #include "util/lists.h"
10 struct css_stylesheet
;
14 /** Gather all style information for the given @a element, so it can later be
15 * applied. Returned value should be freed using done_css_selector(). */
17 get_css_selector_for_element(struct html_context
*html_context
,
18 struct html_element
*element
,
19 struct css_stylesheet
*css
,
20 LIST_OF(struct html_element
) *html_stack
);
23 /** Apply properties from an existing selector. */
25 apply_css_selector_style(struct html_context
*html_context
,
26 struct html_element
*element
,
27 struct css_selector
*selector
);
29 /** This function takes @a element and applies its 'style' attribute onto its
30 * attributes (if it contains such an attribute). */
32 css_apply(struct html_context
*html_context
, struct html_element
*element
,
33 struct css_stylesheet
*css
,
34 LIST_OF(struct html_element
) *html_stack
);