ELinks 0.18.0
apply.h File Reference
#include "util/lists.h"
Include dependency graph for apply.h:
This graph shows which files directly or indirectly include this file:

Functions

struct css_selectorget_css_selector_for_element (struct html_context *html_context, struct html_element *element, struct css_stylesheet *css, struct html_element list *html_stack)
 Gather all style information for the given element, so it can later be applied.
void apply_css_selector_style (struct html_context *html_context, struct html_element *element, struct css_selector *selector)
 Apply properties from an existing selector.
void css_apply (struct html_context *html_context, struct html_element *element, struct css_stylesheet *css, struct html_element list *html_stack)
 This function takes element and applies its 'style' attribute onto its attributes (if it contains such an attribute).

Detailed Description

This is the main entry point for the CSS micro-engine. It throws all the power of the stylesheets at a given element.

Function Documentation

◆ apply_css_selector_style()

void apply_css_selector_style ( struct html_context * html_context,
struct html_element * element,
struct css_selector * selector )

Apply properties from an existing selector.

◆ css_apply()

void css_apply ( struct html_context * html_context,
struct html_element * element,
struct css_stylesheet * css,
struct html_element list * html_stack )

This function takes element and applies its 'style' attribute onto its attributes (if it contains such an attribute).

◆ get_css_selector_for_element()

struct css_selector * get_css_selector_for_element ( struct html_context * html_context,
struct html_element * element,
struct css_stylesheet * css,
struct html_element list * html_stack )

Gather all style information for the given element, so it can later be applied.

Returned value should be freed using done_css_selector().