Expand description
Built-in user-agent default stylesheet. User-Agent Default Stylesheet for Azul
This module provides the default CSS styling that browsers apply to HTML elements before any author stylesheets are processed. It ensures consistent baseline behavior across all applications.
The user-agent stylesheet serves several critical functions:
-
Prevents Layout Collapse: Ensures root elements (
<html>,<body>) have default dimensions so that percentage-based child sizing can work correctly. -
Establishes Display Types: Defines the default
displayproperty for all HTML elements (e.g.,<div>isblock,<span>isinline). -
Provides Baseline Typography: Sets reasonable defaults for font sizes, margins, and text styling for headings, paragraphs, and other text elements.
-
Normalizes Browser Behavior: Incorporates principles from normalize.css to provide consistent rendering across different platforms.
§Licensing
Based on principles from normalize.css (MIT License, Copyright Nicolas Gallagher and Jonathan Neal). This is NOT a direct copy but incorporates its principles and approach.
§References
- CSS 2.1 Specification: https://www.w3.org/TR/CSS21/
- HTML Living Standard: https://html.spec.whatwg.org/
- normalize.css: https://necolas.github.io/normalize.css/
Structs§
- Resolved
UaScrollbar - Resolved UA scrollbar defaults after evaluating conditions.
Functions§
- evaluate_
ua_ scrollbar_ css - Evaluate UA scrollbar CSS rules against a
DynamicSelectorContext. - get_
ua_ property - Returns the default user-agent CSS property value for a given node type and property.