LLMpediaThe first transparent, open encyclopedia generated by LLMs

CSS

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: World Wide Web Hop 2
Expansion Funnel Raw 67 → Dedup 41 → NER 38 → Enqueued 18
1. Extracted67
2. After dedup41 (None)
3. After NER38 (None)
Rejected: 3 (not NE: 3)
4. Enqueued18 (None)
Similarity rejected: 3
CSS
NameCascading Style Sheets
DeveloperW3C; originally Håkon Wium Lie and Bert Bos
Initial release1996
Latest releaseLevel 2/Level 3 modules (varies)
Programming languageCascading Style Sheets (stylesheet language)
Operating systemCross-platform
LicenseOpen standards

CSS is a stylesheet language designed to describe the presentation of documents authored in markup languages. It separates content from presentation and enables device-specific rendering for W3C-standardized agents like web browsers and user agents. Major contributors include individuals such as Håkon Wium Lie and Bert Bos, and institutions like the W3C and browser vendors such as Mozilla Corporation, Google, Microsoft, and Apple Inc..

History

The development of CSS began in the mid-1990s amid debates involving Tim Berners-Lee's World Wide Web expansion, with prototypes and proposals influenced by early browsers like Mosaic and Netscape Navigator. Formal adoption occurred through the W3C process alongside specifications such as HTML 4.0 and influenced by rendering engines like Gecko and WebKit. Subsequent iterations produced modular specifications—CSS2 and numerous CSS3 modules—developed with input from organizations including WHATWG, ECMA International, IETF, and browser vendors including Opera Software and Internet Explorer teams. Standards work has been shaped by events and fora such as W3C Technical Architecture Group meetings, WHATWG mailing list discussions, and cross-industry interoperability efforts like Microsoft EdgeHTML transitions.

Syntax and Basics

CSS syntax uses rulesets consisting of selectors and declaration blocks, a format formalized in specifications ratified by the W3C and influenced by parsing behaviors in engines like Blink and Gecko. Declarations pair property names with values and optional flags such as !important, reflecting conventions compatible with markup languages like HTML and XML. Language-level grammar and tokenization were refined through collaboration between authors and vendors during interoperable test suites and outputs by projects such as WebKitTestRunner and W3C Test Suites.

Selectors and Specificity

Selector syntax supports simple and complex patterns—element, class, ID, attribute, pseudo-class, and pseudo-element constructs—drawing from concepts used in selector libraries like jQuery and specifications such as Selectors Level 3. Specificity rules determine precedence and were formalized in W3C modules and vendor implementations including Gecko and Blink. Complex selector combinators and relational patterns echo ideas used in query languages such as XPath and influenced toolchains like Sizzle and CSS preprocessors developed by communities around Ruby on Rails and Node.js.

Box Model and Layout

The box model—content, padding, border, margin—underpins layout behavior in browsers including Mozilla Firefox, Google Chrome, Microsoft Edge, and Safari. Layout mechanisms expanded from floats and positioning to newer standards: Flexbox from Flexbox Module, Grid Layout from CSS Grid Layout, and multi-column flow in CSS Multi-column Layout. These modules were implemented progressively across engines like Gecko, Blink, and WebKit and adopted by frameworks and libraries such as Bootstrap, Foundation, and layout systems inspired by Android and iOS UI guidelines.

Styling and Visual Effects

Styling features encompass colors, backgrounds, fonts, and graphical effects. Font handling intersects with technologies like OpenType and services such as Google Fonts; effects leverage properties standardized in modules influenced by graphics work from SVG 1.1 and Canvas API discussions. Animations and transitions derive from specifications formalized in CSS Animations and CSS Transitions, and are implemented in engines developed by organizations including Apple Inc. and Mozilla Corporation. Visual enhancements also interact with accessibility standards from bodies like W3C Web Accessibility Initiative and publishing ecosystems such as PrintCSS workflows.

Cascading, Inheritance, and the Cascade Algorithm

The cascade algorithm reconciles competing rules based on origin (author, user, user-agent), specificity, importance, and order—principles codified by the W3C and reflected in browser implementations by Mozilla, Google, Microsoft, and Apple. Inheritance conveys certain property values from ancestor elements, a behavior relevant to document structures originating from languages like HTML and XML. Cross-vendor testing, interoperability events at W3C and community-driven suites influenced clarifications to cascade behaviors and conflict resolution strategies.

Implementations and Tooling

Implementations span layout and rendering engines: Blink (used by Google Chrome, Microsoft Edge recent builds), Gecko (used by Mozilla Firefox), and WebKit (used by Safari). Tooling includes developer tools in browsers (e.g., Chrome DevTools, Firefox Developer Tools), build systems like Webpack, preprocessors such as Sass, LESS, and post-processing tools like PostCSS. Testing and validation rely on suites maintained by the W3C and community projects hosted by organizations such as GitHub and initiatives like Can I use for compatibility data.

Category:Web standards