file_path stringlengths 3 280 | file_language stringclasses 66 values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108 values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
crates/swc_html_minifier/tests/recovery/attribute/broken/output.min.html | HTML | <a b="="></a> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/attribute/duplicate/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div
data-test="one"
data-test="two"
></div>
<img src="test.png" alt="one" alt="two">
<img src="test.png" alt="one" alt="two" alt="three">
<img src="test.png" alt="one" alt="two" alt="three" src="test2.png">
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/attribute/duplicate/output.min.html | HTML | <!doctype html><html lang=en><meta charset=UTF-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0"><meta http-equiv=X-UA-Compatible content="ie=edge"><title>Document</title><div data-test=one></div>
<img src=test.png alt=one>
<img src=test.png alt=one>
<img src=test.png alt=one> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/doctype/html-4_01/input.html | HTML | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" >
<html>
<head>
<title>!DOCTYPE</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Test</p>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/doctype/html-4_01/output.min.html | HTML | <!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><title>!DOCTYPE</title><meta http-equiv=Content-Type content="text/html; charset=utf-8"><p>Test | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/doctype/html4-force-html5-doctype/input.html | HTML | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/doctype/html4-force-html5-doctype/output.min.html | HTML | <!doctype html><h1>My First Heading</h1>
<p>My first paragraph. | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/element/head/input.html | HTML | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head profile=" http://gmpg.org/xfn/11 ">
<title>XFN</title>
</head>
<body>
<p><a href="http://jeff.org" rel="friend met">
My friend Jeff
</a></p>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/element/head/output.min.html | HTML | <!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><head profile=http://gmpg.org/xfn/11><title>XFN</title><p><a href=http://jeff.org rel="friend met">
My friend Jeff
</a> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/element/pre/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<pre>
test
a
</pre>
<svg>
<pre>
test
a
</pre>
</svg>
<math>
<pre>
test
a
</pre>
</math>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/element/pre/output.min.html | HTML | <!doctype html><html lang=en><meta charset=UTF-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0"><meta http-equiv=X-UA-Compatible content="ie=edge"><title>Document</title><pre>
test
a
</pre>
<svg>
</svg><pre>
test
a
</pre>
<math>
</math><pre>
test
a
</pre> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/text/in-head/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
Test
</head>
<body>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_minifier/tests/recovery/text/in-head/output.min.html | HTML | <!doctype html><html lang=en><meta charset=UTF-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0"><meta http-equiv=X-UA-Compatible content="ie=edge"><title>Document</title>Test | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/benches/compare.rs | Rust | extern crate swc_malloc;
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{input::StringInput, FileName, Span, DUMMY_SP};
use swc_html_ast::{Document, DocumentFragment, DocumentMode, Element, Namespace};
use swc_html_parser::{lexer::Lexer, parser::Parser};
use swc_html_visit::{Fold, FoldWith, VisitMut, VisitMutWith};
static SOURCE: &str = include_str!("files/github_com_17_05_2022.html");
fn run_document<F>(b: &mut Bencher, mut op: F)
where
F: FnMut(Document) -> Document,
{
let _ = ::testing::run_test(false, |cm, _| {
let fm = cm.new_source_file(FileName::Anon.into(), SOURCE.into());
let lexer = Lexer::new(StringInput::from(&*fm));
let mut parser = Parser::new(lexer, Default::default());
let document: Document = parser.parse_document().unwrap();
b.iter(|| {
let document = document.clone();
let document = op(document);
black_box(document)
});
Ok(())
});
}
fn run_document_fragment<F>(b: &mut Bencher, mut op: F)
where
F: FnMut(DocumentFragment) -> DocumentFragment,
{
let _ = ::testing::run_test(false, |cm, _| {
let fm = cm.new_source_file(FileName::Anon.into(), SOURCE.into());
let lexer = Lexer::new(StringInput::from(&*fm));
let mut parser = Parser::new(lexer, Default::default());
let document_fragment: DocumentFragment = parser
.parse_document_fragment(
Element {
span: Default::default(),
tag_name: "template".into(),
namespace: Namespace::HTML,
attributes: Vec::new(),
is_self_closing: false,
children: Vec::new(),
content: None,
},
DocumentMode::NoQuirks,
None,
)
.unwrap();
b.iter(|| {
let document_fragment = document_fragment.clone();
let document_fragment = op(document_fragment);
black_box(document_fragment)
});
Ok(())
});
}
fn bench_cases(c: &mut Criterion) {
c.bench_function("html/document/visitor/compare/clone", |b| {
run_document(b, |m: Document| m)
});
c.bench_function("html/document/visitor/compare/visit_mut_span", |b| {
struct RespanVisitMut;
impl VisitMut for RespanVisitMut {
fn visit_mut_span(&mut self, span: &mut Span) {
*span = DUMMY_SP;
}
}
run_document(b, |mut m| {
m.visit_mut_with(&mut RespanVisitMut);
m
});
});
c.bench_function("html/document/visitor/compare/visit_mut_span_panic", |b| {
struct RespanVisitMut;
impl VisitMut for RespanVisitMut {
fn visit_mut_span(&mut self, span: &mut Span) {
*span = DUMMY_SP;
}
}
run_document(b, |mut m| {
m.visit_mut_with(&mut RespanVisitMut);
m
});
});
c.bench_function("html/document/visitor/compare/fold_span", |b| {
struct RespanFold;
impl Fold for RespanFold {
fn fold_span(&mut self, _: Span) -> Span {
DUMMY_SP
}
}
run_document(b, |m| m.fold_with(&mut RespanFold));
});
c.bench_function("html/document/visitor/compare/fold_span_panic", |b| {
struct RespanFold;
impl Fold for RespanFold {
fn fold_span(&mut self, _: Span) -> Span {
DUMMY_SP
}
}
run_document(b, |m| m.fold_with(&mut RespanFold));
});
c.bench_function("html/document_fragment/visitor/compare/clone", |b| {
run_document_fragment(b, |m: DocumentFragment| m)
});
c.bench_function(
"html/document_fragment/visitor/compare/visit_mut_span",
|b| {
struct RespanVisitMut;
impl VisitMut for RespanVisitMut {
fn visit_mut_span(&mut self, span: &mut Span) {
*span = DUMMY_SP;
}
}
run_document_fragment(b, |mut m| {
m.visit_mut_with(&mut RespanVisitMut);
m
});
},
);
c.bench_function(
"html/document_fragment/visitor/compare/visit_mut_span_panic",
|b| {
struct RespanVisitMut;
impl VisitMut for RespanVisitMut {
fn visit_mut_span(&mut self, span: &mut Span) {
*span = DUMMY_SP;
}
}
run_document_fragment(b, |mut m| {
m.visit_mut_with(&mut RespanVisitMut);
m
});
},
);
c.bench_function("html/document_fragment/visitor/compare/fold_span", |b| {
struct RespanFold;
impl Fold for RespanFold {
fn fold_span(&mut self, _: Span) -> Span {
DUMMY_SP
}
}
run_document_fragment(b, |m| m.fold_with(&mut RespanFold));
});
c.bench_function(
"html/document_fragment/visitor/compare/fold_span_panic",
|b| {
struct RespanFold;
impl Fold for RespanFold {
fn fold_span(&mut self, _: Span) -> Span {
DUMMY_SP
}
}
run_document_fragment(b, |m| m.fold_with(&mut RespanFold));
},
);
}
criterion_group!(benches, bench_cases);
criterion_main!(benches);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/benches/files/css_2021_spec.html | HTML | <!doctype html><html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
<title>CSS Snapshot 2021</title>
<meta content="NOTE" name="w3c-status">
<meta content="Bikeshed version 1f1661843, updated Wed Dec 15 11:50:57 2021 -0800" name="generator">
<link href="https://www.w3.org/TR/css-2021/" rel="canonical">
<meta content="13d5d82a5dc0c1f7bd45b44d4de98aed164c7486" name="document-revision">
<style>/* style-autolinks */
.css.css, .property.property, .descriptor.descriptor {
color: var(--a-normal-text);
font-size: inherit;
font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
content: "‘";
}
.css::after, .property::after, .descriptor::after {
content: "’";
}
.property, .descriptor {
/* Don't wrap property and descriptor names */
white-space: nowrap;
}
.type { /* CSS value <type> */
font-style: italic;
}
pre .property::before, pre .property::after {
content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
content: "’";
}
[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
content: "";
}
[data-link-type=element],
[data-link-type=element-attr] {
font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after { content: ">" }
[data-link-type=biblio] {
white-space: pre;
}</style>
<style>/* style-counters */
body {
counter-reset: example figure issue;
}
.issue {
counter-increment: issue;
}
.issue:not(.no-marker)::before {
content: "Issue " counter(issue);
}
.example {
counter-increment: example;
}
.example:not(.no-marker)::before {
content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
content: "Invalid Example" counter(example);
}
figcaption {
counter-increment: figure;
}
figcaption:not(.no-marker)::before {
content: "Figure " counter(figure) " ";
}</style>
<style>/* style-dfn-panel */
:root {
--dfnpanel-bg: #ddd;
--dfnpanel-text: var(--text);
}
.dfn-panel {
position: absolute;
z-index: 35;
height: auto;
width: -webkit-fit-content;
width: fit-content;
max-width: 300px;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.75em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: var(--dfnpanel-bg);
color: var(--dfnpanel-text);
border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: var(--dfnpanel-text); }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
display: inline-block;
position: fixed;
left: .5em;
bottom: 2em;
margin: 0 auto;
max-width: calc(100vw - 1.5em - .4em - .5em);
max-height: 30vh;
}
.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-issues */
a[href].issue-return {
float: right;
float: inline-end;
color: var(--issueheading-text);
font-weight: bold;
text-decoration: none;
}
</style>
<style>/* style-md-lists */
/* This is a weird hack for me not yet following the commonmark spec
regarding paragraph and lists. */
[data-md] > :first-child {
margin-top: 0;
}
[data-md] > :last-child {
margin-bottom: 0;
}</style>
<style>/* style-selflinks */
:root {
--selflink-text: white;
--selflink-bg: gray;
--selflink-hover-text: black;
}
.heading, .issue, .note, .example, li, dt {
position: relative;
}
a.self-link {
position: absolute;
top: 0;
left: calc(-1 * (3.5rem - 26px));
width: calc(3.5rem - 26px);
height: 2em;
text-align: center;
border: none;
transition: opacity .2s;
opacity: .5;
}
a.self-link:hover {
opacity: 1;
}
.heading > a.self-link {
font-size: 83%;
}
li > a.self-link {
left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
top: auto;
left: auto;
opacity: 0;
width: 1.5em;
height: 1.5em;
background: var(--selflink-bg);
color: var(--selflink-text);
font-style: normal;
transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
opacity: 1;
}
dfn > a.self-link:hover {
color: var(--selflink-hover-text);
}
a.self-link::before { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before { content: "#"; }
</style>
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-NOTE" rel="stylesheet">
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">CSS Snapshot 2021</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#NOTE">W3C Group Note</a>, <time class="dt-updated" datetime="2021-12-31">31 December 2021</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="https://www.w3.org/TR/2021/NOTE-css-2021-20211231/">https://www.w3.org/TR/2021/NOTE-css-2021-20211231/</a>
<dt>Latest published version:
<dd><a href="https://www.w3.org/TR/css-2021/">https://www.w3.org/TR/css-2021/</a>
<dt>Editor's Draft:
<dd><a href="https://drafts.csswg.org/css-2021/">https://drafts.csswg.org/css-2021/</a>
<dt>Previous Versions:
<dd><a href="https://www.w3.org/TR/2021/NOTE-css-2021-20211221/" rel="prev">https://www.w3.org/TR/2021/NOTE-css-2021-20211221/</a>
<dt>History:
<dd><a class="u-url" href="https://www.w3.org/standards/history/css-2021">https://www.w3.org/standards/history/css-2021</a>
<dt>Feedback:
<dd><a href="https://github.com/w3c/csswg-drafts/labels/css-2021">CSSWG Issues Repository</a>
<dt class="editor">Editors:
<dd class="editor p-author h-card vcard" data-editor-id="42199"><a class="p-name fn u-url url" href="http://xanthir.com/">Tab Atkins Jr.</a> (<span class="p-org org">Google</span>)
<dd class="editor p-author h-card vcard" data-editor-id="35400"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">Elika J. Etemad / fantasai</a> (<span class="p-org org">Invited Expert</span>)
<dd class="editor p-author h-card vcard" data-editor-id="43241"><a class="p-name fn u-url url" href="https://florian.rivoal.net">Florian Rivoal</a> (<span class="p-org org">Invited Expert</span>)
<dt>Suggest an Edit for this Spec:
<dd><a href="https://github.com/w3c/csswg-drafts/blob/main/css-2021/Overview.bs">GitHub Editor</a>
</dl>
</div>
</details>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2021 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document" rel="license">permissive document license</a> rules apply. </p>
<hr title="Separator for header">
</div>
<div class="p-summary" data-fill-with="abstract">
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<p>This document collects together into one definition all the specs that
together form the current state of Cascading Style Sheets (CSS) as of 2021.
The primary audience is CSS implementers, not CSS authors, as this definition
includes modules by specification stability, not Web browser adoption rate.</p>
<a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc.
</div>
<h2 class="no-num no-toc no-ref heading settled" id="sotd"><span class="content">Status of this document</span></h2>
<div data-fill-with="status">
<p><em>This section describes the status of this document at the time of its publication.
A list of current W3C publications
and the latest revision of this technical report
can be found in the <a href="https://www.w3.org/TR/">W3C technical reports index at https://www.w3.org/TR/.</a></em> </p>
<p data-deliverer="32061"> This document was published
by the <a href="https://www.w3.org/groups/wg/css">CSS Working Group</a> as a Group Note
using the <a href="https://www.w3.org/2021/Process-20211102/#recs-and-notes">Note track</a>.
Group Notes are not endorsed by W3C nor its Members. </p>
<p>Please send feedback
by <a href="https://github.com/w3c/csswg-drafts/issues">filing issues in GitHub</a> (preferred),
including the spec code “css-2021” in the title, like this:
“[css-2021] <i>…summary of comment…</i>”.
All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>.
Alternately, feedback can be sent to the (<a href="https://lists.w3.org/Archives/Public/www-style/">archived</a>) public mailing list <a href="mailto:www-style@w3.org?Subject=%5Bcss-2021%5D%20PUT%20SUBJECT%20HERE">www-style@w3.org</a>. </p>
<p>This document is governed by the <a href="https://www.w3.org/2021/Process-20211102/" id="w3c_process_revision">2 November 2021 W3C Process Document</a>. </p>
<p>The <a href="https://www.w3.org/Consortium/Patent-Policy-20200915/">15 September 2020 W3C Patent Policy</a> does not carry any licensing requirements or commitments on this document. </p>
<p></p>
<p>This document represents the state of CSS as of 2021.
The CSS Working Group does not expect any further changes to this document:
new snapshots will be published at <a href="https://www.w3.org/TR/CSS/">https://www.w3.org/TR/CSS/</a> as CSS advances.</p>
</div>
<div data-fill-with="at-risk"></div>
<nav data-fill-with="table-of-contents" id="toc">
<h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
<ol class="toc" role="directory">
<li>
<a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a>
<ol class="toc">
<li><a href="#w3c-process"><span class="secno">1.1</span> <span class="content"> Background: The W3C Process and CSS</span></a>
</ol>
<li>
<a href="#module-classification"><span class="secno">2</span> <span class="content"> Classification of CSS Specifications</span></a>
<ol class="toc">
<li><a href="#css"><span class="secno">2.1</span> <span class="content">Cascading Style Sheets (CSS) — The Official Definition</span></a>
<li><a href="#fairly-stable"><span class="secno">2.2</span> <span class="content"> Fairly Stable Modules with limited implementation experience</span></a>
<li><a href="#rough-interop"><span class="secno">2.3</span> <span class="content"> Modules with Rough Interoperability</span></a>
<li><a href="#css-levels"><span class="secno">2.4</span> <span class="content"> CSS Levels</span></a>
<li><a href="#profiles"><span class="secno">2.5</span> <span class="content"> CSS Profiles</span></a>
</ol>
<li>
<a href="#responsible"><span class="secno">3</span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
<ol class="toc">
<li><a href="#partial"><span class="secno">3.1</span> <span class="content">Partial Implementations</span></a>
<li>
<a href="#future-proofing"><span class="secno">3.2</span> <span class="content">Implementations of Unstable and Proprietary Features</span></a>
<ol class="toc">
<li><a href="#experimental"><span class="secno">3.2.1</span> <span class="content"> Experimentation and Unstable Features</span></a>
<li><a href="#proprietary"><span class="secno">3.2.2</span> <span class="content"> Proprietary and Non-standardized Features</span></a>
<li><a href="#de-facto"><span class="secno">3.2.3</span> <span class="content"> Market Pressure and De Facto Standards</span></a>
</ol>
<li><a href="#testing"><span class="secno">3.3</span> <span class="content">Implementations of CR-level Features</span></a>
</ol>
<li><a href="#CR-exceptions"><span class="secno">4</span> <span class="content"> Safe to Release pre-CR Exceptions</span></a>
<li>
<a href="#indices"><span class="secno">5</span> <span class="content">Indices</span></a>
<ol class="toc">
<li><a href="#terms"><span class="secno">5.1</span> <span class="content">Terms Index</span></a>
<li><a href="#selectors"><span class="secno">5.2</span> <span class="content">Selector Index</span></a>
<li><a href="#at-rules"><span class="secno">5.3</span> <span class="content"> At-Rule Index</span></a>
<li><a href="#properties"><span class="secno">5.4</span> <span class="content">Property Index</span></a>
<li><a href="#values"><span class="secno">5.5</span> <span class="content">Values Index</span></a>
</ol>
<li><a href="#acks"><span class="secno">6</span> <span class="content">Acknowledgements</span></a>
<li>
<a href="#w3c-conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
<ol class="toc">
<li><a href="#w3c-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
<li><a href="#w3c-conformance-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
<li>
<a href="#w3c-partial"><span class="secno"></span> <span class="content"> Partial implementations</span></a>
<ol class="toc">
<li><a href="#w3c-conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
</ol>
<li><a href="#w3c-testing"><span class="secno"></span> <span class="content"> Non-experimental implementations</span></a>
</ol>
<li>
<a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ol class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ol>
</ol>
</nav>
<main>
<h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2>
<p>When the first CSS specification was published,
all of CSS was contained in one document that defined CSS Level 1.
CSS Level 2 was defined also by a single, multi-chapter document.
However for CSS beyond Level 2,
the CSS Working Group chose to adopt a modular approach,
where each module defines a part of CSS,
rather than to define a single monolithic specification.
This breaks the specification into more manageable chunks
and allows more immediate, incremental improvement to CSS.</p>
<p>Since different CSS modules are at different levels of stability,
the CSS Working Group has chosen to publish this profile
to define the current scope and state of Cascading Style Sheets as of 2021.</p>
<h3 class="heading settled" data-level="1.1" id="w3c-process"><span class="secno">1.1. </span><span class="content"> Background: The W3C Process and CSS</span><a class="self-link" href="#w3c-process"></a></h3>
<p><em>This section is non-normative.</em></p>
<p>In the <a href="https://www.w3.org/Consortium/Process/">W3C Process</a>,
a Recommendation-track document passes through three levels of stability,
summarized below:</p>
<dl>
<dt>Working Draft (WD)
<dd>
<p>This is the design phase of a W3C spec.
The WG iterates the spec in response to internal and external feedback.</p>
<p>The first official Working Draft is designated the “First Public Working Draft” (FPWD).
In the CSSWG, publishing FPWD indicates that the Working Group as a whole has agreed to work on the module,
roughly as scoped out and proposed in the editor’s draft.</p>
<p>The transition to the next stage is sometimes called “Last Call Working Draft” (LCWD) phase.
The CSSWG transitions Working Drafts once we have resolved all known issues,
and can make no further progress without feedback from building tests and implementations.</p>
<p>This “Last Call for Comments” sets a deadline for reporting any outstanding issues,
and requires the WG to specially track and address incoming feedback.
The comment-tracking document is the Disposition of Comments (DoC).
It is submitted along with an updated draft for the Director’s approval,
to demonstrate wide review and acceptance.</p>
<dt>Candidate Recommendation (CR)
<dd>
This is the testing phase of a W3C spec.
Notably, this phase is about using tests and implementations to test the specification:
it is not about testing the implementations.
This process often reveals more problems with the spec,
and so a Candidate Recommendation will morph over time in response to implementation and testing feedback,
though usually less so than during the design phase (WD).
<p>Demonstration of two correct, independent implementations of each feature is required to exit CR,
so in this phase the WG builds a test suite and generates implementation reports.</p>
<p>The transition to the next stage is “Proposed Recommendation” (PR).
During this phase the W3C Advisory Committee must approve the transition to REC.</p>
<dt>Recommendation (REC)
<dd> This is the completed state of a W3C spec and represents a maintenance phase.
At this point the WG only maintains an errata document
and occasionally publishes an updated edition that incorporates the errata back into the spec.
</dl>
<p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="editors-draft">Editor’s Draft</dfn> is effectively a live copy of the editors’ own working copy.
It may or may not reflect Working Group consensus,
and can at times be in a self-inconsistent state.
(Because the publishing process at W3C is time-consuming and onerous,
the <a data-link-type="dfn" href="#editors-draft" id="ref-for-editors-draft">Editor’s Draft</a> is usually the best (most up-to-date) reference for a spec.
Efforts are currently underway to reduce the friction of publishing,
so that official drafts will be regularly up-to-date
and <span id="ref-for-editors-draft①">Editor’s Drafts</span> can return to their original function as scratch space.)</p>
<h2 class="heading settled" data-level="2" id="module-classification"><span class="secno">2. </span><span class="content"> Classification of CSS Specifications</span><a class="self-link" href="#module-classification"></a></h2>
<p><strong class="advisement"> A list of all CSS modules, stable and in-progress,
and their statuses
can be found at the <a href="https://www.w3.org/Style/CSS/current-work">CSS Current Work page</a>.</strong></p>
<h3 class="heading settled" data-level="2.1" id="css"><span class="secno">2.1. </span><span class="content">Cascading Style Sheets (CSS) — The Official Definition</span><a class="self-link" href="#css"></a></h3>
<p>This profile includes only specifications that we consider stable <em>and</em> for which we have enough implementation experience that we are sure of that stability.</p>
<p class="note" role="note"><span>Note:</span> This is not intended to be a CSS Desktop Browser Profile:
inclusion in this profile is based on feature stability only
and not on expected use or Web browser adoption.
This profile defines CSS in its most complete form.</p>
<p class="note" role="note"><span>Note:</span> Although we don’t anticipate significant changes to the specifications that form this snapshot,
their inclusion does not mean they are frozen.
The Working Group will continue to address problems as they are found in these specs.
Implementers should monitor <a href="https://lists.w3.org/Archives/Public/www-style/">www-style</a> and/or the <a href="https://www.w3.org/blog/CSS">CSS Working Group Blog</a> for any resulting changes, corrections, or clarifications.</p>
<p>As of 2021, <dfn data-dfn-type="dfn" data-export id="cascading-style-sheets-css">Cascading Style Sheets (CSS)<a class="self-link" href="#cascading-style-sheets-css"></a></dfn> is defined by the following
specifications.</p>
<dl>
<dt><a href="https://www.w3.org/TR/CSS2/">CSS Level 2, latest revision</a> (including errata) <a data-link-type="biblio" href="#biblio-css2">[CSS2]</a>
<dd> This defines the core of CSS, parts of which are overridden by later specifications.
We recommend in particular reading <a href="https://www.w3.org/TR/CSS2/intro.html">Chapter 2</a>,
which introduces some of the basic concepts of CSS
and its design principles.
<dt><a href="https://www.w3.org/TR/css-syntax-3/">CSS Syntax Level 3</a> <a data-link-type="biblio" href="#biblio-css-syntax-3">[CSS-SYNTAX-3]</a>
<dd> Replaces CSS2§4.1, CSS2§4.2, CSS2§4.4, and CSS2§G,
redefining how CSS is parsed.
<dt><a href="https://www.w3.org/TR/css-style-attr/">CSS Style Attributes</a> <a data-link-type="biblio" href="#biblio-css-style-attr">[CSS-STYLE-ATTR]</a>
<dd> Defines how CSS declarations can be embedded in markup attributes.
<dt><a href="https://www.w3.org/TR/css3-mediaqueries/">Media Queries Level 3</a> <a data-link-type="biblio" href="#biblio-css3-mediaqueries">[CSS3-MEDIAQUERIES]</a>
<dd> Replaces CSS2§7.3 and expands on the syntax for media-specific styles.
<dt><a href="https://www.w3.org/TR/css-conditional-3/">CSS Conditional Rules Level 3</a> <a data-link-type="biblio" href="#biblio-css-conditional-3">[CSS-CONDITIONAL-3]</a>
<dd> Extends and supersedes CSS2§7.2,
updating the definition of <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css3-conditional/#at-ruledef-media" id="ref-for-at-ruledef-media">@media</a> rules to allow nesting
and introducing the <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css3-conditional/#at-ruledef-supports" id="ref-for-at-ruledef-supports">@supports</a> rule for feature-support queries.
<dt><a href="https://www.w3.org/TR/selectors-3/">Selectors Level 3</a> <a data-link-type="biblio" href="#biblio-selectors-3">[SELECTORS-3]</a>
<dd> Replaces CSS2§5 and CSS2§6.4.3, defining an extended range of selectors.
<dt><a href="https://www.w3.org/TR/css-namespaces/">CSS Namespaces</a> <a data-link-type="biblio" href="#biblio-css3-namespace">[CSS3-NAMESPACE]</a>
<dd> Introduces an <span class="css">@namespace</span> rule to allow namespace-prefixed selectors.
<dt><a href="https://www.w3.org/TR/css-cascade-4/">CSS Cascading and Inheritance Level 4</a> <a data-link-type="biblio" href="#biblio-css-cascade-4">[CSS-CASCADE-4]</a>
<dd> Extends and supersedes CSS2§1.4.3 and CSS2§6, as well as <a data-link-type="biblio" href="#biblio-css-cascade-3">[CSS-CASCADE-3]</a>.
Describes how to collate style rules and assign values to all properties on all elements.
By way of cascading and inheritance, values are propagated for all properties on all elements.
<dt><a href="https://www.w3.org/TR/css-values-3/">CSS Values and Units Level 3</a> <a data-link-type="biblio" href="#biblio-css-values-3">[CSS-VALUES-3]</a>
<dd> Extends and supersedes CSS2§1.4.2.1, CSS2§4.3, and CSS2§A.2.1–3,
defining CSS’s property definition syntax
and expanding its set of units.
<dt><a href="https://www.w3.org/TR/css-variables-1/">CSS Custom Properties for Cascading Variables Module Level 1</a> <a data-link-type="biblio" href="#biblio-css-variables-1">[CSS-VARIABLES-1]</a>
<dd> Introduces cascading variables as a new primitive value type that is accepted by all CSS properties,
and custom properties for defining them.
<dt><a href="https://www.w3.org/TR/css-box-3/">CSS Box Model Level 3</a> <a data-link-type="biblio" href="#biblio-css-box-3">[CSS-BOX-3]</a>
<dd> Replaces CSS2§8.1, §8.2, §8.3 (but not §8.3.1), and §8.4.
<dt><a href="https://www.w3.org/TR/css-color-3/">CSS Color Level 3</a> <a data-link-type="biblio" href="#biblio-css-color-3">[CSS-COLOR-3]</a>
<dd> Extends and supersedes CSS2§4.3.6, CSS2§14.1, and CSS2§18.2,
introducing an extended range of color values.
Also introduces the <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-color-4/#propdef-opacity" id="ref-for-propdef-opacity">opacity</a> property.
<dt><a href="https://www.w3.org/TR/css-backgrounds-3/">CSS Backgrounds and Borders Level 3</a> <a data-link-type="biblio" href="#biblio-css-backgrounds-3">[CSS-BACKGROUNDS-3]</a>
<dd> Extends and supersedes CSS2§8.5 and CSS2§14.2,
providing more control of backgrounds and borders,
including layered background images,
image borders,
and drop shadows.
<dt><a href="https://www.w3.org/TR/css-images-3/">CSS Images Level 3</a> <a data-link-type="biblio" href="#biblio-css-images-3">[CSS-IMAGES-3]</a>
<dd> Redefines and incorporates the external 2D image value type,
introduces native 2D gradients,
and adds additional controls for replaced element sizing and rendering.
<dt><a href="https://www.w3.org/TR/css-fonts-3/">CSS Fonts Level 3</a> <a data-link-type="biblio" href="#biblio-css-fonts-3">[CSS-FONTS-3]</a>
<dd> Extends and supersedes CSS2§15
and provides more control over font choice and feature selection.
<dt><a href="https://www.w3.org/TR/css-writing-modes-3/">CSS Writing Modes Level 3</a> <a data-link-type="biblio" href="#biblio-css-writing-modes-3">[CSS-WRITING-MODES-3]</a>
<dd> Defines CSS support for various international writing modes,
such as left-to-right (e.g. Latin or Indic),
right-to-left (e.g. Hebrew or Arabic),
bidirectional (e.g. mixed Latin and Arabic) and vertical (e.g. Asian scripts).
Replaces and extends CSS2§8.6 and §9.10.
<dt><a href="https://www.w3.org/TR/css-multicol-1/">CSS Multi-column Layout Level 1</a> <a data-link-type="biblio" href="#biblio-css-multicol-1">[CSS-MULTICOL-1]</a>
<dd> Introduces multi-column flows to CSS layout.
<dt><a href="https://www.w3.org/TR/css-flexbox-1/">CSS Flexible Box Module Level 1</a> <a data-link-type="biblio" href="#biblio-css-flexbox-1">[CSS-FLEXBOX-1]</a>
<dd> Introduces a flexible linear layout model for CSS.
<dt><a href="https://www.w3.org/TR/css-ui-3/">CSS User Interface Module Level 3</a> <a data-link-type="biblio" href="#biblio-css-ui-3">[CSS-UI-3]</a>
<dd> Extends and supersedes CSS2§18.1 and CSS2§18.4,
defining <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-ui-3/#propdef-cursor" id="ref-for-propdef-cursor">cursor</a>, <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-ui-3/#propdef-outline" id="ref-for-propdef-outline">outline</a>, and several new CSS features that also enhance the user interface.
<dt><a href="https://www.w3.org/TR/css-contain-1/">CSS Containment Module Level 1</a> <a data-link-type="biblio" href="#biblio-css-contain-1">[CSS-CONTAIN-1]</a>
<dd> Introduces the <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-contain-1/#propdef-contain" id="ref-for-propdef-contain">contain</a> property,
which enforces the independent CSS processing of an element’s subtree
in order to enable heavy optimizations by user agents when used well.
<dt><a href="https://www.w3.org/TR/css-transforms-1/">CSS Transforms Level 1</a> <a data-link-type="biblio" href="#biblio-css-transforms-1">[CSS-TRANSFORMS-1]</a>
<dd> Introduces coordinate-based graphical transformations to CSS.
<dt><a href="https://www.w3.org/TR/compositing-1/">CSS Compositing and Blending Level 1</a> <a data-link-type="biblio" href="#biblio-compositing">[COMPOSITING]</a>
<dd> Defines the compositing and blending of overlaid content
and introduces features to control their modes.
<dt><a href="https://www.w3.org/TR/css-easing-1/">CSS Easing Functions Level 1</a> <a data-link-type="biblio" href="#biblio-css-easing-1">[CSS-EASING-1]</a>.
<dd> Describes a way for authors to define a transformation
that controls the rate of change of some value.
Applied to animations,
such transformations can be used to produce animations
that mimic physical phenomena such as momentum
or to cause the animation to move in discrete steps producing robot-like movement.
<dt><a href="https://www.w3.org/TR/css-counter-styles-3/">CSS Counter Styles Level 3</a> <a data-link-type="biblio" href="#biblio-css-counter-styles-3">[CSS-COUNTER-STYLES-3]</a>
<dd> Introduces the <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-counter-styles-3/#at-ruledef-counter-style" id="ref-for-at-ruledef-counter-style">@counter-style</a> rule,
which allows authors to define their own custom counter styles
for use with CSS list-marker and generated-content counters <a data-link-type="biblio" href="#biblio-css-lists-3">[CSS-LISTS-3]</a>.
It also predefines a set of common counter styles,
including the ones present in CSS2 and CSS2.1.
</dl>
<h3 class="heading settled" data-level="2.2" id="fairly-stable"><span class="secno">2.2. </span><span class="content"> Fairly Stable Modules with limited implementation experience</span><a class="self-link" href="#fairly-stable"></a></h3>
<p>The following modules have completed design work,
and are fairly stable,
but have not received much testing and implementation experience yet.
We hope to incorporate them into the <a href="#css">official definition of CSS</a> in a future snapshot.</p>
<dl>
<dt><a href="https://www.w3.org/TR/mediaqueries-4/">Media Queries Level 4</a> <a data-link-type="biblio" href="#biblio-mediaqueries-4">[MEDIAQUERIES-4]</a>
<dd> Extends and supersedes <a data-link-type="biblio" href="#biblio-css3-mediaqueries">[CSS3-MEDIAQUERIES]</a>,
expanding the syntax, deprecating most media types,
and introducing new media features.
<dt><a href="https://www.w3.org/TR/css-color-4/">CSS Color Level 4</a> <a data-link-type="biblio" href="#biblio-css-color-4">[CSS-COLOR-4]</a>
<dd> Extends and supersedes <a data-link-type="biblio" href="#biblio-css-color-3">[CSS-COLOR-3]</a>,
further expanding the range of colors expressible in CSS.
<dt><a href="https://www.w3.org/TR/css-display-3/">CSS Display Module Level 3</a> <a data-link-type="biblio" href="#biblio-css-display-3">[CSS-DISPLAY-3]</a>
<dd> Replaces CSS2§9.1.2, §9.2.1 (but not §9.2.1.1), §9.2.2 (but not §9.2.2.1), §9.2.3, and §9.2.4 (and lays the foundations for replacing §9.7),
defining how the CSS formatting box tree is generated
from the document element tree
and defining the <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-display-3/#propdef-display" id="ref-for-propdef-display">display</a> property that controls it.
<dt><a href="https://www.w3.org/TR/css-writing-modes-4/">CSS Writing Modes Level 4</a> <a data-link-type="biblio" href="#biblio-css-writing-modes-4">[CSS-WRITING-MODES-4]</a>
<dd> Extends and supersedes <a data-link-type="biblio" href="#biblio-css-writing-modes-3">[CSS-WRITING-MODES-3]</a>,
adding more options for vertical writing.
<dt><a href="https://www.w3.org/TR/css-break-3/">CSS Fragmentation Module Level 3</a> <a data-link-type="biblio" href="#biblio-css-break-3">[CSS-BREAK-3]</a>
<dd> Describes the fragmentation model that partitions a flow into pages, columns, or regions
and defines properties that control it.
Extends and supersedes CSS2§13.3.
<dt><a href="https://www.w3.org/TR/css-align-3/">CSS Box Alignment Module Level 3</a> <a data-link-type="biblio" href="#biblio-css-align-3">[CSS-ALIGN-3]</a>
<dd> Introduces properties to control the alignment of boxes
within their containers in the various CSS box layout models:
block layout, table layout, flex layout, and grid layout.
<dt><a href="https://www.w3.org/TR/css-shapes-1/">CSS Shapes Module Level 1</a> <a data-link-type="biblio" href="#biblio-css-shapes-1">[CSS-SHAPES-1]</a>
<dd> Extends floats (CSS2§9.5) to effect non-rectangular wrapping shapes.
<dt><a href="https://www.w3.org/TR/css-text-3/">CSS Text Module Level 3</a> <a data-link-type="biblio" href="#biblio-css-text-3">[CSS-TEXT-3]</a>
<dd> Extends and supersedes CSS2§16 excepting §16.2,
defining properties for text manipulation and specifying their processing model.
It covers line breaking, justification and alignment, white space handling, and text transformation.
<dt><a href="https://www.w3.org/TR/css-text-decor-3/">CSS Text Decoration Level 3</a> <a data-link-type="biblio" href="#biblio-css-text-decor-3">[CSS-TEXT-DECOR-3]</a>
<dd> Extends and supersedes CSS2§16.3,
providing more control over text decoration lines
and adding the ability to specify text emphasis marks
and text shadows.
<dt><a href="https://www.w3.org/TR/css-masking-1/">CSS Masking Level 1</a> <a data-link-type="biblio" href="#biblio-css-masking-1">[CSS-MASKING-1]</a>
<dd> Replaces CSS2§11.1.2
and introduces more powerful ways of clipping and masking content.
<dt><a href="https://www.w3.org/TR/css-scroll-snap-1/">CSS Scroll Snap Module Level 1</a> <a data-link-type="biblio" href="#biblio-css-scroll-snap-1">[CSS-SCROLL-SNAP-1]</a>
<dd> Contains features to control panning and scrolling behavior with “snap positions”.
<dt><a href="https://www.w3.org/TR/css-speech-1/">CSS Speech Module Level 1</a> <a data-link-type="biblio" href="#biblio-css-speech-1">[CSS-SPEECH-1]</a>
<dd> Replaces CSS2§A,
overhauling the (non-normative) speech rendering chapter.
<dt><a href="https://www.w3.org/TR/css-scrollbars-1/">CSS Scrollbars Styling Module Level 1</a> <a data-link-type="biblio" href="#biblio-css-scrollbars-1">[CSS-SCROLLBARS-1]</a>
<dd> Defines properties to influence the visual styling of scrollbars,
introducing controls for their color and width.
</dl>
<h3 class="heading settled" data-level="2.3" id="rough-interop"><span class="secno">2.3. </span><span class="content"> Modules with Rough Interoperability</span><a class="self-link" href="#rough-interop"></a></h3>
<p>Although the following modules have been widely deployed with <a data-link-type="dfn" href="#rough-interoperability" id="ref-for-rough-interoperability">rough interoperability</a>,
their details are not fully worked out or sufficiently well-specified
and they need more testing and bugfixing.
We hope to incorporate them into the <a href="#css">official definition of CSS</a> in a future snapshot.</p>
<dl>
<dt><a href="https://www.w3.org/TR/css-transitions-1/">CSS Transitions Level 1</a> <a data-link-type="biblio" href="#biblio-css-transitions-1">[CSS-TRANSITIONS-1]</a> and <a href="https://www.w3.org/TR/css-animations-1/">CSS Animations Level 1</a> <a data-link-type="biblio" href="#biblio-css-animations-1">[CSS-ANIMATIONS-1]</a>.
<dd> Introduces mechanisms for transitioning the computed values of CSS properties over time.
<dt><a href="https://www.w3.org/TR/css-grid-1/">CSS Grid Layout Module Level 1</a> <a data-link-type="biblio" href="#biblio-css-grid-1">[CSS-GRID-1]</a>
<dd> Introduces a two-dimensional grid-based layout system,
optimized for user interface design.
In the grid layout model, the children of a grid container
can be positioned into arbitrary slots in a predefined flexible or fixed-size layout grid.
<dt><a href="https://www.w3.org/TR/css-grid-2/">CSS Grid Layout Module Level 2</a> <a data-link-type="biblio" href="#biblio-css-grid-2">[CSS-GRID-2]</a>
<dd> Extends and supersedes <a data-link-type="biblio" href="#biblio-css-grid-1">[CSS-GRID-1]</a>,
introducing “subgrids” for managing nested markup in a shared grid framework.
<dt><a href="https://www.w3.org/TR/css-will-change-1/">CSS Will Change Level 1</a> <a data-link-type="biblio" href="#biblio-css-will-change-1">[CSS-WILL-CHANGE-1]</a>
<dd> Introduces a performance hint property called <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-will-change-1/#propdef-will-change" id="ref-for-propdef-will-change">will-change</a>.
<dt><a href="https://www.w3.org/TR/filter-effects-1/">Filter Effects Module Level 1</a> <a data-link-type="biblio" href="#biblio-filter-effects-1">[FILTER-EFFECTS-1]</a>
<dd> Introduces filter effects as a way of processing an element’s rendering before it is displayed in the document.
<dt><a href="https://www.w3.org/TR/css-font-loading/">CSS Font Loading Module Level 3</a> <a data-link-type="biblio" href="#biblio-css-font-loading-3">[CSS-FONT-LOADING-3]</a>
<dd> Introduces events and interfaces used for dynamically loading font resources.
<dt><a href="https://www.w3.org/TR/css-sizing-3/">CSS Box Sizing Level 3</a> <a data-link-type="biblio" href="#biblio-css-sizing-3">[CSS-SIZING-3]</a>
<dd> Overlays and extends CSS§10.,
expanding the value set of the sizing properties,
introducing more precise sizing terminology,
and defining with more precision and detail
various automatic sizing concepts only vaguely defined in CSS2.
<dt><a href="https://www.w3.org/TR/css-transforms-2/">CSS Transforms Level 2</a> <a data-link-type="biblio" href="#biblio-css-transforms-2">[CSS-TRANSFORMS-2]</a>
<dd> Builds upon <a data-link-type="biblio" href="#biblio-css-transforms-1">[CSS-TRANSFORMS-1]</a> to add new transform functions and properties for three-dimensional transforms,
and convenience functions for simple transforms.
<dt><a href="https://www.w3.org/TR/css-lists-3/">CSS Lists and Counters Module Level 3</a> <a data-link-type="biblio" href="#biblio-css-lists-3">[CSS-LISTS-3]</a>
<dd> Contains CSS features related to list counters:
styling them,
positioning them,
and manipulating their value.
<dt><a href="https://www.w3.org/TR/css-logical-1/">CSS Logical Properties and Values Level 1</a> <a data-link-type="biblio" href="#biblio-css-logical-1">[CSS-LOGICAL-1]</a>
<dd> Introduces logical properties and values
that provide the author with the ability to control layout through logical,
rather than physical,
direction and dimension mappings.
Also defines logical properties and values for the features defined in <a data-link-type="biblio" href="#biblio-css2">[CSS2]</a>.
These properties are writing-mode relative equivalents
of their corresponding physical properties.
<dt><a href="https://www.w3.org/TR/css-position-3/">CSS Positioned Layout Module Level 3</a> <a data-link-type="biblio" href="#biblio-css-position-3">[CSS-POSITION-3]</a>
<dd> Contains defines coordinate-based positioning and offsetting schemes of CSS: <a data-link-type="dfn" href="https://www.w3.org/TR/css-position-3/#relative-position" id="ref-for-relative-position">relative positioning</a>, <a data-link-type="dfn" href="https://www.w3.org/TR/css-position-3/#sticky-position" id="ref-for-sticky-position">sticky positioning</a>, <a data-link-type="dfn" href="https://www.w3.org/TR/css-position-3/#absolute-position" id="ref-for-absolute-position">absolute positioning</a>,
and <a data-link-type="dfn" href="https://www.w3.org/TR/css-position-3/#fixed-position" id="ref-for-fixed-position">fixed positioning</a>.
<dt><a href="https://www.w3.org/TR/resize-observer-1/">Resize Observer</a> <a data-link-type="biblio" href="#biblio-resize-observer-1">[RESIZE-OBSERVER-1]</a>
<dd> This specification describes an API for observing changes to element’s principal box’s size.
<dt><a href="https://www.w3.org/TR/web-animations-1/">Web Animations</a> <a data-link-type="biblio" href="#biblio-web-animations-1">[WEB-ANIMATIONS-1]</a>
<dd> Defines a model for synchronization and timing of changes to the presentation of a Web page.
Also defines an application programming interface for interacting with this model.
<dt><a href="https://www.w3.org/TR/css-fonts-4/">CSS Fonts Module Level 4</a> <a data-link-type="biblio" href="#biblio-css-fonts-4">[CSS-FONTS-4]</a>
<dd> Extends and supersedes CSS Fonts 3
and provides more control over font choice and feature selection,
including support for OpenType variations.
<dt><a href="https://www.w3.org/TR/css-color-adjust-1/">CSS Color Adjustment Module Level 1</a> <a data-link-type="biblio" href="#biblio-css-color-adjust-1">[CSS-COLOR-ADJUST-1]</a>
<dd> This module introduces a model and controls over automatic color adjustment by the user agent to handle user preferences and device output optimizations.
</dl>
<h3 class="heading settled" data-level="2.4" id="css-levels"><span class="secno">2.4. </span><span class="content"> CSS Levels</span><a class="self-link" href="#css-levels"></a></h3>
<p>Cascading Style Sheets does not have versions in the traditional sense;
instead it has <dfn data-dfn-type="dfn" data-export id="levels">levels<a class="self-link" href="#levels"></a></dfn>. Each level of CSS builds on the previous,
refining definitions and adding features. The feature set of each higher
level is a superset of any lower level, and the behavior allowed for a given
feature in a higher level is a subset of that allowed in the lower levels.
A user agent conforming to a higher level of CSS is thus also conformant to
all lower levels.</p>
<dl>
<dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="css-level-1">CSS Level 1</dfn>
<dd> The CSS Working Group considers the <a href="https://www.w3.org/TR/2008/REC-CSS1-20080411/">CSS1 specification</a> to be
obsolete. <a data-link-type="dfn" href="#css-level-1" id="ref-for-css-level-1">CSS Level 1</a> is defined as all the features defined
in the CSS1 specification (properties, values, at-rules, etc), but using
the syntax and definitions in the <a href="https://www.w3.org/TR/CSS2/">CSS2.1 specification</a>. <a href="https://www.w3.org/TR/css-style-attr/">CSS Style Attributes</a> defines its inclusion in element-specific style attributes.
<dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="css-level-2">CSS Level 2</dfn>
<dd>
Although the <a href="https://www.w3.org/TR/2008/REC-CSS2-20080411/">CSS2 specification</a> is technically a W3C Recommendation, it passed into the Recommendation stage
before the W3C had defined the Candidate Recommendation stage. Over time
implementation experience and further review has brought to light many problems
in the CSS2 specification, so instead of expanding an already <a href="https://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html">unwieldy
errata list</a>, the CSS Working Group chose to define <cite>CSS Level 2
Revision 1</cite> (CSS2.1). In case of any conflict between the two specs
CSS2.1 contains the definitive definition.
<p>Once CSS2.1 became Candidate Recommendation—effectively though not
officially the same level of stability as CSS2—obsoleted the CSS2
Recommendation. Features in CSS2 that were dropped from CSS2.1 should be
considered to be at the Candidate Recommendation stage, but note that many
of these have been or will be pulled into a CSS Level 3 working draft, in
which case that specification will, once it reaches CR, obsolete the
definitions in CSS2.</p>
<p>The <a href="https://www.w3.org/TR/CSS2/">CSS2.1 specification</a> defines <a data-link-type="dfn" href="#css-level-2" id="ref-for-css-level-2">CSS Level 2</a> and the <a href="https://www.w3.org/TR/css-style-attr/">CSS
Style Attributes specification</a> defines its inclusion in
element-specific style attributes.</p>
<dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="css-level-3">CSS Level 3</dfn>
<dd>
<a data-link-type="dfn" href="#css-level-3" id="ref-for-css-level-3">CSS Level 3</a> builds on CSS Level 2 module by module, using the CSS2.1
specification as its core. Each module adds functionality and/or
replaces part of the CSS2.1 specification. The CSS Working Group
intends that the new CSS modules will not contradict the CSS2.1
specification: only that they will add functionality and refine
definitions. As each module is completed, it will be plugged in to
the existing system of CSS2.1 plus previously-completed modules.
<p>From this level on modules are levelled independently: for example
Selectors Level 4 may well be completed before CSS Line Module Level 3.
Modules with no <a data-link-type="dfn" href="#css-level-2" id="ref-for-css-level-2①">CSS Level 2</a> equivalent start at Level 1;
modules that update features that existed in <span id="ref-for-css-level-2②">CSS Level 2</span> start at Level 3.</p>
<dt><dfn data-dfn-type="dfn" data-export id="css-level-4">CSS Level 4<a class="self-link" href="#css-level-4"></a></dfn> and beyond
<dd> There is no CSS Level 4.
Independent modules can reach level 4 or beyond,
but CSS the language no longer has levels.
("CSS Level 3" as a term is used only to differentiate it from the previous monolithic versions.)
</dl>
<h3 class="heading settled" data-level="2.5" id="profiles"><span class="secno">2.5. </span><span class="content"> CSS Profiles</span><a class="self-link" href="#profiles"></a></h3>
<p>Not all implementations will implement all functionality defined in CSS.</p>
<p>In the past, the Working Group published a few Profiles,
which were meant to define the minimal subset of CSS
that various classes of user agents were expected to support.</p>
<p>This effort has been discontinued,
as the Working Group was not finding it effective or useful,
and the profiles previously defined are now unmaintained.</p>
<p class="note" role="note"><span>Note:</span> Partial implementations of CSS, even if that subset is an official profile,
must follow the forward-compatible parsing rules for <a href="#partial">partial implementations</a>.</p>
<h2 class="heading settled" data-level="3" id="responsible"><span class="secno">3. </span><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#responsible"></a></h2>
<p>The following sections define several conformance requirements
for implementing CSS responsibly,
in a way that promotes interoperability in the present and future.</p>
<h3 class="heading settled" data-level="3.1" id="partial"><span class="secno">3.1. </span><span class="content">Partial Implementations</span><a class="self-link" href="#partial"></a></h3>
<p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
(and <a href="https://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
any at-rules, properties, property values, keywords, and other syntactic constructs
for which they have no usable level of support</strong>.
In particular, user agents <em>must not</em> selectively ignore
unsupported property values and honor supported values in a single multi-value property declaration:
if any value is considered invalid (as unsupported values must be),
CSS requires that the entire declaration be ignored.</p>
<h3 class="heading settled" data-level="3.2" id="future-proofing"><span class="secno">3.2. </span><span class="content">Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#future-proofing"></a></h3>
<p>To avoid clashes with future stable CSS features,
the CSSWG recommends the following best practices for the implementation of <a data-link-type="dfn" href="#unstable" id="ref-for-unstable">unstable</a> features and <a data-link-type="dfn" href="#proprietary-extension" id="ref-for-proprietary-extension">proprietary extensions</a> to CSS:</p>
<h4 class="heading settled" data-level="3.2.1" id="experimental"><span class="secno">3.2.1. </span><span class="content"> Experimentation and Unstable Features</span><a class="self-link" href="#experimental"></a></h4>
<p>Implementations of <a data-link-type="dfn" href="#unstable" id="ref-for-unstable①">unstable</a> features
that are described in W3C specifications
but are not interoperable
should not be released broadly for general use;
but may be released for limited, experimental use in controlled environments.</p>
<details class="why">
<summary>Why?</summary>
We want to allow both authors and implementors to experiment with the feature and give feedback,
but prevent authors from relying on them in production websites
and thereby accidentally "locking in" (through content dependence)
certain syntax or behavior that might change later.
</details>
<div class="example" id="example-e5f16ed9"><a class="self-link" href="#example-e5f16ed9"></a> For example,
a UA could release an <a data-link-type="dfn" href="#unstable" id="ref-for-unstable②">unstable</a> features for experimentation
through beta or other testing-stage builds;
behind a hidden configuration flag;
behind a switch enabled only for specific testing partners;
or through some other means of limiting dependent use. </div>
<p>A CSS feature is considered <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="unstable">unstable</dfn> until
its specification has reached the Candidate Recommendation (CR) stage in the W3C process.
In exceptional cases,
the CSSWG may additionally, by an officially-recorded resolution,
add pre-CR features to the set that are considered safe to release for broad use.
See <a href="#CR-exceptions">§ 4 Safe to Release pre-CR Exceptions</a>.</p>
<p class="note" role="note"><span>Note:</span> Vendors should consult the WG explicitly and not make assumptions on this point,
as a pre-CR spec that hasn’t changed in awhile is usually more out-of-date than stable.</p>
<h4 class="heading settled" data-level="3.2.2" id="proprietary"><span class="secno">3.2.2. </span><span class="content"> Proprietary and Non-standardized Features</span><a class="self-link" href="#proprietary"></a></h4>
<p>To avoid clashes with future CSS features,
the CSS2.1 specification reserves a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="vendor prefix | vendor-prefixed | prefixed | unprefixed" id="vendor-prefix"><a href="https://www.w3.org/TR/CSS2/syndata.html#vendor-keywords">prefixed syntax</a></dfn> <a data-link-type="biblio" href="#biblio-css2">[CSS2]</a> for proprietary and experimental extensions to CSS.
A CSS feature is a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="proprietary-extension">proprietary extension</dfn> if it is meant for use
in a closed environment accessible only to a single vendor’s user agent(s).
A UA should support such <a data-link-type="dfn" href="#proprietary-extension" id="ref-for-proprietary-extension①">proprietary extensions</a> only through a vendor-<a data-link-type="dfn" href="#vendor-prefix" id="ref-for-vendor-prefix">prefixed</a> syntax
and not expose them to open (multi-UA) environments such as the World Wide Web.</p>
<details class="why">
<summary>Why?</summary>
The prefixing requirement allows shipping specialized features in closed environments
without conflicting with future additions to standard CSS.
The restriction on exposure to open systems is to prevent
accidentally causing the public CSS environment
to depend on an unstandardized <a data-link-type="dfn" href="#proprietary-extension" id="ref-for-proprietary-extension②">proprietary extensions</a>.
</details>
<div class="example" id="example-5502e5f5"><a class="self-link" href="#example-5502e5f5"></a> For example,
Firefox’s XUL-based UI, Apple’s iTunes UI, and Microsoft’s Universal Windows Platform app
use extensions to CSS implemented by their respective UAs.
So long as these UAs do not allow Web content to access these features,
they do not provide an opportunity for such content
to become dependent on their <a data-link-type="dfn" href="#proprietary-extension" id="ref-for-proprietary-extension③">proprietary extensions</a>. </div>
<p>Even if a feature is intended to eventually be used in the Web,
if it hasn’t yet been standardized
it should still not be exposed to the Web.</p>
<h4 class="heading settled" data-level="3.2.3" id="de-facto"><span class="secno">3.2.3. </span><span class="content"> Market Pressure and De Facto Standards</span><a class="self-link" href="#de-facto"></a></h4>
<p>If a feature is <a data-link-type="dfn" href="#unstable" id="ref-for-unstable③">unstable</a> (i.e. the spec has not yet stabilized), but</p>
<ul>
<li data-md>
<p>at least three UAs implement the feature
(<em>or</em> a UA has broken the other rules and shipped for broad use
an <a data-link-type="dfn" href="#unstable" id="ref-for-unstable④">unstable</a> or otherwise non-standard feature in a production release),</p>
<li data-md>
<p><em>and</em> the implementations have rough interoperability,</p>
<li data-md>
<p><em>and</em> the CSS Working Group has recorded consensus
that this feature should exist and be released,</p>
</ul>
<p>implementers may ship that feature <a data-link-type="dfn" href="#vendor-prefix" id="ref-for-vendor-prefix①">unprefixed</a> in broad-release builds. <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="rough-interoperability">Rough interoperability</dfn> is satisfied by a subjective judgment
that even though there may be differences,
the implementations are sufficiently similar
to be used in production websites for a substantial number of use cases.</p>
<p class="note" role="note">Note that the CSSWG must still be consulted to ensure coordination across vendors
and to ensure coherency review by the CSS experts from each vendor.
Note also that <a data-link-type="dfn" href="#rough-interoperability" id="ref-for-rough-interoperability①">rough interoperability</a> still usually means
painful lack of interop in edge (or not-so-edge) cases,
particularly because details have not been ironed out through the standards review process. </p>
<details class="why">
<summary>Why?</summary>
If a feature is sufficiently popular that three or more browsers have implemented it before it’s finished standardization,
this clause allows releasing the pressure to ship.
Also, if a feature has already escaped into the wild and sites have started depending on it,
pretending it’s still “experimental” doesn’t help anyone.
Allowing others to ship unprefixed recognizes that the feature is now de facto standardized
and encourages authors to write cross-platform code.
</details>
<h5 class="no-toc heading settled" data-level="3.2.3.1" id="unstable-syntax"><span class="secno">3.2.3.1. </span><span class="content"> Vendor-prefixing Unstable Features</span><a class="self-link" href="#unstable-syntax"></a></h5>
<p>When exposing such a standards-track <a data-link-type="dfn" href="#unstable" id="ref-for-unstable⑤">unstable</a> feature to the Web in a production release,
implementations should support <em>both</em> <a data-link-type="dfn" href="#vendor-prefix" id="ref-for-vendor-prefix②">vendor-prefixed</a> and unprefixed syntaxes
for the feature.
Once the feature has stabilized and the implementation is updated to match interoperable behavior,
support for the <span id="ref-for-vendor-prefix③">vendor-prefixed</span> syntax should be removed. </p>
<details class="why">
<summary>Why?</summary>
This is recommended so that authors can use the unprefixed syntax to target all implementations,
but when necessary, can target specific implementations
to work around incompatibilities among implementations
as they get ironed out through the standards/bugfixing process.
<p>The lack of a phase
where only the prefixed syntax is supported
greatly reduces the risk of stylesheets
being written with only the vendor-prefixed syntax.
This in turn allows UA vendors to retire
their prefixed syntax once the feature is stable,
with a lower risk of breaking existing content.
It also reduces the need occasionally felt by some vendors
to support a feature with the prefix of another vendor,
due to content depending on that syntax.</p>
</details>
<p>Anyone promoting <a data-link-type="dfn" href="#unstable" id="ref-for-unstable⑥">unstable</a> features to authors
should document them using their standard unprefixed syntax,
and avoid encouraging the use of the <a data-link-type="dfn" href="#vendor-prefix" id="ref-for-vendor-prefix④">vendor-prefixed</a> syntax
for any purpose other than working around implementation differences.</p>
<h5 class="no-toc heading settled" data-level="3.2.3.2" id="open-technology"><span class="secno">3.2.3.2. </span><span class="content"> Preserving the Openness of CSS</span><a class="self-link" href="#open-technology"></a></h5>
<p>In order to preserve the open nature of CSS as a technology,
vendors should make it possible for other implementors
to freely implement any features that they do ship.
To this end, they should provide spec-editing and testing resources
to complete standardization of such features,
and avoid other obstacles (e.g., platform dependency, licensing restrictions)
to their competitors shipping the feature.</p>
<h3 class="heading settled" data-level="3.3" id="testing"><span class="secno">3.3. </span><span class="content">Implementations of CR-level Features</span><a class="self-link" href="#testing"></a></h3>
<p>Once a specification reaches the Candidate Recommendation stage,
implementers should release an <a data-link-type="dfn" href="#vendor-prefix" id="ref-for-vendor-prefix⑤">unprefixed</a> implementation
of any CR-level feature they can demonstrate
to be correctly implemented according to spec,
and should avoid exposing a prefixed variant of that feature.</p>
<p>To establish and maintain the interoperability of CSS across
implementations, the CSS Working Group requests that non-experimental
CSS renderers submit an implementation report (and, if necessary, the
testcases used for that implementation report) to the W3C before
releasing an unprefixed implementation of any CSS features. Testcases
submitted to W3C are subject to review and correction by the CSS
Working Group.</p>
<p>Further information on submitting testcases and implementation reports
can be found from on the CSS Working Group’s website at <a href="https://www.w3.org/Style/CSS/Test/">https://www.w3.org/Style/CSS/Test/</a>.
Questions should be directed to the <a href="https://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list.</p>
<h2 class="heading settled" data-level="4" id="CR-exceptions"><span class="secno">4. </span><span class="content"> Safe to Release pre-CR Exceptions</span><a class="self-link" href="#CR-exceptions"></a></h2>
<p>The following features have been explicitly and proactively cleared
by the CSS Working Group for broad release
prior to the spec reaching Candidate Recommendation.
See <a href="#experimental">§ 3.2.1 Experimentation and Unstable Features</a>.</p>
<ul>
<li>The flow-relative equivalents of
the sizing properties (<a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-sizing-3/#propdef-width" id="ref-for-propdef-width">width</a>, <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-sizing-3/#propdef-height" id="ref-for-propdef-height">height</a>, etc.),
the border properties,
the margin and padding properties.
See <a href="https://lists.w3.org/Archives/Public/www-style/2015Jul/0040.html">explanation</a> and <a href="https://www.w3.org/TR/css-logical-1/">specification</a>.
<li>The <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-sizing-3/#valdef-width-min-content" id="ref-for-valdef-width-min-content">min-content</a> and <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-sizing-3/#valdef-width-max-content" id="ref-for-valdef-width-max-content">max-content</a> keywords of the sizing properties.
See <a href="https://lists.w3.org/Archives/Public/www-style/2015Aug/0109.html">decision</a> and <a href="https://www.w3.org/TR/css-sizing-3/#sizing-values">specification</a>.
<li>The <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-images-4/#funcdef-conic-gradient" id="ref-for-funcdef-conic-gradient">conic-gradient()</a> gradient notation. See <a href="https://github.com/w3c/csswg-drafts/issues/2383#issuecomment-371340088">decision</a>.
<li>The <a class="css" data-link-type="property" href="https://www.w3.org/TR/css-sizing-4/#propdef-aspect-ratio" id="ref-for-propdef-aspect-ratio">aspect-ratio</a> property. <a data-link-type="biblio" href="#biblio-css-sizing-4">[CSS-SIZING-4]</a>
<li>The <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-transforms-2/#propdef-translate" id="ref-for-propdef-translate">translate</a>, <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-transforms-2/#propdef-rotate" id="ref-for-propdef-rotate">rotate</a>, and <a class="property" data-link-type="propdesc" href="https://www.w3.org/TR/css-transforms-2/#propdef-scale" id="ref-for-propdef-scale">scale</a> properties. <a data-link-type="biblio" href="#biblio-css-transforms-2">[CSS-TRANSFORMS-2]</a>
</ul>
<p>The following features have been explicitly and retroactively cleared
by the CSS Working Group for broad release
prior to the spec reaching Candidate Recommendation:</p>
<ul>
<li>Everything in <a href="https://www.w3.org/TR/css-animations-1/">CSS Animations Level 1</a> and <a href="https://www.w3.org/TR/css-transitions-1/">CSS Transitions Level 1</a>.
<li>The <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors-4/#dir-pseudo" id="ref-for-dir-pseudo">:dir()</a>, <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors-4/#lang-pseudo" id="ref-for-lang-pseudo">:lang()</a>, and <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors-4/#focus-within-pseudo" id="ref-for-focus-within-pseudo">:focus-within</a> pseudo-classes from <a data-link-type="biblio" href="#biblio-selectors-4">[SELECTORS-4]</a>.
</ul>
<h2 class="heading settled" data-level="5" id="indices"><span class="secno">5. </span><span class="content">Indices</span><a class="self-link" href="#indices"></a></h2>
<p><em>These sections are non-normative.</em></p>
<h3 class="heading settled" data-level="5.1" id="terms"><span class="secno">5.1. </span><span class="content">Terms Index</span><a class="self-link" href="#terms"></a></h3>
<div data-link-spec="
css2,
css-syntax-3,
css-style-attr-1,
mediaqueries-3,
mediaqueries-4,
css-conditional-3,
css-namespaces-3,
selectors-3,
css-cascade-4,
css-values-3,
css-color-3,
css-backgrounds-3,
css-images-3,
css-fonts-3,
css-multicol-1,
css-ui-3,
compositing-1,
css-writing-modes-3,
css-writing-modes-4,
css-transitions-1,
css-animations-1,
css-easing-1,
css-flexbox-1,
css-transforms-1,
css-variables-1,
css-text-3,
css-counter-styles-3,
css-masking-1,
css-shapes-1,
css-text-decor-3,
css-will-change-1,
css-speech-1,
css-align-3,
css-grid-1,
filter-effects-1,
css-break-3,
css-contain-1,
css-scroll-snap-1,
css-display-3,
css-font-loading-3" data-link-status="TR">
<ul class="index">
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-weight-numeric-values">100...900 weight values</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#shadow-offset-x">1st <length></a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#2d-matrix">2d matrix</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#shadow-offset-y">2nd <length></a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#shadow-blur-radius">3rd <length [0,∞]></a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#shadow-spread-distance">4th <length></a>
<li><a href="https://drafts.csswg.org/css-values-3/#absolute-length">absolute length</a>
<li><a href="https://drafts.csswg.org/css2/#absolutely-positioned">absolutely positioned element</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#abstract-dimensions">abstract dimensions</a>
<li><a href="https://drafts.csswg.org/css-color-3/#activeborder">activeborder</a>
<li><a href="https://drafts.csswg.org/css-color-3/#activecaption">activecaption</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#active-duration">active duration</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#actual-value">actual value</a>
<li><a href="https://drafts.csswg.org/css2/#actual-value">actual values</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#additive-tuple">additive tuple</a>
<li><a href="https://drafts.csswg.org/css2/#adjoining-margins">adjoining</a>
<li><a href="https://drafts.csswg.org/css2/#adjoining-margins">adjoining margins</a>
<li><a href="https://drafts.csswg.org/css-values-3/#length-advance-measure">advance measure</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#after-change-style">after-change style</a>
<li><a href="https://drafts.csswg.org/css-color-3/#aliceblue">aliceblue</a>
<li><a href="https://drafts.csswg.org/css2/#aligned-subtree">aligned subtree</a>
<li><a href="https://drafts.csswg.org/css-align-3/#alignment-baseline">alignment baseline</a>
<li><a href="https://drafts.csswg.org/css-align-3/#alignment-container">alignment container</a>
<li><a href="https://drafts.csswg.org/css-align-3/#shared-alignment-context">alignment context</a>
<li><a href="https://drafts.csswg.org/css-align-3/#alignment-subject">alignment subject</a>
<li><a href="https://drafts.csswg.org/css2/#all-media-group">'all' media group</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#all-petite-caps">all-petite-caps</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#all-small-caps">all-small-caps</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#alphabetic-baseline">alphabetic baseline</a>
<li><a href="https://drafts.csswg.org/css-images-3/#css-ambiguous-image-url">ambiguous image url</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#anb">an+b</a>
<li><a href="https://drafts.csswg.org/css2/#ancestor">ancestor</a>
<li><a href="https://drafts.csswg.org/css-values-3/#anchor-unit">anchor</a>
<li><a href="https://drafts.csswg.org/css-values-3/#anchor-unit">anchor unit</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-animation">animation origin</a>
<li><a href="https://drafts.csswg.org/css-variables-1/#animation-tainted">animation-tainted</a>
<li>
anonymous
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#anonymous">in css-display-3, for CSS</a>
<li><a href="https://drafts.csswg.org/css2/#anonymous">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css-display-3/#anonymous">anonymous box</a>
<li><a href="https://drafts.csswg.org/css2/#anonymous-inline-boxes">anonymous inline boxes</a>
<li><a href="https://drafts.csswg.org/css-color-3/#antiquewhite">antiquewhite</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#apply">apply to</a>
<li><a href="https://drafts.csswg.org/css-color-3/#appworkspace">appworkspace</a>
<li>
aqua
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#aqua">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#aqua0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#aquamarine">aquamarine</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-two-code-points-are-a-valid-escape">are a valid escape</a>
<li>
as conformance class
<ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#style-sheet">in css-fonts-3</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#style-sheet0">in css-speech-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#aspect-value">aspect value</a>
<li><a href="https://drafts.csswg.org/css2/#at-keyword">at-keyword</a>
<li><a href="https://drafts.csswg.org/css-display-3/#atomic-inline">atomic inline</a>
<li><a href="https://drafts.csswg.org/css-display-3/#atomic-inline">atomic inline box</a>
<li><a href="https://drafts.csswg.org/css2/#atomic-inline-level-boxes">atomic inline-level boxes</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#at-rule">at-rule</a>
<li><a href="https://drafts.csswg.org/css2/#at-rules-dfn">at-rules</a>
<li><a href="https://drafts.csswg.org/css2/#attribute">attribute</a>
<li><a href="https://drafts.csswg.org/css2/#audio-media-group">'audio' media group</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#augmented-grid">augmented grid</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#aural-box-model">aural "box" model</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#aural-box-model">aural box model</a>
<li><a href="https://drafts.csswg.org/css2/#author">author</a>
<li>
authoring tool
<ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#authoring-tool">in css-fonts-3</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#authoring-tool">in css-speech-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-author">author origin</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-author">author-origin</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#author-presentational-hint-origin">author presentational hint origin</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-author">author style sheet</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-kerning-auto-value">auto!!font-kerning</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#automatic-grid-position">automatic column position</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#automatic-grid-position">automatic grid position</a>
<li><a href="https://drafts.csswg.org/css2/#automatic-numbering">automatic numbering</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#auto-placement">automatic placement</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#automatic-grid-position">automatic position</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#automatic-grid-position">automatic row position</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#auto-placement">auto-placement</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#auto-placement-cursor">auto-placement cursor</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#available-font-faces">available font faces</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#available-grid-space">available grid space</a>
<li><a href="https://drafts.csswg.org/css-break-3/#avoid-break-values">avoid break values</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#axis-lock">axis-lock</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#axis-value">axis value</a>
<li><a href="https://drafts.csswg.org/css-color-3/#azure">azure</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#backdrop">backdrop</a>
<li><a href="https://drafts.csswg.org/css-color-3/#background">background</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#background-painting-area">background painting area</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#background-positioning-area">background positioning area</a>
<li><a href="https://drafts.csswg.org/css2/#escaped-characters">backslash escapes</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#baseline">baseline</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-alignment">baseline alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-alignment-preference">baseline alignment preference</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-content-alignment">baseline content-alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-self-alignment">baseline self-alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-set">baseline set</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-sharing-group">baseline-sharing group</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#baseline-table">baseline table</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#base-size">base size</a>
<li><a href="https://drafts.csswg.org/css-values-3/#bearing-angle">bearing angle</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#before-change-style">before-change style</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#before-flag">before flag</a>
<li><a href="https://drafts.csswg.org/css-color-3/#beige">beige</a>
<li><a href="https://drafts.csswg.org/css-display-3/#bfc">bfc</a>
<li><a href="https://drafts.csswg.org/css-text-3/#bidi-formatting-characters">bidi formatting characters</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#bidi-isolate">bidi-isolate</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#bidi-isolate">bidi-isolated</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#bidi-isolate">bidi isolation</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#bidi-paragraph">bidi paragraph</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#bidirectionality">bidirectionality</a>
<li><a href="https://drafts.csswg.org/css2/#bidirectionality-bidi">bidirectionality (bidi)</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#bi-orientational">bi-orientational</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#bi-orientational-transform">bi-orientational transform</a>
<li><a href="https://drafts.csswg.org/css-color-3/#bisque">bisque</a>
<li><a href="https://drafts.csswg.org/css2/#bitmap-media-group">'bitmap' media group</a>
<li>
black
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#black">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#black0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#blanchedalmond">blanchedalmond</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#paren-block">()-block</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#square-block">[]-block</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block">block</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#curly-block">{}-block</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#block-at-rule">block at-rule</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-axis">block axis</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-axis">block-axis</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block-box">block box</a>
<li><a href="https://drafts.csswg.org/css2/#block-boxes①">block boxes</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block-container">block container</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block-container">block container box</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-dimension">block dimension</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-end">block end</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-end">block-end</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-flow-direction">block flow direction</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block-formatting-context">block formatting context</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block-formatting-context-root">block formatting context root</a>
<li><a href="https://drafts.csswg.org/css-display-3/#blockify">blockification</a>
<li><a href="https://drafts.csswg.org/css-display-3/#blockify">blockify</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block-layout">block layout</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block-level">block-level</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block-level-box">block-level box</a>
<li><a href="https://drafts.csswg.org/css2/#block-level-boxes">block-level boxes</a>
<li><a href="https://drafts.csswg.org/css-display-3/#block-level">block-level content</a>
<li><a href="https://drafts.csswg.org/css2/#block-level">block-level elements</a>
<li><a href="https://drafts.csswg.org/css-text-3/#block-scripts">block scripts</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-size">block size</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-size">block-size</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-start">block start</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#block-start">block-start</a>
<li>
blue
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#blue">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#blue0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#blueviolet">blueviolet</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#blur-radius">blur radius</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#bold">bold</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#bolder">bolder</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#boolean-context">boolean context</a>
<li>
border
<ul>
<li><a href="https://www.w3.org/TR/css-speech-1/#border-def">in css-speech-1</a>
<li><a href="https://drafts.csswg.org/css2/#box-border-area">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#border-box">border box</a>
<li><a href="https://www.w3.org/TR/css-shapes-1/#border-box">border-box</a>
<li><a href="https://drafts.csswg.org/css2/#border-edge">border edge</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#border-image-area">border image area</a>
<li><a href="https://drafts.csswg.org/css2/#box-border-area">border (of a box)</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#border-radii">border radius</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-bottom">bottom</a>
<li><a href="https://drafts.csswg.org/css-display-3/#box">box</a>
<li><a href="https://drafts.csswg.org/css-align-3/#box-alignment-properties">box alignment properties</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#box-corner">box-corner</a>
<li><a href="https://drafts.csswg.org/css-break-3/#box-fragment">box fragment</a>
<li><a href="https://drafts.csswg.org/css-display-3/#box-tree">box tree</a>
<li><a href="https://www.w3.org/TR/css-break-3/#break">break</a>
<li><a href="https://drafts.csswg.org/css-color-3/#brown">brown</a>
<li><a href="https://drafts.csswg.org/css-color-3/#burlywood">burlywood</a>
<li><a href="https://drafts.csswg.org/css-color-3/#buttonface">buttonface</a>
<li><a href="https://drafts.csswg.org/css-color-3/#buttonhighlight">buttonhighlight</a>
<li><a href="https://drafts.csswg.org/css-color-3/#buttonshadow">buttonshadow</a>
<li><a href="https://drafts.csswg.org/css-color-3/#buttontext">buttontext</a>
<li><a href="https://drafts.csswg.org/css-color-3/#cadetblue">cadetblue</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#transition-cancel">cancel</a>
<li><a href="https://drafts.csswg.org/css-values-3/#canonical-unit">canonical unit</a>
<li><a href="https://drafts.csswg.org/css2/#canvas">canvas</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#canvas-background">canvas background</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#canvas-surface">canvas surface</a>
<li><a href="https://drafts.csswg.org/css-color-3/#captiontext">captiontext</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#captures-snap-positions">captures snap positions</a>
<li>
cascade
<ul>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade">in css-cascade-4</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#cascade-def">in css-speech-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascaded-value">cascaded value</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#origin">cascade origin</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#central-baseline">central baseline</a>
<li>
character
<ul>
<li><a href="https://drafts.csswg.org/css-text-3/#character">in css-text-3</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#character">in css-text-decor-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#character-encoding">character encoding</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#character-map">character map</a>
<li><a href="https://drafts.csswg.org/css2/#charset①">"@charset"</a>
<li><a href="https://drafts.csswg.org/css-color-3/#chartreuse">chartreuse</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-three-code-points-would-start-an-ident-sequence">check if three code points would start an ident sequence</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-three-code-points-would-start-a-number">check if three code points would start a number</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-two-code-points-are-a-valid-escape">check if two code points are a valid escape</a>
<li><a href="https://drafts.csswg.org/css2/#child">child</a>
<li><a href="https://drafts.csswg.org/selectors-3/#child-combinator">child combinator</a>
<li><a href="https://drafts.csswg.org/css2/#child-selector">child selector</a>
<li><a href="https://drafts.csswg.org/css-text-3/#writing-system-chinese">chinese</a>
<li><a href="https://drafts.csswg.org/css-color-3/#chocolate">chocolate</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#circled-lower-latin">circled-lower-latin</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#clamp-a-grid-area">clamp a grid area</a>
<li><a href="https://drafts.csswg.org/css2/#clearance">clearance</a>
<li><a href="https://www.w3.org/TR/CSS2/visuren.html#clearance">clearance.</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#clipping-path">clipping path</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#clipping-region">clipping region</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#closest-side">closest-side</a>
<li><a href="https://drafts.csswg.org/css-text-3/#clustered-scripts">clustered scripts</a>
<li><a href="https://drafts.csswg.org/css2/#collapse">collapse</a>
<li><a href="https://drafts.csswg.org/css-display-3/#collapsed">collapsed</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#collapsed-flex-item">collapsed flex item</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#collapsed-gutter">collapsed gutter</a>
<li><a href="https://drafts.csswg.org/css2/#collapsed-margin">collapsed margin</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#collapsed-track">collapsed track</a>
<li><a href="https://drafts.csswg.org/css2/#collapse-through">collapse through</a>
<li><a href="https://drafts.csswg.org/css-text-3/#collapsible-white-space">collapsible white space</a>
<li><a href="https://drafts.csswg.org/css2/#collapsed-margin">collapsing margin</a>
<li><a href="https://drafts.csswg.org/css-images-3/#color-stop">color stop</a>
<li><a href="https://drafts.csswg.org/css-images-3/#color-stop-list">color stop list</a>
<li><a href="https://drafts.csswg.org/css-images-3/#color-transition-hint">color transition hint</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#column-box">column box</a>
<li><a href="https://drafts.csswg.org/css-break-3/#column-break">column break</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#column-gap">column gap</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#column-height">column height</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#column-rule">column rule</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#column-width">column width</a>
<li>
combinators
<ul>
<li><a href="https://drafts.csswg.org/css2/#combinator">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#combinators0">in selectors-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-transitions-1/#transition-combined-duration">combined duration</a>
<li><a href="https://drafts.csswg.org/css2/#comments①">comments</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#common-ligatures">common-ligatures</a>
<li><a href="https://drafts.csswg.org/css-align-3/#compatible-baseline-alignment-preferences">compatible baseline alignment preferences</a>
<li><a href="https://drafts.csswg.org/css-values-3/#compatible-units">compatible units</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#dfn-complete">complete</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#completed-transition">completed transition</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#component-value">component value</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#composite-face">composite face</a>
<li><a href="https://drafts.csswg.org/css-images-3/#computed-image">computed <image></a>
<li><a href="https://drafts.csswg.org/css-grid-1/#computed-track-list">computed track list</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed value</a>
<li><a href="https://drafts.csswg.org/css2/#computed-value">computed values</a>
<li><a href="https://drafts.csswg.org/css-images-3/#concrete-object-size">concrete object size</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#condensed">condensed</a>
<li><a href="https://drafts.csswg.org/css-conditional-3/#conditional-group-rule">conditional group rule</a>
<li><a href="https://drafts.csswg.org/css2/#conditional-import">conditional import</a>
<li><a href="https://drafts.csswg.org/css-text-3/#conditionally-hang">conditionally hang</a>
<li><a href="https://drafts.csswg.org/css2/#conformance-term">conformance</a>
<li><a href="https://drafts.csswg.org/css2/#consecutive">consecutive</a>
<li><a href="https://drafts.csswg.org/css-images-3/#constraint-rectangle">constraint rectangle</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-component-value">consume a component value</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-declaration">consume a declaration</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-function">consume a function</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-list-of-declarations">consume a list of declarations</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-list-of-rules">consume a list of rules</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-an-at-rule">consume an at-rule</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-an-escaped-code-point">consume an escaped code point</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-an-ident-like-token">consume an ident-like token</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-an-ident-sequence">consume an ident sequence</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-number">consume a number</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-numeric-token">consume a numeric token</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-qualified-rule">consume a qualified rule</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-simple-block">consume a simple block</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-string-token">consume a string token</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-style-blocks-contents">consume a style block's contents</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-token">consume a token</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-a-url-token">consume a url token</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-comments">consume comments</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-the-next-input-token">consume the next input token</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#consume-the-remnants-of-a-bad-url">consume the remnants of a bad url</a>
<li><a href="https://drafts.csswg.org/css-images-3/#contain-constraint">contain constraint</a>
<li><a href="https://drafts.csswg.org/css-display-3/#containing-block">containing block</a>
<li><a href="https://drafts.csswg.org/css-display-3/#containing-block-chain">containing block chain</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#containing-block-for-all-descendants">containing block for all descendants</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#containment">containment</a>
<li>
content
<ul>
<li><a href="https://www.w3.org/TR/css-speech-1/#content-def">in css-speech-1</a>
<li><a href="https://drafts.csswg.org/css2/#content">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#box-content-area">content area</a>
<li>
content-based minimum size
<ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#content-based-minimum-size">in css-flexbox-1</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#content-based-minimum-size">in css-grid-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#content-box">content box</a>
<li><a href="https://www.w3.org/TR/css-shapes-1/#content-box">content-box</a>
<li><a href="https://drafts.csswg.org/css-align-3/#content-distribute">content distribution</a>
<li><a href="https://drafts.csswg.org/css-align-3/#content-distribution-properties">content-distribution properties</a>
<li><a href="https://drafts.csswg.org/css2/#content-edge">content edge</a>
<li><a href="https://drafts.csswg.org/css2/#content-height">content height</a>
<li>
content language
<ul>
<li><a href="https://drafts.csswg.org/css-text-3/#content-language">in css-text-3</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#content-language">in css-text-decor-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#box-content-area">content (of a box)</a>
<li>
content size suggestion
<ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#content-size-suggestion">in css-flexbox-1</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#content-size-suggestion">in css-grid-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#content-width">content width</a>
<li><a href="https://drafts.csswg.org/css-text-3/#content-writing-system">content writing system</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#contextual">contextual</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#continuous-media">continuous media</a>
<li><a href="https://drafts.csswg.org/css2/#continuous-media-group">'continuous' media group</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#convert-a-string-to-a-number">convert a string to a number</a>
<li><a href="https://drafts.csswg.org/css-align-3/#coordinated-self-alignment-preference">coordinated self-alignment preference</a>
<li><a href="https://drafts.csswg.org/css-color-3/#coral">coral</a>
<li><a href="https://drafts.csswg.org/css-color-3/#cornflowerblue">cornflowerblue</a>
<li><a href="https://drafts.csswg.org/css-color-3/#cornsilk">cornsilk</a>
<li><a href="https://drafts.csswg.org/css2/#counters①">counters</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#counter-style">counter style</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#counter-symbol">counter symbol</a>
<li><a href="https://drafts.csswg.org/css-images-3/#cover-constraint">cover constraint</a>
<li><a href="https://drafts.csswg.org/css-color-3/#crimson">crimson</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-axis">cross axis</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-axis">cross-axis</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-axis-baseline">cross-axis baseline set</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-dimension">cross dimension</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-end">cross-end</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-size">cross size</a>
<li><a href="https://www.w3.org/TR/css-flexbox-1/#cross-size">cross-size</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-size-property">cross size property</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-start">cross-start</a>
<li><a href="https://drafts.csswg.org/css-values-3/#css-bracketed-range-notation">css bracketed range notation</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#css-connected">css-connected</a>
<li><a href="https://drafts.csswg.org/css-conditional-3/#css-feature-queries">css feature queries</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#cssfontfacerule">cssfontfacerule</a>
<li>
css ident
<ul>
<li><a href="https://www.w3.org/TR/css-values-3/#css-identifier">in css-values-3</a>
<li><a href="https://drafts.csswg.org/css-values-3/#css-css-identifier">in css-values-3, for CSS</a>
</ul>
<li>
css identifier
<ul>
<li><a href="https://www.w3.org/TR/css-values-3/#css-identifier">in css-values-3</a>
<li><a href="https://drafts.csswg.org/css-values-3/#css-css-identifier">in css-values-3, for CSS</a>
</ul>
<li><a href="https://drafts.csswg.org/css-syntax-3/#ident-sequence">css ident sequence</a>
<li><a href="https://drafts.csswg.org/css-namespaces-3/#css-qualified-name">css qualified name</a>
<li><a href="https://drafts.csswg.org/css-values-3/#css-wide-keywords">css-wide keywords</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#cubic-bzier-easing-function">cubic bézier easing function</a>
<li><a href="https://drafts.csswg.org/css-color-3/#currentColor-def">currentcolor</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#current-input-code-point">current input code point</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#current-input-token">current input token</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#current-transformation-matrix">current transformation matrix</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#current-value">current value</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#cursive">cursive</a>
<li><a href="https://drafts.csswg.org/css-text-3/#cursive-script">cursive script</a>
<li><a href="https://drafts.csswg.org/css-variables-1/#custom-property">custom property</a>
<li><a href="https://drafts.csswg.org/css-color-3/#cyan">cyan</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkblue">darkblue</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkcyan">darkcyan</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkgoldenrod">darkgoldenrod</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkgray">darkgray</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkgreen">darkgreen</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkgrey">darkgrey</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkkhaki">darkkhaki</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkmagenta">darkmagenta</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkolivegreen">darkolivegreen</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkorange">darkorange</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkorchid">darkorchid</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkred">darkred</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darksalmon">darksalmon</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkseagreen">darkseagreen</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkslateblue">darkslateblue</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkslategray">darkslategray</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkslategrey">darkslategrey</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkturquoise">darkturquoise</a>
<li><a href="https://drafts.csswg.org/css-color-3/#darkviolet">darkviolet</a>
<li>
declaration
<ul>
<li><a href="https://drafts.csswg.org/css-syntax-3/#declaration">in css-syntax-3, for CSS</a>
<li><a href="https://drafts.csswg.org/css2/#declaration①">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#declaration-block">declaration block</a>
<li><a href="https://drafts.csswg.org/selectors-3/#declared">declared</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#declared-value">declared value</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-decode-bytes">decode bytes</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#decorating-box">decorating box</a>
<li><a href="https://drafts.csswg.org/css-color-3/#deeppink">deeppink</a>
<li><a href="https://drafts.csswg.org/css-color-3/#deepskyblue">deepskyblue</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#default-face">default face</a>
<li><a href="https://drafts.csswg.org/css-namespaces-3/#default-namespace">default namespace</a>
<li><a href="https://drafts.csswg.org/css-images-3/#default-object-size">default object size</a>
<li><a href="https://drafts.csswg.org/css-images-3/#default-sizing-algorithm">default sizing algorithm</a>
<li><a href="https://drafts.csswg.org/css2/#default-style-sheet">default style sheet</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#definite">definite</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#definite-grid-position">definite column position</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#definite-grid-span">definite column span</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#definite-grid-position">definite grid position</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#definite-grid-span">definite grid span</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#definite-grid-position">definite position</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#definite-grid-position">definite row position</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#definite-grid-span">definite row span</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#definite">definite size</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#definite-grid-span">definite span</a>
<li><a href="https://drafts.csswg.org/css2/#descendant">descendant</a>
<li><a href="https://drafts.csswg.org/css2/#descendant-selectors①">descendant-selectors</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-descriptor">descriptor</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#descriptor_declaration">descriptor_declaration</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-descriptor-declarations">descriptor declarations</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#destination">destination</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#determine-the-fallback-encoding">determine the fallback encoding</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#diagonal-fractions">diagonal-fractions</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#dice">dice</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#digit">digit</a>
<li><a href="https://drafts.csswg.org/css-values-3/#dimension">dimension</a>
<li><a href="https://drafts.csswg.org/css-color-3/#dimgray">dimgray</a>
<li><a href="https://drafts.csswg.org/css-color-3/#dimgrey">dimgrey</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#directional-embedding">directional embedding</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#directional-override">directional override</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#discretionary-ligatures">discretionary-ligatures</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#display-def">display</a>
<li><a href="https://drafts.csswg.org/css-display-3/#display-type">display type</a>
<li><a href="https://drafts.csswg.org/css-align-3/#distributed-alignment">distributed alignment</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#distribute-extra-space">distribute extra space</a>
<li>
document
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#document">in css-backgrounds-3</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#document">in css-speech-1</a>
<li><a href="https://drafts.csswg.org/css-style-attr-1/#document">in css-style-attr-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#doclanguage">document language</a>
<li><a href="https://drafts.csswg.org/css-display-3/#document-order">document order</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#document">documents</a>
<li><a href="https://drafts.csswg.org/css2/#doctree">document tree</a>
<li><a href="https://drafts.csswg.org/css-text-3/#white-space">document white space</a>
<li><a href="https://drafts.csswg.org/css-text-3/#white-space">document white space characters</a>
<li><a href="https://drafts.csswg.org/css-color-3/#dodgerblue">dodgerblue</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#dominant-baseline">dominant baseline</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#easing-function">easing function</a>
<li><a href="https://drafts.csswg.org/css-text-3/#unicode-east-asian-width">east asian width property</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#effective-character-map">effective character map</a>
<li>
element
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#elements">in css-display-3, for CSS</a>
<li><a href="https://drafts.csswg.org/css2/#element">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css-display-3/#element-tree">element tree</a>
<li><a href="https://drafts.csswg.org/css2/#empty">empty</a>
<li><a href="https://www.w3.org/TR/css-shapes-1/#empty-float-area">empty float area</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#encapsulation-contexts">encapsulation contexts</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#css-end">end</a>
<li><a href="https://drafts.csswg.org/css-images-3/#ending-point">ending point</a>
<li><a href="https://drafts.csswg.org/css-images-3/#ending-shape">ending shape</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#ending-token">ending token</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#transition-end-time">end time</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#transition-end-value">end value</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#environment-encoding">environment encoding</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#eof-code-point">eof code point</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#escape-codepoint">escaping</a>
<li><a href="https://drafts.csswg.org/css-display-3/#establish-an-independent-formatting-context">establish an independent formatting context</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#establish-an-orthogonal-flow">establish an orthogonal flow</a>
<li><a href="https://drafts.csswg.org/css-display-3/#establish-an-independent-formatting-context">established an independent formatting context</a>
<li><a href="https://drafts.csswg.org/css-display-3/#establish-an-independent-formatting-context">establishes an independent formatting context</a>
<li><a href="https://drafts.csswg.org/css-display-3/#establish-an-independent-formatting-context">establishing an independent formatting context</a>
<li><a href="https://drafts.csswg.org/css2/#exact-matching">exact matching</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#expanded">expanded</a>
<li><a href="https://drafts.csswg.org/css-namespaces-3/#expanded-name">expanded name</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#explicit-grid">explicit grid</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#explicit-grid-track">explicit grid column</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#explicit-grid-properties">explicit grid properties</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#explicit-grid-track">explicit grid row</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#explicit-grid-track">explicit grid track</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#explicitly-assigned-line-name">explicitly-assigned line name</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#extra-condensed">extra-condensed</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#extra-expanded">extra-expanded</a>
<li><a href="https://drafts.csswg.org/css-align-3/#fallback-alignment">fallback alignment</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#false-in-the-negative-range">false in the negative range</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#fantasy">fantasy</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#farthest-side">farthest-side</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#fetch-an-import">fetch an @import</a>
<li><a href="https://drafts.csswg.org/css2/#fictional-tag-sequence">fictional tag sequence</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-filter-code-points">filter code points</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-filter-code-points">filtered code points</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#filter-primitive">filter primitive</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#filter-primitive-attributes">filter primitive attributes</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#filter-primitive-subregion">filter primitive subregion</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#filter-primitive-tree">filter primitive tree</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#filter-region">filter region</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#find-the-matching-font-faces">find the matching font faces</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#fire-a-font-load-event">fire a font load event</a>
<li><a href="https://drafts.csswg.org/css-color-3/#firebrick">firebrick</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#first-available-font">first available font</a>
<li><a href="https://drafts.csswg.org/css-align-3/#first-baseline-alignment">first-baseline alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-content-alignment">first-baseline content-alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#first-baseline-set">first baselines</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-self-alignment">first-baseline self-alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#first-baseline-set">first baseline set</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-axis-baseline">first cross-axis baseline set</a>
<li><a href="https://drafts.csswg.org/selectors-3/#first-formatted-line0">first formatted line</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-axis-baseline">first main-axis baseline set</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#first-symbol-value">first symbol value</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#fixed-sizing-function">fixed sizing function</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-base-size">flex base size</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-flex-basis">flex basis</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-container">flex container</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-direction">flex direction</a>
<li>
flex factor
<ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-factor">in css-flexbox-1</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-template-columns-flex-factor">in css-grid-1, for grid-template-columns, grid-template-rows</a>
</ul>
<li><a href="https://drafts.csswg.org/css-grid-1/#flex-factor-sum">flex factor sum</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-formatting-context">flex formatting context</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#flex-fraction">flex fraction</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-flex-grow-factor">flex grow factor</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flexible">flexible</a>
<li>
flexible length
<ul>
<li><a href="https://www.w3.org/TR/css-flexbox-1/#flexible-length">in css-flexbox-1</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#flexible-length">in css-grid-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-grid-1/#flexible-sizing-function">flexible sizing function</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#flexible-tracks">flexible tracks</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-item">flex item</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-layout">flex layout</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-level">flex-level</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-line">flex line</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#flex-flex-shrink-factor">flex shrink factor</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#float-area">float area</a>
<li><a href="https://drafts.csswg.org/css2/#float-rules">float rules</a>
<li><a href="https://drafts.csswg.org/css-color-3/#floralwhite">floralwhite</a>
<li><a href="https://drafts.csswg.org/css-display-3/#flow-layout">flow layout</a>
<li><a href="https://drafts.csswg.org/css2/#flow-of-an-element">flow of an element</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#flow-relative">flow-relative</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#flow-relative-direction">flow-relative direction</a>
<li><a href="https://drafts.csswg.org/css2/#focus">focus</a>
<li><a href="https://drafts.csswg.org/css2/#following">following element</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font_face_rule">font_face_rule</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font_face_sym">font_face_sym</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#font-family-def">font-family</a>
<li>
font-kerning
<ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-kerning-auto-value">in css-fonts-3</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-kerning-none-value">in css-fonts-3</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-kerning-normal-value">in css-fonts-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-values-3/#font-relative-length">font-relative lengths</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-size-adjust-none-value">font-size-adjust</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#font-source">font source</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-stretch-normal-value">font-stretch</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-style-normal-value">font-style</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-caps-normal-value">font-variant-caps</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-east-asian-normal-value">font-variant-east-asian</a>
<li>
font-variant-ligatures
<ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-ligatures-none-value">in css-fonts-3</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-ligatures-normal-value">in css-fonts-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-numeric-normal-value">font-variant-numeric</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-position-normal-value">font-variant-position</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-weight-normal-value">font-weight</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#footnote">footnote</a>
<li><a href="https://drafts.csswg.org/css-break-3/#forced-break">forced break</a>
<li><a href="https://drafts.csswg.org/css-break-3/#forced-break-values">forced break values</a>
<li><a href="https://drafts.csswg.org/css-text-3/#forced-line-break">forced line break</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#forced-paragraph-break">forced paragraph break</a>
<li><a href="https://drafts.csswg.org/css-color-3/#forestgreen">forestgreen</a>
<li><a href="https://drafts.csswg.org/css-display-3/#formatting-context">formatting context</a>
<li><a href="https://drafts.csswg.org/css2/#formatting-structure">formatting structure</a>
<li><a href="https://drafts.csswg.org/css2/#forward-compatible-parsing">forward-compatible parsing</a>
<li><a href="https://drafts.csswg.org/css-break-3/#fragment">fragment</a>
<li><a href="https://drafts.csswg.org/css-break-3/#fragmentainer">fragmentainer</a>
<li><a href="https://drafts.csswg.org/css-break-3/#fragmentation">fragmentation</a>
<li><a href="https://drafts.csswg.org/css-break-3/#fragmentation-break">fragmentation break</a>
<li><a href="https://drafts.csswg.org/css-break-3/#fragmentation-container">fragmentation container</a>
<li><a href="https://drafts.csswg.org/css-break-3/#fragmentation-context">fragmentation context</a>
<li><a href="https://drafts.csswg.org/css-break-3/#fragmentation-direction">fragmentation direction</a>
<li><a href="https://drafts.csswg.org/css-break-3/#fragmentation-root">fragmentation root</a>
<li><a href="https://drafts.csswg.org/css-break-3/#fragmented-flow">fragmented flow</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#free-space">free space</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#frequency-def">frequency</a>
<li>
fuchsia
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#fuchsia">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#fuchsia0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-text-3/#kana-full-size">full-size</a>
<li><a href="https://drafts.csswg.org/css-text-3/#kana-full-size">full-size kana</a>
<li>
full-width
<ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#full-width">in css-fonts-3</a>
<li><a href="https://drafts.csswg.org/css-text-3/#full-width">in css-text-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#fully-inflexible">fully inflexible</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#function">function</a>
<li><a href="https://drafts.csswg.org/css-values-3/#functional-notation">functional notation</a>
<li><a href="https://drafts.csswg.org/css-color-3/#gainsboro">gainsboro</a>
<li><a href="https://drafts.csswg.org/css-text-3/#unicode-general-category">general category</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#generate-a-counter">generate a counter</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#generate-a-counter">generate a counter representation</a>
<li><a href="https://drafts.csswg.org/css-align-3/#generate-baselines">generate baselines</a>
<li><a href="https://drafts.csswg.org/css2/#generated-content">generated content</a>
<li><a href="https://drafts.csswg.org/css-color-3/#ghostwhite">ghostwhite</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#go">go</a>
<li><a href="https://drafts.csswg.org/css-color-3/#gold">gold</a>
<li><a href="https://drafts.csswg.org/css-color-3/#goldenrod">goldenrod</a>
<li><a href="https://drafts.csswg.org/css-images-3/#gradient-average-color">gradient-average-color</a>
<li><a href="https://drafts.csswg.org/css-images-3/#gradient-box">gradient box</a>
<li><a href="https://drafts.csswg.org/css-images-3/#radial-gradient-gradient-center">gradient center</a>
<li><a href="https://drafts.csswg.org/css-images-3/#gradient-function">gradient function</a>
<li><a href="https://drafts.csswg.org/css-images-3/#gradient-line">gradient line</a>
<li><a href="https://drafts.csswg.org/css-text-3/#grapheme-cluster">grapheme cluster</a>
<li>
gray
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#gray">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#gray0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#graytext">graytext</a>
<li>
green
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#green">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#green0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#greenyellow">greenyellow</a>
<li><a href="https://drafts.csswg.org/css-color-3/#grey">grey</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid">grid</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-area">grid area</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-cell">grid cell</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-column">grid column</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-line">grid column line</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-container">grid container</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-formatting-context">grid formatting context</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-item">grid item</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-item-placement-algorithm">grid item placement algorithm</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-layout">grid layout</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-level">grid-level</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-line">grid line</a>
<li><a href="https://drafts.csswg.org/css2/#grid-media-group">'grid' media group</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-order">grid-modified document order</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-order">grid order</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-placement">grid placement</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-placement-property">grid-placement property</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-position">grid position</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-row">grid row</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-line">grid row line</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-sizing-algorithm">grid sizing algorithm</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-span">grid span</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-track">grid track</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#growth-limit">growth limit</a>
<li><a href="https://drafts.csswg.org/css-variables-1/#guaranteed-invalid-value">guaranteed-invalid value</a>
<li><a href="https://drafts.csswg.org/css-align-3/#gutter">gutter</a>
<li><a href="https://drafts.csswg.org/css-text-3/#half-width">half-width</a>
<li><a href="https://drafts.csswg.org/css-text-3/#hang">hang</a>
<li><a href="https://drafts.csswg.org/css-text-3/#hanging-glyph">hanging glyph</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#height">height</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#hex-digit">hex digit</a>
<li><a href="https://drafts.csswg.org/css-color-3/#highlight">highlight</a>
<li><a href="https://drafts.csswg.org/css-color-3/#highlighttext">highlighttext</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#historical-ligatures">historical-ligatures</a>
<li><a href="https://drafts.csswg.org/css-color-3/#honeydew">honeydew</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#x-axis">horizontal axis</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#horizontal-block-flow">horizontal block flow</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#horizontal-dimension">horizontal dimension</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#horizontal-offset">horizontal offset</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#horizontal-only">horizontal-only</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#horizontal-script">horizontal script</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#horizontal-typographic-mode">horizontal typographic mode</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#horizontal-writing-mode">horizontal writing mode</a>
<li><a href="https://drafts.csswg.org/css-color-3/#hotpink">hotpink</a>
<li><a href="https://drafts.csswg.org/css-text-3/#hyphenate">hyphenate</a>
<li><a href="https://drafts.csswg.org/css-text-3/#hyphenate">hyphenation</a>
<li><a href="https://drafts.csswg.org/css-text-3/#hyphenation-opportunity">hyphenation opportunity</a>
<li><a href="https://drafts.csswg.org/css2/#hyphen-separated-matching">hyphen-separated matching</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#hypothetical-cross-size">hypothetical cross size</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#hypothetical-fr-size">hypothetical fr size</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#hypothetical-main-size">hypothetical main size</a>
<li>
ident
<ul>
<li><a href="https://www.w3.org/TR/css-values-3/#css-identifier">in css-values-3</a>
<li><a href="https://drafts.csswg.org/css-values-3/#css-css-identifier">in css-values-3, for CSS</a>
</ul>
<li><a href="https://drafts.csswg.org/css-syntax-3/#ident-code-point">ident code point</a>
<li>
identifier
<ul>
<li><a href="https://www.w3.org/TR/css-speech-1/#identifier-def">in css-speech-1</a>
<li><a href="https://www.w3.org/TR/css-values-3/#css-identifier">in css-values-3</a>
<li><a href="https://drafts.csswg.org/css-values-3/#css-css-identifier">in css-values-3, for CSS</a>
</ul>
<li><a href="https://www.w3.org/TR/CSS2/syndata.html#value-def-identifier">identifiers</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#identity-transform-function">identity transform function</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#ident-sequence">ident sequence</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#ident-start-code-point">ident-start code point</a>
<li><a href="https://drafts.csswg.org/css2/#ignore①">ignore</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-ignored">ignored</a>
<li><a href="https://drafts.csswg.org/css2/#ignore-unknown">ignore unknown</a>
<li><a href="https://drafts.csswg.org/css2/#ignore-valid">ignore valid</a>
<li><a href="https://drafts.csswg.org/css2/#illegal">illegal</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#implicit-grid">implicit grid</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#implicit-grid-track">implicit grid column</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#implicit-grid-lines">implicit grid lines</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#implicit-grid-properties">implicit grid properties</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#implicit-grid-track">implicit grid row</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#implicit-grid-track">implicit grid track</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#implicitly-assigned-line-name">implicitly-assigned line name</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#implicitly-named-area">implicitly-named area</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#important">important</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#import-conditions">import conditions</a>
<li><a href="https://drafts.csswg.org/css-color-3/#inactiveborder">inactiveborder</a>
<li><a href="https://drafts.csswg.org/css-color-3/#inactivecaption">inactivecaption</a>
<li><a href="https://drafts.csswg.org/css-color-3/#inactivecaptiontext">inactivecaptiontext</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#definite">indefinite</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#definite">indefinite size</a>
<li><a href="https://drafts.csswg.org/css-display-3/#independent-formatting-context">independent formatting context</a>
<li><a href="https://drafts.csswg.org/css-color-3/#indianred">indianred</a>
<li><a href="https://drafts.csswg.org/css-color-3/#indigo">indigo</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#infinitely-growable">infinitely growable</a>
<li><a href="https://drafts.csswg.org/css-display-3/#in-flow">in flow</a>
<li><a href="https://drafts.csswg.org/css-display-3/#in-flow">in-flow</a>
<li><a href="https://drafts.csswg.org/css-color-3/#infobackground">infobackground</a>
<li><a href="https://drafts.csswg.org/css-color-3/#infotext">infotext</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#inheritance">inherit</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#inheritance">inheritance</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#inherited-property">inherited property</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#inherited-value">inherited value</a>
<li><a href="https://drafts.csswg.org/css-display-3/#initial-containing-block">initial containing block</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#initial-free-space">initial free space</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#initial-representation-for-the-counter-value">initial representation for the counter value</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#initial-value">initial value</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inline">inline</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-axis">inline axis</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-axis">inline-axis</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-base-direction">inline base direction</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inline-block">inline block</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inline-block">inline block box</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inline-box">inline box</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-dimension">inline dimension</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-end">inline end</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-end">inline-end</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inline-formatting-context">inline formatting context</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inline-level">inline-level</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inline-level-box">inline-level box</a>
<li><a href="https://drafts.csswg.org/css2/#inline-level-boxes">inline-level boxes</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inline-level">inline-level content</a>
<li><a href="https://drafts.csswg.org/css2/#inline-level">inline-level elements</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-size">inline size</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-size">inline-size</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-start">inline start</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#inline-start">inline-start</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inlinify">inlinification</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inlinify">inlinify</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#inner-box-shadow">inner box-shadow</a>
<li><a href="https://drafts.csswg.org/css-display-3/#inner-display-type">inner display type</a>
<li><a href="https://drafts.csswg.org/css2/#inner-edge">inner edge</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#input-progress-value">input progress value</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#input-stream">input stream</a>
<li>
integer
<ul>
<li><a href="https://www.w3.org/TR/css-speech-1/#integer-def">in css-speech-1</a>
<li><a href="https://drafts.csswg.org/css-values-3/#integer">in css-values-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#intended-direction">intended direction</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#intended-direction-and-end-position">intended direction and end position</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#intended-end-position">intended end position</a>
<li><a href="https://drafts.csswg.org/css2/#interactive-media-group">'interactive media group</a>
<li><a href="https://drafts.csswg.org/css-display-3/#internal-ruby-box">internal ruby box</a>
<li><a href="https://drafts.csswg.org/css-display-3/#internal-ruby-element">internal ruby element</a>
<li><a href="https://drafts.csswg.org/css-display-3/#internal-table-box">internal table box</a>
<li><a href="https://drafts.csswg.org/css-display-3/#internal-table-element">internal table element</a>
<li>
interpreter
<ul>
<li><a href="https://www.w3.org/TR/css-namespaces-3/#interpreter">in css-namespaces-3</a>
<li><a href="https://drafts.csswg.org/css-style-attr-1/#interpreter">in css-style-attr-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#intrinsic">intrinsic dimensions</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#intrinsic-sizing-function">intrinsic sizing function</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-invalid">invalid</a>
<li><a href="https://drafts.csswg.org/css-variables-1/#invalid-at-computed-value-time">invalid at computed-value time</a>
<li><a href="https://drafts.csswg.org/css-images-3/#invalid-image">invalid image</a>
<li><a href="https://drafts.csswg.org/css-display-3/#invisible">invisible</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#isolated-sequence">isolated sequence</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#bidi-isolate">isolation</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#italic">italic</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#fontfaceset-iteration-order">iteration order</a>
<li><a href="https://drafts.csswg.org/css-color-3/#ivory">ivory</a>
<li><a href="https://drafts.csswg.org/css-text-3/#writing-system-japanese">japanese</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#jis04">jis04</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#jis78">jis78</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#jis83">jis83</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#jis90">jis90</a>
<li><a href="https://drafts.csswg.org/css-text-3/#justification-opportunity">justification opportunity</a>
<li><a href="https://drafts.csswg.org/css-values-3/#css-keyword">keyword</a>
<li><a href="https://drafts.csswg.org/css-color-3/#khaki">khaki</a>
<li><a href="https://drafts.csswg.org/css-text-3/#writing-system-known">known</a>
<li><a href="https://drafts.csswg.org/css-text-3/#writing-system-korean">korean</a>
<li><a href="https://drafts.csswg.org/css-align-3/#last-baseline-alignment">last-baseline alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-content-alignment">last-baseline content-alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#last-baseline-set">last baselines</a>
<li><a href="https://drafts.csswg.org/css-align-3/#baseline-self-alignment">last-baseline self-alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#last-baseline-set">last baseline set</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#cross-axis-baseline">last cross-axis baseline set</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-axis-baseline">last main-axis baseline set</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lavender">lavender</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lavenderblush">lavenderblush</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lawngreen">lawngreen</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#laying-out-in-place">laying out in-place</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#layout-containment">layout containment</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#layout-containment-box">layout containment box</a>
<li><a href="https://drafts.csswg.org/css-display-3/#layout-internal">layout-internal</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-left">left</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#leftover-space">leftover space</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#legacy-name-alias">legacy name alias</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#legacy-shorthand">legacy shorthand</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#css-legacy-value-alias">legacy value alias</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lemonchiffon">lemonchiffon</a>
<li>
letter
<ul>
<li><a href="https://drafts.csswg.org/css-syntax-3/#letter">in css-syntax-3</a>
<li><a href="https://drafts.csswg.org/css-text-3/#letter">in css-text-3</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#letter">in css-text-decor-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#lightblue">lightblue</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightcoral">lightcoral</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightcyan">lightcyan</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#lighter">lighter</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightgoldenrodyellow">lightgoldenrodyellow</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightgray">lightgray</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightgreen">lightgreen</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightgrey">lightgrey</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightpink">lightpink</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightsalmon">lightsalmon</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightseagreen">lightseagreen</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightskyblue">lightskyblue</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightslategray">lightslategray</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightslategrey">lightslategrey</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#light-source">light source</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightsteelblue">lightsteelblue</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lightyellow">lightyellow</a>
<li>
lime
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#lime">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#lime0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#limegreen">limegreen</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#limited-contribution">limited max-content contribution</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#limited-contribution">limited min-content contribution</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#linear-easing-function">linear easing function</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#linear-easing-function">linear timing function</a>
<li><a href="https://drafts.csswg.org/css2/#line-box">line box</a>
<li>
line break
<ul>
<li><a href="https://www.w3.org/TR/css-break-3/#line-break">in css-break-3</a>
<li><a href="https://drafts.csswg.org/css-text-3/#line-break">in css-text-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-text-3/#line-breaking-process">line breaking</a>
<li><a href="https://drafts.csswg.org/css-text-3/#line-breaking-process">line breaking process</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#line-left">line-left</a>
<li><a href="https://drafts.csswg.org/css-color-3/#linen">linen</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#line-name">line name</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#line-name-set">line name set</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#line-orientation">line orientation</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#line-over">line-over</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#line-relative">line-relative</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#line-relative-direction">line-relative direction</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#line-right">line-right</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#line-under">line-under</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#lining-nums">lining-nums</a>
<li><a href="https://drafts.csswg.org/css2/#list-properties">list properties</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#list-style-image-def">list-style-image</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#list-style-type-def">list-style-type</a>
<li><a href="https://drafts.csswg.org/css-images-3/#loading-image">loading image</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#local-coordinate-system">local coordinate system</a>
<li><a href="https://drafts.csswg.org/css-values-3/#url-local-url-flag">local url flag</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#logical-height">logical height</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#logical-width">logical width</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#longhand">longhand</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#longhand">longhand property</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#lowercase-letter">lowercase letter</a>
<li><a href="https://drafts.csswg.org/css-color-3/#magenta">magenta</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-axis">main axis</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-axis">main-axis</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-axis-baseline">main-axis baseline set</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-dimension">main dimension</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-end">main-end</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-size">main size</a>
<li><a href="https://www.w3.org/TR/css-flexbox-1/#main-size">main-size</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-size-property">main size property</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#main-start">main-start</a>
<li><a href="https://drafts.csswg.org/css2/#map-document-language-elements-to-table-elements">map document language elements to table elements</a>
<li>
margin
<ul>
<li><a href="https://www.w3.org/TR/css-speech-1/#margin-def">in css-speech-1</a>
<li><a href="https://drafts.csswg.org/css2/#box-margin-area">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#margin-box">margin box</a>
<li><a href="https://www.w3.org/TR/css-shapes-1/#margin-box">margin-box</a>
<li><a href="https://drafts.csswg.org/css2/#margin-edge">margin edge</a>
<li><a href="https://drafts.csswg.org/css2/#box-margin-area">margin (of a box)</a>
<li>
maroon
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#maroon">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#maroon0">in css-color-3</a>
</ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#mask-border-image">mask border image</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#mask-border-image-area">mask border image area</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#mask-image">mask image</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#mask-layer-image">mask layer image</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#mask-painting-area">mask painting area</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#mask-position">mask-position</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#mask-positioning-area">mask positioning area</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#mask-size">mask-size</a>
<li><a href="https://www.w3.org/TR/CSS2/selector.html#x1">matches</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#matching-transition-delay">matching transition delay</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#matching-transition-duration">matching transition duration</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#matching-transition-property-value">matching transition-property value</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#matching-transition-timing-function">matching transition timing function</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#max-cross-size">max cross size</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#max-cross-size-property">max cross size property</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#maximum-allowed-code-point">maximum allowed code point</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#max-inner-height">max inner height</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#max-inner-width">max inner width</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#max-main-size">max main size</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#max-main-size-property">max main size property</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#max-track-sizing-function">max track sizing function</a>
<li><a href="https://drafts.csswg.org/css2/#may">may</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#media-condition">media condition</a>
<li><a href="https://drafts.csswg.org/css2/#conditional-import">media-dependent import</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#media-feature">media feature</a>
<li><a href="https://drafts.csswg.org/css2/#media-groups①">media groups</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#media-query">media query</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#media-query-list">media query list</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#media-query-modifier">media query modifier</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#media-type">media type</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mediumaquamarine">mediumaquamarine</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mediumblue">mediumblue</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mediumorchid">mediumorchid</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mediumpurple">mediumpurple</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mediumseagreen">mediumseagreen</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mediumslateblue">mediumslateblue</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mediumspringgreen">mediumspringgreen</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mediumturquoise">mediumturquoise</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mediumvioletred">mediumvioletred</a>
<li><a href="https://drafts.csswg.org/css-color-3/#menu">menu</a>
<li><a href="https://drafts.csswg.org/css-color-3/#menutext">menutext</a>
<li><a href="https://drafts.csswg.org/css-color-3/#midnightblue">midnightblue</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#min-cross-size">min cross size</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#min-cross-size-property">min cross size property</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#minimum-contribution">minimum contribution</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#min-inner-height">min inner height</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#min-inner-width">min inner width</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#min-main-size">min main size</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#min-main-size-property">min main size property</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mintcream">mintcream</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#min-track-sizing-function">min track sizing function</a>
<li><a href="https://drafts.csswg.org/css-color-3/#mistyrose">mistyrose</a>
<li><a href="https://drafts.csswg.org/css-color-3/#moccasin">moccasin</a>
<li><a href="https://drafts.csswg.org/css-break-3/#monolithic">monolithic</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#monospace">monospace</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#multi-column-container">multicol container</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#multi-column-line">multi-col line</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#multi-column-line">multicol line</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#multi-column-container">multi-column container</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#multi-column-formatting-context">multi-column formatting context</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#multi-column-layout">multi-column layout</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#multi-column-line">multi-column line</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#multi-line-flex-container">multi-line flex container</a>
<li><a href="https://drafts.csswg.org/css2/#multiple-declarations">multiple declarations</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#multiply">multiply</a>
<li><a href="https://drafts.csswg.org/css2/#must">must</a>
<li><a href="https://drafts.csswg.org/css2/#must-not">must not</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-template-areas-named-cell-token">named cell token</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#named-grid-area">named grid area</a>
<li><a href="https://drafts.csswg.org/css-namespaces-3/#namespace-prefix">namespace prefix</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#ident-start-code-point">name-start code point</a>
<li><a href="https://drafts.csswg.org/css-images-3/#natural-aspect-ratio">natural aspect ratio</a>
<li><a href="https://drafts.csswg.org/css-images-3/#natural-dimensions">natural dimension</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#natural-end-point">natural end-point</a>
<li><a href="https://drafts.csswg.org/css-images-3/#natural-height">natural height</a>
<li><a href="https://drafts.csswg.org/css-images-3/#natural-size">natural size</a>
<li><a href="https://drafts.csswg.org/css-images-3/#natural-width">natural width</a>
<li><a href="https://drafts.csswg.org/css-color-3/#navajowhite">navajowhite</a>
<li>
navy
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#navy">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#navy0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-syntax-3/#newline">newline</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#next-input-code-point">next input code point</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#next-input-token">next input token</a>
<li><a href="https://drafts.csswg.org/selectors-3/#next-sibling-combinator">next-sibling combinator</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#no-common-ligatures">no-common-ligatures</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#no-contextual">no-contextual</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#no-discretionary-ligatures">no-discretionary-ligatures</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#no-historical-ligatures">no-historical-ligatures</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#non-ascii-code-point">non-ascii code point</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-kerning-none-value">none!!font-kerning</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-size-adjust-none-value">none!!font-size-adjust</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-ligatures-none-value">none!!font-variant-ligatures</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#non-negative-number-def">non-negative-number</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#non-printable-code-point">non-printable code point</a>
<li><a href="https://drafts.csswg.org/css-display-3/#non-replaced">non-replaced</a>
<li><a href="https://drafts.csswg.org/css-display-3/#non-replaced">non-replaced element</a>
<li><a href="https://www.w3.org/TR/css-font-loading-3/#no-pending-font-loads">no pending font loads</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#normal">normal</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-kerning-normal-value">normal!!font-kerning</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-stretch-normal-value">normal!!font-stretch</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-style-normal-value">normal!!font-style</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-caps-normal-value">normal!!font-variant-caps</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-east-asian-normal-value">normal!!font-variant-east-asian</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-ligatures-normal-value">normal!!font-variant-ligatures</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-numeric-normal-value">normal!!font-variant-numeric</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-position-normal-value">normal!!font-variant-position</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-weight-normal-value">normal!!font-weight</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#normalize-into-a-token-stream">normalize into a token stream</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-template-areas-null-cell-token">null cell token</a>
<li>
number
<ul>
<li><a href="https://www.w3.org/TR/css-speech-1/#number-def">in css-speech-1</a>
<li><a href="https://drafts.csswg.org/css-values-3/#number">in css-values-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-values-3/#numeric-data-types">numeric data types</a>
<li><a href="https://drafts.csswg.org/css-images-3/#objects">objects</a>
<li><a href="https://drafts.csswg.org/css-images-3/#object-size-negotiation">object size negotiation</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#oblique">oblique</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#occupied">occupied</a>
<li><a href="https://drafts.csswg.org/css-color-3/#oldlace">oldlace</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#oldstyle-nums">oldstyle-nums</a>
<li>
olive
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#olive">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#olive0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#olivedrab">olivedrab</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#operating-coordinate-space">operating coordinate space</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#optimal-viewing-region">optimal viewing region</a>
<li><a href="https://drafts.csswg.org/css2/#optional">optional</a>
<li><a href="https://drafts.csswg.org/css-color-3/#orange">orange</a>
<li><a href="https://drafts.csswg.org/css-color-3/#orangered">orangered</a>
<li><a href="https://drafts.csswg.org/css-color-3/#orchid">orchid</a>
<li>
order-modified document order
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#order-modified-document-order">in css-display-3</a>
<li><a href="https://www.w3.org/TR/css-flexbox-1/#order-modified-document-order">in css-flexbox-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#ordinal">ordinal</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#establish-an-orthogonal-flow">orthogonal</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#establish-an-orthogonal-flow">orthogonal flow</a>
<li><a href="https://drafts.csswg.org/css-text-3/#other-space-separators">other space separators</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#outer-box-shadow">outer box-shadow</a>
<li><a href="https://drafts.csswg.org/css-display-3/#outer-display-type">outer display type</a>
<li><a href="https://drafts.csswg.org/css2/#outer-edge">outer edge</a>
<li><a href="https://drafts.csswg.org/css-display-3/#out-of-flow">out of flow</a>
<li><a href="https://drafts.csswg.org/css-display-3/#out-of-flow">out-of-flow</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#output-of-the-cascade">output of the cascade</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#output-progress-value">output progress value</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#over">over</a>
<li><a href="https://drafts.csswg.org/css2/#overflow">overflow</a>
<li><a href="https://drafts.csswg.org/css-align-3/#overflow-alignment">overflow alignment</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#overflow-columns">overflow columns</a>
<li>
padding
<ul>
<li><a href="https://www.w3.org/TR/css-speech-1/#padding-def">in css-speech-1</a>
<li><a href="https://drafts.csswg.org/css2/#box-padding-area">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#padding-box">padding box</a>
<li><a href="https://www.w3.org/TR/css-shapes-1/#padding-box">padding-box</a>
<li><a href="https://drafts.csswg.org/css2/#padding-edge">padding edge</a>
<li><a href="https://drafts.csswg.org/css2/#box-padding-area">padding (of a box)</a>
<li><a href="https://drafts.csswg.org/css2/#page-area">page area</a>
<li><a href="https://drafts.csswg.org/css2/#page-box①">page box</a>
<li><a href="https://drafts.csswg.org/css-break-3/#page-break">page break</a>
<li><a href="https://drafts.csswg.org/css2/#page-context">page context</a>
<li><a href="https://drafts.csswg.org/css2/#page-context">page-context</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#paged-media">paged media</a>
<li><a href="https://drafts.csswg.org/css2/#paged-media-group">'paged' media group</a>
<li><a href="https://drafts.csswg.org/css2/#page-selector">page selector</a>
<li><a href="https://drafts.csswg.org/css-break-3/#pagination">pagination</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#paint-containment">paint containment</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#paint-containment-box">paint containment box</a>
<li><a href="https://drafts.csswg.org/css-color-3/#palegoldenrod">palegoldenrod</a>
<li><a href="https://drafts.csswg.org/css-color-3/#palegreen">palegreen</a>
<li><a href="https://drafts.csswg.org/css-color-3/#paleturquoise">paleturquoise</a>
<li><a href="https://drafts.csswg.org/css-color-3/#palevioletred">palevioletred</a>
<li><a href="https://drafts.csswg.org/css-color-3/#papayawhip">papayawhip</a>
<li><a href="https://drafts.csswg.org/css2/#parent">parent</a>
<li><a href="https://drafts.csswg.org/css-display-3/#css-parent-box">parent box</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-parse-something-according-to-a-css-grammar">parse</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-parse-a-comma-separated-list-according-to-a-css-grammar">parse a comma-separated list according to a css grammar</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-comma-separated-list-of-component-values">parse a comma-separated list of component values</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-component-value">parse a component value</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-css-stylesheet">parse a css stylesheet</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-declaration">parse a declaration</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-parse-a-comma-separated-list-according-to-a-css-grammar">parse a list</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-list-of-component-values">parse a list of component values</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-list-of-declarations">parse a list of declarations</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-list-of-rules">parse a list of rules</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-rule">parse a rule</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-style-blocks-contents">parse a style block's contents</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-a-stylesheet">parse a stylesheet</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#parse-error">parse error</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-parse-something-according-to-a-css-grammar">parse something according to a css grammar</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-parse-a-comma-separated-list-according-to-a-css-grammar">parsing a list</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#baseline-participation">participates in baseline alignment</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#pass-through-filter">pass through filter</a>
<li><a href="https://drafts.csswg.org/css-color-3/#peachpuff">peachpuff</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#fontfaceset-pending-on-the-environment">pending on the environment</a>
<li><a href="https://drafts.csswg.org/css-variables-1/#pending-substitution-value">pending-substitution value</a>
<li>
percentage
<ul>
<li><a href="https://www.w3.org/TR/css-speech-1/#percentage-def">in css-speech-1</a>
<li><a href="https://drafts.csswg.org/css-values-3/#percentage">in css-values-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#peru">peru</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#petite-caps">petite-caps</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical">physical</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-bottom">physical bottom</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-dimensions">physical dimensions</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-direction">physical direction</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-left">physical left</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-right">physical right</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-top">physical top</a>
<li><a href="https://drafts.csswg.org/css-values-3/#physical-units">physical units</a>
<li><a href="https://drafts.csswg.org/css-color-3/#pink">pink</a>
<li><a href="https://drafts.csswg.org/css2/#reference-pixel">pixel</a>
<li><a href="https://drafts.csswg.org/css-values-3/#visual-angle-unit">pixel unit</a>
<li><a href="https://drafts.csswg.org/css-color-3/#plum">plum</a>
<li><a href="https://drafts.csswg.org/css-align-3/#positional-alignment">positional alignment</a>
<li><a href="https://drafts.csswg.org/css2/#positioned-element">positioned</a>
<li><a href="https://drafts.csswg.org/css2/#positioned-element">positioned element/box</a>
<li><a href="https://drafts.csswg.org/css2/#positioning-scheme①">positioning scheme</a>
<li><a href="https://drafts.csswg.org/css2/#positioning-scheme①">positioning schemes:</a>
<li><a href="https://www.w3.org/TR/css-font-loading-3/#possibly-pending-font-loads">possibly pending font loads</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#post-multiplied">post-multiplied</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#post-multiply">post-multiply</a>
<li><a href="https://drafts.csswg.org/css-color-3/#powderblue">powderblue</a>
<li><a href="https://drafts.csswg.org/css2/#preceding">preceding element</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#pre-multiplied">pre-multiplied</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#pre-multiply">pre-multiply</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#preserved-tokens">preserved tokens</a>
<li><a href="https://drafts.csswg.org/css-text-3/#preserved-white-space">preserved white space</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#primary-filter-primitive-tree">primary filter primitive tree</a>
<li><a href="https://drafts.csswg.org/css2/#principal-box">principal block-level box</a>
<li><a href="https://drafts.csswg.org/css-display-3/#principal-box">principal box</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#principal-writing-mode">principal writing mode</a>
<li><a href="https://drafts.csswg.org/css-break-3/#propagate">propagate</a>
<li><a href="https://drafts.csswg.org/css-break-3/#propagate">propagation</a>
<li><a href="https://drafts.csswg.org/css2/#proper-table-child">proper table child</a>
<li><a href="https://drafts.csswg.org/css2/#proper-table-row-parent">proper table row parent</a>
<li>
property
<ul>
<li><a href="https://drafts.csswg.org/css-cascade-4/#css-property">in css-cascade-4, for CSS</a>
<li><a href="https://drafts.csswg.org/css2/#property">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-property-declarations">property declarations</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#proportional-nums">proportional-nums</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#proportional-width">proportional-width</a>
<li><a href="https://drafts.csswg.org/css2/#pseudo-classes①">pseudo-classes</a>
<li><a href="https://drafts.csswg.org/css2/#pseudo-elements①">pseudo-elements</a>
<li>
purple
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#purple">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#purple0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-syntax-3/#qualified-rule">qualified rule</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#range-context">range context</a>
<li><a href="https://drafts.csswg.org/css2/#recommended">recommended</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#reconsume-the-current-input-code-point">reconsume the current input code point</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#reconsume-the-current-input-token">reconsume the current input token</a>
<li>
red
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#red">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#red0">in css-color-3</a>
</ul>
<li>
reference box
<ul>
<li><a href="https://drafts.csswg.org/css-shapes-1/#reference-box">in css-shapes-1</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#reference-box">in css-transforms-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-values-3/#reference-pixel">reference pixel</a>
<li><a href="https://drafts.csswg.org/css-break-3/#region-break">region break</a>
<li><a href="https://drafts.csswg.org/css-values-3/#relative-length">relative length</a>
<li><a href="https://drafts.csswg.org/css2/#relative-positioning①">relative positioning</a>
<li><a href="https://drafts.csswg.org/css2/#relative-units">relative units</a>
<li><a href="https://drafts.csswg.org/css-break-3/#remaining-fragmentainer-extent">remaining fragmentainer extent</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#remaining-free-space">remaining free space</a>
<li><a href="https://drafts.csswg.org/css2/#rendered-content">rendered content</a>
<li>
renderer
<ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#renderer">in css-fonts-3</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#renderer">in css-speech-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-display-3/#replaced-element">replaced</a>
<li><a href="https://drafts.csswg.org/css-display-3/#replaced-element">replaced element</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#representation">representation</a>
<li><a href="https://drafts.csswg.org/css2/#required">required</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#reset-only-sub-property">reset-only sub-property</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#re-snap">re-snap</a>
<li><a href="https://drafts.csswg.org/css-values-3/#resolved-type">resolved type</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#transition-reversing-adjusted-start-value">reversing-adjusted start value</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#transition-reversing-shortening-factor">reversing shortening factor</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-right">right</a>
<li><a href="https://drafts.csswg.org/css2/#root">root</a>
<li><a href="https://drafts.csswg.org/css-color-3/#rosybrown">rosybrown</a>
<li><a href="https://drafts.csswg.org/css2/#row-group-box">row group box</a>
<li><a href="https://drafts.csswg.org/css2/#row-groups">row groups</a>
<li><a href="https://drafts.csswg.org/css-color-3/#royalblue">royalblue</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#ruby">ruby</a>
<li><a href="https://drafts.csswg.org/css2/#rule-sets-dfn">rule set</a>
<li><a href="https://drafts.csswg.org/css2/#rules-on-anonymous-table-objects">rules on anonymous table objects</a>
<li><a href="https://drafts.csswg.org/css-display-3/#run-in">run-in</a>
<li><a href="https://drafts.csswg.org/css-display-3/#run-in">run-in box</a>
<li><a href="https://drafts.csswg.org/css-display-3/#run-in-sequence">run-in sequence</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#running-transition">running transition</a>
<li><a href="https://drafts.csswg.org/css-color-3/#saddlebrown">saddlebrown</a>
<li><a href="https://drafts.csswg.org/css-color-3/#salmon">salmon</a>
<li><a href="https://drafts.csswg.org/css-color-3/#sandybrown">sandybrown</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#sans-serif">sans-serif</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#scaled-flex-shrink-factor">scaled flex shrink factor</a>
<li><a href="https://drafts.csswg.org/css2/#scope①">scope</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#x1">screen reader</a>
<li><a href="https://drafts.csswg.org/css-text-3/#unicode-script">script property</a>
<li><a href="https://drafts.csswg.org/css-color-3/#scrollbar">scrollbar</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap">scroll snap</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-area">scroll snap area</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-container">scroll snap container</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snapport">scroll snapport</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-position">scroll snap position</a>
<li><a href="https://drafts.csswg.org/css-color-3/#seagreen">seagreen</a>
<li><a href="https://drafts.csswg.org/css-color-3/#seashell">seashell</a>
<li><a href="https://drafts.csswg.org/css-text-3/#segment-break">segment break</a>
<li>
selector
<ul>
<li><a href="https://drafts.csswg.org/css2/#selector①">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#selector">in selectors-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#selector-matches">selector matches</a>
<li><a href="https://drafts.csswg.org/css-align-3/#self-align">self-alignment</a>
<li><a href="https://drafts.csswg.org/css-align-3/#self-alignment-properties">self-alignment properties</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#semi-condensed-">semi-condensed</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#semi-expanded">semi-expanded</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#voice-pitch-semitone">semitone</a>
<li><a href="https://drafts.csswg.org/css2/#separated-borders-model">separated borders model</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sequence-of-simple-selectors">sequence of simple selectors</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#serialize-an-anb-value">serialize an <an+b> value</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#serif">serif</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#fontfaceset-set-entries">set entries</a>
<li><a href="https://drafts.csswg.org/css2/#shall">shall</a>
<li><a href="https://drafts.csswg.org/css2/#shall-not">shall not</a>
<li><a href="https://drafts.csswg.org/css-align-3/#shared-alignment-context">shared alignment context</a>
<li><a href="https://drafts.csswg.org/css2/#sheets">sheets</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#shorthand-property">shorthand</a>
<li><a href="https://drafts.csswg.org/css2/#shorthand-properties">shorthand properties</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#shorthand-property">shorthand property</a>
<li><a href="https://drafts.csswg.org/css2/#should">should</a>
<li><a href="https://drafts.csswg.org/css2/#should-not">should not</a>
<li><a href="https://drafts.csswg.org/css2/#sibling">sibling</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#typeset-sideways">sideways typesetting</a>
<li><a href="https://drafts.csswg.org/css-color-3/#sienna">sienna</a>
<li>
silver
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#silver">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#silver0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-syntax-3/#simple-block">simple block</a>
<li>
simple selector
<ul>
<li><a href="https://drafts.csswg.org/css2/#simple-selector">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#simple-selector">in selectors-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#simplified">simplified</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#single-line-flex-container">single-line flex container</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#size-containment">size containment</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#size-containment-box">size containment box</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#sizing-as-if-empty">sizing as if empty</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-template-rows-track-sizing-function">sizing function</a>
<li><a href="https://drafts.csswg.org/css-color-3/#skyblue">skyblue</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#slashed-zero">slashed-zero</a>
<li><a href="https://drafts.csswg.org/css-color-3/#slateblue">slateblue</a>
<li><a href="https://drafts.csswg.org/css-color-3/#slategray">slategray</a>
<li><a href="https://drafts.csswg.org/css-color-3/#slategrey">slategrey</a>
<li><a href="https://drafts.csswg.org/css-text-3/#kana-small">small</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#small-caps">small-caps</a>
<li><a href="https://drafts.csswg.org/css-text-3/#kana-small">small kana</a>
<li><a href="https://drafts.csswg.org/css-color-3/#snow">snow</a>
<li><a href="https://drafts.csswg.org/css-text-3/#soft-wrap-break">soft wrap break</a>
<li><a href="https://drafts.csswg.org/css-text-3/#soft-wrap-opportunity">soft wrap opportunity</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#source">source</a>
<li><a href="https://drafts.csswg.org/css2/#source-document">source document</a>
<li><a href="https://drafts.csswg.org/css-text-3/#spaces">spaces</a>
<li><a href="https://drafts.csswg.org/css2/#space-separated-matching">space-separated matching</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#space-to-fill">space to fill</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#span-count">span count</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#spanner">spanner</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#spanning-element">spanning element</a>
<li><a href="https://drafts.csswg.org/css-images-3/#specified-size">specified size</a>
<li>
specified size suggestion
<ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#specified-size-suggestion">in css-flexbox-1</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#specified-size-suggestion">in css-grid-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-cascade-4/#specified-value">specified value</a>
<li><a href="https://drafts.csswg.org/css2/#specified-value">specified values</a>
<li><a href="https://drafts.csswg.org/css2/#speech-media-group">'speech' media group</a>
<li><a href="https://drafts.csswg.org/css-break-3/#spread-break">spread break</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#spread-distance">spread distance</a>
<li><a href="https://drafts.csswg.org/css-color-3/#springgreen">springgreen</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#stacked-fractions">stacked-fractions</a>
<li><a href="https://drafts.csswg.org/css2/#stacking-context">stacking context</a>
<li><a href="https://drafts.csswg.org/css2/#stack-level">stack level</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#css-start">start</a>
<li><a href="https://drafts.csswg.org/css-images-3/#starting-point">starting point</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-three-code-points-would-start-an-ident-sequence">starts with an ident sequence</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-three-code-points-would-start-a-number">starts with a number</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-two-code-points-are-a-valid-escape">starts with a valid escape</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#transition-start-time">start time</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#transition-start-value">start value</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-three-code-points-would-start-an-ident-sequence">start with an ident sequence</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-three-code-points-would-start-a-number">start with a number</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#statement-at-rule">statement at-rule</a>
<li><a href="https://drafts.csswg.org/css2/#static-media-group">'static' media group</a>
<li><a href="https://drafts.csswg.org/css2/#static-position-containing-block">static-position containing block</a>
<li><a href="https://drafts.csswg.org/css-align-3/#static-position-rectangle">static position rectangle</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#static-position-rectangle">static-position rectangle</a>
<li><a href="https://drafts.csswg.org/css-color-3/#steelblue">steelblue</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#step-easing-function">step easing function</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#step-position">step position</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#steps">steps</a>
<li><a href="https://drafts.csswg.org/css-text-3/#stop-or-comma">stop or comma</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#stretched">stretched</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#strictness-value">strictness value</a>
<li><a href="https://www.w3.org/TR/css-values-3/#string">string</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#strings-def">strings</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#stroke-bounding-box">stroke bounding box</a>
<li><a href="https://drafts.csswg.org/selectors-3/#structural-pseudo-classes">structural pseudo-classes</a>
<li><a href="https://www.w3.org/TR/css-flexbox-1/#strut-size">strut size</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#fontfaceset-stuck-on-the-environment">stuck on the environment</a>
<li><a href="https://drafts.csswg.org/css-style-attr-1/#style-attribute">style attribute</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#style-change-event">style change event</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#style-rule">style rule</a>
<li>
style sheet
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#style-sheet">in css-backgrounds-3</a>
<li><a href="https://www.w3.org/TR/css-namespaces-3/#style-sheet">in css-namespaces-3</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#style-sheet">in css-speech-1</a>
</ul>
<li>
style sheet!!as conformance class
<ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#style-sheet">in css-fonts-3</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#style-sheet0">in css-speech-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#sub">sub</a>
<li><a href="https://drafts.csswg.org/css2/#subject">subject (of selector)</a>
<li><a href="https://drafts.csswg.org/css2/#subject">subjects</a>
<li><a href="https://drafts.csswg.org/selectors-3/#subjects-of-the-selector">subjects of the selector</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#longhand">sub-property</a>
<li><a href="https://drafts.csswg.org/selectors-3/#subsequent-sibling-combinator">subsequent-sibling combinator</a>
<li><a href="https://drafts.csswg.org/css-variables-1/#substitute-a-var">substitute a var()</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#super">super</a>
<li>
support
<ul>
<li><a href="https://drafts.csswg.org/css-conditional-3/#dfn-support">in css-conditional-3, for CSS</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#support">in css-fonts-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-conditional-3/#supports-queries">supports queries</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#switch-the-fontfaceset-to-loaded">switch the fontfaceset to loaded</a>
<li><a href="https://drafts.csswg.org/css-font-loading-3/#switch-the-fontfaceset-to-loading">switch the fontfaceset to loading</a>
<li><a href="https://drafts.csswg.org/css-align-3/#synthesize-baseline">synthesize baseline</a>
<li><a href="https://drafts.csswg.org/css-align-3/#synthesize-baseline">synthesized baseline</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#system-font-fallback">system font fallback</a>
<li><a href="https://drafts.csswg.org/css2/#system-fonts">system fonts</a>
<li><a href="https://drafts.csswg.org/css2/#table">table</a>
<li><a href="https://drafts.csswg.org/css-display-3/#table-caption-box">table caption box</a>
<li><a href="https://drafts.csswg.org/css2/#table-element">table element</a>
<li><a href="https://drafts.csswg.org/css2/#table-grid-box">table grid box</a>
<li><a href="https://drafts.csswg.org/css2/#table-wrapper-box">table wrapper box</a>
<li><a href="https://drafts.csswg.org/css-text-3/#tabs">tabs</a>
<li><a href="https://drafts.csswg.org/css-text-3/#tab-size-dfn">tab size</a>
<li><a href="https://drafts.csswg.org/css-text-3/#tab-stop">tab stop</a>
<li><a href="https://drafts.csswg.org/css2/#tabular-container">tabular container</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#tabular-nums">tabular-nums</a>
<li><a href="https://drafts.csswg.org/css2/#tactile-media-group">'tactile' media group</a>
<li><a href="https://drafts.csswg.org/css-color-3/#tan">tan</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#target-main-size">target main size</a>
<li>
teal
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#teal">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#teal0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-display-3/#text-nodes">text node</a>
<li><a href="https://drafts.csswg.org/css-display-3/#text-run">text run</a>
<li>
textual data types
<ul>
<li><a href="https://www.w3.org/TR/css-values-3/#textual-data-types">in css-values-3</a>
<li><a href="https://drafts.csswg.org/css-values-3/#css-textual-data-types">in css-values-3, for CSS</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#thistle">thistle</a>
<li><a href="https://drafts.csswg.org/css-color-3/#threeddarkshadow">threeddarkshadow</a>
<li><a href="https://drafts.csswg.org/css-color-3/#threedface">threedface</a>
<li><a href="https://drafts.csswg.org/css-color-3/#threedhighlight">threedhighlight</a>
<li><a href="https://drafts.csswg.org/css-color-3/#threedlightshadow">threedlightshadow</a>
<li><a href="https://drafts.csswg.org/css-color-3/#threedshadow">threedshadow</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#time-def">time</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#easing-function">timing function</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#titling-caps">titling-caps</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-tokenize">tokenization</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#css-tokenize">tokenize</a>
<li><a href="https://drafts.csswg.org/css2/#tokenizer">tokenizer</a>
<li><a href="https://drafts.csswg.org/css-color-3/#tomato">tomato</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#physical-top">top</a>
<li><a href="https://drafts.csswg.org/css-text-3/#tracking">tracking</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#track-list">track list</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#track-section">track section</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#track-sizing-algorithm">track sizing algorithm</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-template-rows-track-sizing-function">track sizing function</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#traditional">traditional</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#transfer-function-element">transfer function element</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#transfer-function-element-attributes">transfer function element attributes</a>
<li>
transferred size suggestion
<ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#transferred-size-suggestion">in css-flexbox-1</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#transferred-size-suggestion">in css-grid-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-transforms-1/#transformable-element">transformable element</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#transformation-matrix">transformation matrix</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#transformed-element">transformed element</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#transitionable">transitionable</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-transition">transition origin</a>
<li><a href="https://drafts.csswg.org/css-color-3/#transparent-def">transparent</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-template-areas-trash-token">trash token</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#triangle">triangle</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#trinary">trinary</a>
<li><a href="https://drafts.csswg.org/css-color-3/#turquoise">turquoise</a>
<li>
type selector
<ul>
<li><a href="https://drafts.csswg.org/css2/#type-selector">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#type-selector">in selectors-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#typeset-sideways">typeset sideways</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#typeset-sideways">typesetting sideways</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#typeset-upright">typesetting upright</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#typeset-upright">typeset upright</a>
<li><a href="https://drafts.csswg.org/css-text-3/#typographic-character-unit">typographic character</a>
<li><a href="https://drafts.csswg.org/css-text-3/#typographic-character-unit">typographic character unit</a>
<li><a href="https://drafts.csswg.org/css-text-3/#typographic-letter-unit">typographic letter unit</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#typographic-mode">typographic mode</a>
<li>
ua
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#ua">in css-backgrounds-3</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#ua">in css-speech-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-ua">ua origin</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-ua">ua-origin</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-ua">ua style sheet</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#ultra-condensed">ultra-condensed</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#ultra-expanded">ultra-expanded</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#under">under</a>
<li><a href="https://drafts.csswg.org/css-break-3/#unforced-break">unforced break</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#unicase">unicase</a>
<li><a href="https://drafts.csswg.org/css-text-3/#unicode-general-category">unicode category</a>
<li><a href="https://drafts.csswg.org/css-text-3/#unicode-east-asian-width">unicode east asian width</a>
<li><a href="https://drafts.csswg.org/css-text-3/#unicode-general-category">unicode general category</a>
<li><a href="https://drafts.csswg.org/css-text-3/#unicode-script">unicode script</a>
<li><a href="https://drafts.csswg.org/css-text-3/#unicode-vertical-orientation">unicode vertical orientation</a>
<li>
universal selector
<ul>
<li><a href="https://drafts.csswg.org/css2/#universal-selector①">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#universal-selector0">in selectors-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-text-3/#writing-system-known">unknown</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#unoccupied">unoccupied</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#upper-alpha-legal">upper-alpha-legal</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#uppercase-letter">uppercase letter</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#typeset-upright">upright typesetting</a>
<li><a href="https://drafts.csswg.org/css-values-3/#url">url</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#use-a-negative-sign">use a negative sign</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#used-value">used value</a>
<li><a href="https://drafts.csswg.org/css2/#used-value">used values</a>
<li><a href="https://drafts.csswg.org/css2/#user">user</a>
<li>
user agent
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#user-agent">in css-backgrounds-3</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#user-agent">in css-speech-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-ua">user-agent origin</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-ua">user-agent style sheet</a>
<li><a href="https://drafts.csswg.org/css2/#user-agent">user agent (ua)</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#user-coordinate-system">user coordinate system</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-user">user origin</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-user">user-origin</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#cascade-origin-user">user style sheet</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#use-a-negative-sign">uses a negative sign</a>
<li><a href="https://drafts.csswg.org/css-images-3/#invalid-image">valid image</a>
<li><a href="https://drafts.csswg.org/css2/#valid-style-sheet">validity</a>
<li><a href="https://drafts.csswg.org/css2/#valid-style-sheet">valid style sheet</a>
<li><a href="https://drafts.csswg.org/css-values-3/#css-value-definition-syntax">value definition syntax</a>
<li><a href="https://drafts.csswg.org/css2/#values">values</a>
<li><a href="https://drafts.csswg.org/css-variables-1/#substitute-a-var">var() substitution</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#y-axis">vertical axis</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#vertical-block-flow">vertical block flow</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#vertical-dimension">vertical dimension</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#vertical-offset">vertical offset</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#vertical-only">vertical-only</a>
<li><a href="https://drafts.csswg.org/css-text-3/#unicode-vertical-orientation">vertical orientation</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#vertical-script">vertical script</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#vertical-typographic-mode">vertical typographic mode</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#vertical-writing-mode">vertical writing mode</a>
<li><a href="https://drafts.csswg.org/css2/#viewport①">viewport</a>
<li><a href="https://drafts.csswg.org/css-values-3/#viewport-percentage-lengths">viewport-percentage lengths</a>
<li><a href="https://drafts.csswg.org/css-color-3/#violet">violet</a>
<li><a href="https://drafts.csswg.org/css-values-3/#visual-angle-unit">visual angle unit</a>
<li><a href="https://www.w3.org/TR/css-speech-1/#box-model-def">visual box model</a>
<li><a href="https://drafts.csswg.org/css2/#visual-formatting-model">visual formatting model</a>
<li><a href="https://drafts.csswg.org/css2/#visual-media-group">'visual' media group</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#weight">weight</a>
<li><a href="https://drafts.csswg.org/css-color-3/#wheat">wheat</a>
<li>
white
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#white">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#white0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#whitesmoke">whitesmoke</a>
<li><a href="https://drafts.csswg.org/css-text-3/#white-space">white space</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#whitespace">whitespace</a>
<li><a href="https://drafts.csswg.org/css-text-3/#white-space">white space characters</a>
<li>
width
<ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#width">in css-fonts-3</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#width">in css-writing-modes-4</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#window">window</a>
<li><a href="https://drafts.csswg.org/css-color-3/#windowframe">windowframe</a>
<li><a href="https://drafts.csswg.org/css-color-3/#windowtext">windowtext</a>
<li><a href="https://drafts.csswg.org/css-text-3/#word-separator">word separator</a>
<li><a href="https://drafts.csswg.org/css-text-3/#word-separator">word-separator character</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-three-code-points-would-start-an-ident-sequence">would start an ident sequence</a>
<li><a href="https://drafts.csswg.org/css-syntax-3/#check-if-three-code-points-would-start-a-number">would start a number</a>
<li>
wrap
<ul>
<li><a href="https://drafts.csswg.org/css-shapes-1/#wrap">in css-shapes-1</a>
<li><a href="https://drafts.csswg.org/css-text-3/#wrapping">in css-text-3</a>
</ul>
<li>
wrapping
<ul>
<li><a href="https://drafts.csswg.org/css-shapes-1/#wrap">in css-shapes-1</a>
<li><a href="https://drafts.csswg.org/css-text-3/#wrapping">in css-text-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#writing-mode">writing mode</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#x-axis">x-axis</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#y-axis">y-axis</a>
<li>
yellow
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#yellow">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#yellow0">in css-color-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-color-3/#yellowgreen">yellowgreen</a>
</ul>
</div>
<h3 class="heading settled" data-level="5.2" id="selectors"><span class="secno">5.2. </span><span class="content">Selector Index</span><a class="self-link" href="#selectors"></a></h3>
<div data-link-spec="
css2,
css-syntax-3,
css-style-attr-1,
mediaqueries-3,
mediaqueries-4,
css-conditional-3,
css-namespaces-3,
selectors-3,
css-cascade-4,
css-values-3,
css-color-3,
css-backgrounds-3,
css-images-3,
css-fonts-3,
css-multicol-1,
css-ui-3,
compositing-1,
css-writing-modes-3,
css-writing-modes-4,
css-transitions-1,
css-animations-1,
css-easing-1,
css-flexbox-1,
css-transforms-1,
css-variables-1,
css-text-3,
css-counter-styles-3,
css-masking-1,
css-shapes-1,
css-text-decor-3,
css-will-change-1,
css-speech-1,
css-align-3,
css-grid-1,
filter-effects-1,
css-break-3,
css-contain-1,
css-scroll-snap-1,
css-display-3,
css-font-loading-3" data-link-status="TR">
<ul class="index">
<li><a href="https://drafts.csswg.org/selectors-3/#x">*</a>
<li>
:active
<ul>
<li><a href="https://drafts.csswg.org/css2/#selectordef-active">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-active">in selectors-3</a>
</ul>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-after">::after</a>
<li><a href="https://drafts.csswg.org/css2/#selectordef-after">:after</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-before">::before</a>
<li><a href="https://drafts.csswg.org/css2/#selectordef-before">:before</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-checked">:checked</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-disabled">:disabled</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-empty">:empty</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-enabled">:enabled</a>
<li><a href="https://drafts.csswg.org/css2/#selectordef-first">:first</a>
<li>
:first-child
<ul>
<li><a href="https://drafts.csswg.org/css2/#selectordef-first-child">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-first-child">in selectors-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#selectordef-first-child">first-child</a>
<li><a href="https://drafts.csswg.org/selectors-3/#first-letter0">::first-letter</a>
<li><a href="https://drafts.csswg.org/css2/#selectordef-first-letter">:first-letter</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-first-line">::first-line</a>
<li><a href="https://drafts.csswg.org/css2/#selectordef-first-line">:first-line</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-first-of-type">:first-of-type</a>
<li>
:focus
<ul>
<li><a href="https://drafts.csswg.org/css2/#selectordef-focus">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-focus">in selectors-3</a>
</ul>
<li>
:hover
<ul>
<li><a href="https://drafts.csswg.org/css2/#selectordef-hover">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-hover">in selectors-3</a>
</ul>
<li>
:lang
<ul>
<li><a href="https://drafts.csswg.org/css2/#selectordef-lang">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-lang">in selectors-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#selectordef-lang">:lang()</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-last-child">:last-child</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-last-of-type">:last-of-type</a>
<li><a href="https://drafts.csswg.org/css2/#selectordef-left">:left</a>
<li>
:link
<ul>
<li><a href="https://drafts.csswg.org/css2/#selectordef-link">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-link">in selectors-3</a>
</ul>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-not">:not()</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-nth-child">:nth-child()</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-nth-last-child">:nth-last-child()</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-nth-last-of-type">:nth-last-of-type()</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-nth-of-type">:nth-of-type()</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-only-child">:only-child</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-only-of-type">:only-of-type</a>
<li><a href="https://drafts.csswg.org/css2/#selectordef-right">:right</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-root">:root</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-target">:target</a>
<li>
:visited
<ul>
<li><a href="https://drafts.csswg.org/css2/#selectordef-visited">in css2</a>
<li><a href="https://drafts.csswg.org/selectors-3/#sel-visited">in selectors-3</a>
</ul>
</ul>
</div>
<h3 class="heading settled" data-level="5.3" id="at-rules"><span class="secno">5.3. </span><span class="content"> At-Rule Index</span><a class="self-link" href="#at-rules"></a></h3>
<div data-link-spec="
css2,
css-syntax-3,
css-style-attr-1,
mediaqueries-3,
mediaqueries-4,
css-conditional-3,
css-namespaces-3,
selectors-3,
css-cascade-4,
css-values-3,
css-color-3,
css-backgrounds-3,
css-images-3,
css-fonts-3,
css-multicol-1,
css-ui-3,
compositing-1,
css-writing-modes-3,
css-writing-modes-4,
css-transitions-1,
css-animations-1,
css-easing-1,
css-flexbox-1,
css-transforms-1,
css-variables-1,
css-text-3,
css-counter-styles-3,
css-masking-1,
css-shapes-1,
css-text-decor-3,
css-will-change-1,
css-speech-1,
css-align-3,
css-grid-1,
filter-effects-1,
css-break-3,
css-contain-1,
css-scroll-snap-1,
css-display-3,
css-font-loading-3" data-link-status="TR">
<ul class="index">
<li><a href="https://drafts.csswg.org/css-syntax-3/#at-ruledef-charset">@charset</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#at-ruledef-counter-style">@counter-style</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#at-font-face-rule">@font-face</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#at-ruledef-import">@import</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#at-ruledef-keyframes">@keyframes</a>
<li><a href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media">@media</a>
<li><a href="https://drafts.csswg.org/css2/#at-ruledef-media①">media</a>
<li><a href="https://drafts.csswg.org/css2/#at-ruledef-page">@page</a>
<li><a href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-supports">@supports</a>
</ul>
</div>
<h3 class="heading settled" data-level="5.4" id="properties"><span class="secno">5.4. </span><span class="content">Property Index</span><a class="self-link" href="#properties"></a></h3>
<div data-link-spec="
css2,
css-syntax-3,
css-style-attr-1,
mediaqueries-3,
mediaqueries-4,
css-conditional-3,
css-namespaces-3,
selectors-3,
css-cascade-4,
css-values-3,
css-color-3,
css-backgrounds-3,
css-images-3,
css-fonts-3,
css-multicol-1,
css-ui-3,
compositing-1,
css-writing-modes-3,
css-writing-modes-4,
css-transitions-1,
css-animations-1,
css-easing-1,
css-flexbox-1,
css-transforms-1,
css-variables-1,
css-text-3,
css-counter-styles-3,
css-masking-1,
css-shapes-1,
css-text-decor-3,
css-will-change-1,
css-speech-1,
css-align-3,
css-grid-1,
filter-effects-1,
css-break-3,
css-contain-1,
css-scroll-snap-1,
css-display-3,
css-font-loading-3" data-link-status="TR">
<ul class="index">
<li><a href="https://drafts.csswg.org/css-variables-1/#propdef-">--*</a>
<li>
align-content
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-align-content">in css-align-3</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-align-content">in css-flexbox-1</a>
</ul>
<li>
align-items
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-align-items">in css-align-3</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-align-items">in css-flexbox-1</a>
</ul>
<li>
align-self
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-align-self">in css-align-3</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-align-self">in css-flexbox-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-cascade-4/#propdef-all">all</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#propdef-animation">animation</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-delay">animation-delay</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-direction">animation-direction</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-duration">animation-duration</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-fill-mode">animation-fill-mode</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-iteration-count">animation-iteration-count</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-name">animation-name</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state">animation-play-state</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#propdef-animation-timing-function">animation-timing-function</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-azimuth">azimuth</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background">background</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-attachment">background-attachment</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#propdef-background-blend-mode">background-blend-mode</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-clip">background-clip</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-color">background-color</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-image">background-image</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-origin">background-origin</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-position">background-position</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-repeat">background-repeat</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-size">background-size</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border">border</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-bottom">border-bottom</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-bottom-color">border-bottom-color</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-bottom-left-radius">border-bottom-left-radius</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-bottom-right-radius">border-bottom-right-radius</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-bottom-style">border-bottom-style</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-bottom-width">border-bottom-width</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-border-collapse">border-collapse</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-color">border-color</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-image">border-image</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-image-outset">border-image-outset</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-image-repeat">border-image-repeat</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-image-slice">border-image-slice</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-image-source">border-image-source</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-image-width">border-image-width</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-left">border-left</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-left-color">border-left-color</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-left-style">border-left-style</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-left-width">border-left-width</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-radius">border-radius</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-right">border-right</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-right-color">border-right-color</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-right-style">border-right-style</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-right-width">border-right-width</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-border-spacing">border-spacing</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-style">border-style</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-top">border-top</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-top-color">border-top-color</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-top-left-radius">border-top-left-radius</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-top-right-radius">border-top-right-radius</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-top-style">border-top-style</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-top-width">border-top-width</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-width">border-width</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-bottom">bottom</a>
<li><a href="https://drafts.csswg.org/css-break-3/#propdef-box-decoration-break">box-decoration-break</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#propdef-box-shadow">box-shadow</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-box-sizing">box-sizing</a>
<li><a href="https://drafts.csswg.org/css-break-3/#propdef-break-after">break-after</a>
<li><a href="https://drafts.csswg.org/css-break-3/#propdef-break-before">break-before</a>
<li><a href="https://drafts.csswg.org/css-break-3/#propdef-break-inside">break-inside</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-caption-side">caption-side</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-caret-color">caret-color</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-clear">clear</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-clip">clip</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-clip-path">clip-path</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-clip-rule">clip-rule</a>
<li>
color
<ul>
<li><a href="https://drafts.csswg.org/css-color-3/#color0">in css-color-3</a>
<li><a href="https://drafts.csswg.org/css-color-3/#color01">in css-color-3</a>
</ul>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#propdef-color-interpolation-filters">color-interpolation-filters</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#propdef-column-count">column-count</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#propdef-column-fill">column-fill</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-column-gap">column-gap</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#propdef-column-rule">column-rule</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-color">column-rule-color</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-style">column-rule-style</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width">column-rule-width</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#propdef-columns">columns</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#propdef-column-span">column-span</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#propdef-column-width">column-width</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#propdef-contain">contain</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-content">content</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-counter-increment">counter-increment</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-counter-reset">counter-reset</a>
<li>
cue
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-cue">in css-speech-1</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-cue">in css2</a>
</ul>
<li>
cue-after
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-cue-after">in css-speech-1</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-cue-after">in css2</a>
</ul>
<li>
cue-before
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-cue-before">in css-speech-1</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-cue-before">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-cursor">cursor</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#propdef-direction">direction</a>
<li><a href="https://drafts.csswg.org/css-display-3/#propdef-display">display</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-elevation">elevation</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-empty-cells">empty-cells</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#propdef-filter">filter</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-flex">flex</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-flex-basis">flex-basis</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-flex-direction">flex-direction</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-flex-flow">flex-flow</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-flex-grow">flex-grow</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-flex-shrink">flex-shrink</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-flex-wrap">flex-wrap</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-float">float</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#propdef-flood-color">flood-color</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#propdef-flood-opacity">flood-opacity</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font">font</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-family">font-family</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-feature-settings">font-feature-settings</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-kerning">font-kerning</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-size">font-size</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-size-adjust">font-size-adjust</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-stretch">font-stretch</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-style">font-style</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-synthesis">font-synthesis</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-variant">font-variant</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-variant-caps">font-variant-caps</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-variant-east-asian">font-variant-east-asian</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-variant-ligatures">font-variant-ligatures</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-variant-numeric">font-variant-numeric</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-variant-position">font-variant-position</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-weight">font-weight</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-gap">gap</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#propdef-mix">globalcompositeoperation</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#propdef-glyph-orientation-vertical">glyph-orientation-vertical</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid">grid</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-area">grid-area</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns">grid-auto-columns</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-flow">grid-auto-flow</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows">grid-auto-rows</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-column">grid-column</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-column-end">grid-column-end</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-grid-column-gap">grid-column-gap</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-column-start">grid-column-start</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-grid-gap">grid-gap</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-row">grid-row</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-row-end">grid-row-end</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-grid-row-gap">grid-row-gap</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-row-start">grid-row-start</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template">grid-template</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-areas">grid-template-areas</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-columns">grid-template-columns</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-rows">grid-template-rows</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-hanging-punctuation">hanging-punctuation</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-height">height</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-hyphens">hyphens</a>
<li><a href="https://drafts.csswg.org/css-images-3/#propdef-image-orientation">image-orientation</a>
<li><a href="https://drafts.csswg.org/css-images-3/#propdef-image-rendering">image-rendering</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#propdef-isolation">isolation</a>
<li>
justify-content
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-justify-content">in css-align-3</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#propdef-justify-content">in css-flexbox-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-justify-items">justify-items</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-justify-self">justify-self</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-left">left</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-letter-spacing">letter-spacing</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#propdef-lighting-color">lighting-color</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-line-break">line-break</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-line-height">line-height</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-list-style">list-style</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-list-style-image">list-style-image</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-list-style-position">list-style-position</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-list-style-type">list-style-type</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-margin">margin</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-margin-bottom">margin-bottom</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-margin-left">margin-left</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-margin-right">margin-right</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-margin-top">margin-top</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask">mask</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-border">mask-border</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-border-mode">mask-border-mode</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-border-outset">mask-border-outset</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-border-repeat">mask-border-repeat</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-border-slice">mask-border-slice</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-border-source">mask-border-source</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-border-width">mask-border-width</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-clip">mask-clip</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-composite">mask-composite</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-image">mask-image</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-mode">mask-mode</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-origin">mask-origin</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-position">mask-position</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-repeat">mask-repeat</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-size">mask-size</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#propdef-mask-type">mask-type</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-max-height">max-height</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-max-width">max-width</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-min-height">min-height</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-min-width">min-width</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#propdef-mix-blend-mode">mix-blend-mode</a>
<li><a href="https://drafts.csswg.org/css-images-3/#propdef-object-fit">object-fit</a>
<li><a href="https://drafts.csswg.org/css-images-3/#propdef-object-position">object-position</a>
<li><a href="https://drafts.csswg.org/css-color-3/#opacity">opacity</a>
<li>
order
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#propdef-order">in css-display-3</a>
<li><a href="https://www.w3.org/TR/css-flexbox-1/#propdef-order">in css-flexbox-1</a>
</ul>
<li><a href="https://drafts.csswg.org/css-break-3/#propdef-orphans">orphans</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-outline">outline</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-outline-color">outline-color</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-outline-offset">outline-offset</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-outline-style">outline-style</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-outline-width">outline-width</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-overflow">overflow</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-overflow-wrap">overflow-wrap</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-padding">padding</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-padding-bottom">padding-bottom</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-padding-left">padding-left</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-padding-right">padding-right</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-padding-top">padding-top</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-page-break-after">page-break-after</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-page-break-before">page-break-before</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-page-break-inside">page-break-inside</a>
<li>
pause
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-pause">in css-speech-1</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-pause">in css2</a>
</ul>
<li>
pause-after
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-pause-after">in css-speech-1</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-pause-after">in css2</a>
</ul>
<li>
pause-before
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-pause-before">in css-speech-1</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-pause-before">in css2</a>
</ul>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-pitch">pitch</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-pitch-range">pitch-range</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-place-content">place-content</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-place-items">place-items</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-place-self">place-self</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-play-during">play-during</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-position">position</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-quotes">quotes</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-resize">resize</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-rest">rest</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-rest-after">rest-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-rest-before">rest-before</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-richness">richness</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-right">right</a>
<li><a href="https://drafts.csswg.org/css-align-3/#propdef-row-gap">row-gap</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin">scroll-margin</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-block">scroll-margin-block</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-block-end">scroll-margin-block-end</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-block-start">scroll-margin-block-start</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-bottom">scroll-margin-bottom</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-inline">scroll-margin-inline</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-inline-end">scroll-margin-inline-end</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-inline-start">scroll-margin-inline-start</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-left">scroll-margin-left</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-right">scroll-margin-right</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-top">scroll-margin-top</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding">scroll-padding</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-block">scroll-padding-block</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-block-end">scroll-padding-block-end</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-block-start">scroll-padding-block-start</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-bottom">scroll-padding-bottom</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-inline">scroll-padding-inline</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-inline-end">scroll-padding-inline-end</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-inline-start">scroll-padding-inline-start</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-left">scroll-padding-left</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-right">scroll-padding-right</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding-top">scroll-padding-top</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-snap-align">scroll-snap-align</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-snap-stop">scroll-snap-stop</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-snap-type">scroll-snap-type</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#propdef-shape-image-threshold">shape-image-threshold</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#propdef-shape-margin">shape-margin</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#propdef-shape-outside">shape-outside</a>
<li>
speak
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-speak">in css-speech-1</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-speak">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-speak-as">speak-as</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-speak-header">speak-header</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-speak-numeral">speak-numeral</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-speak-punctuation">speak-punctuation</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-speech-rate">speech-rate</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-stress">stress</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-table-layout">table-layout</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-tab-size">tab-size</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-text-align">text-align</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-text-align-all">text-align-all</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-text-align-last">text-align-last</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#propdef-text-combine-upright">text-combine-upright</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-decoration">text-decoration</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-decoration-color">text-decoration-color</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-decoration-line">text-decoration-line</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-decoration-style">text-decoration-style</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-emphasis">text-emphasis</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-emphasis-color">text-emphasis-color</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-emphasis-position">text-emphasis-position</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-emphasis-style">text-emphasis-style</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-text-indent">text-indent</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-text-justify">text-justify</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#propdef-text-orientation">text-orientation</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#propdef-text-overflow">text-overflow</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-shadow">text-shadow</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-text-transform">text-transform</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-underline-position">text-underline-position</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-top">top</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#propdef-transform">transform</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#propdef-transform-box">transform-box</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#propdef-transform-origin">transform-origin</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#propdef-transition">transition</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#propdef-transition-delay">transition-delay</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#propdef-transition-duration">transition-duration</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#propdef-transition-property">transition-property</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#propdef-transition-timing-function">transition-timing-function</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#propdef-unicode-bidi">unicode-bidi</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-vertical-align">vertical-align</a>
<li><a href="https://drafts.csswg.org/css-display-3/#propdef-visibility">visibility</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-voice-balance">voice-balance</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-voice-duration">voice-duration</a>
<li>
voice-family
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-voice-family">in css-speech-1</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-voice-family">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-voice-pitch">voice-pitch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-voice-range">voice-range</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-voice-rate">voice-rate</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-voice-stress">voice-stress</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#propdef-voice-volume">voice-volume</a>
<li><a href="https://www.w3.org/TR/CSS2/aural.html#propdef-volume">volume</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-white-space">white-space</a>
<li><a href="https://drafts.csswg.org/css-break-3/#propdef-widows">widows</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-width">width</a>
<li><a href="https://drafts.csswg.org/css-will-change-1/#propdef-will-change">will-change</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-word-break">word-break</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-word-spacing">word-spacing</a>
<li><a href="https://drafts.csswg.org/css-text-3/#propdef-word-wrap">word-wrap</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode">writing-mode</a>
<li><a href="https://drafts.csswg.org/css2/#propdef-z-index">z-index</a>
</ul>
</div>
<h3 class="heading settled" data-level="5.5" id="values"><span class="secno">5.5. </span><span class="content">Values Index</span><a class="self-link" href="#values"></a></h3>
<div data-link-spec="
css2,
css-syntax-3,
css-style-attr-1,
mediaqueries-3,
mediaqueries-4,
css-conditional-3,
css-namespaces-3,
selectors-3,
css-cascade-4,
css-values-3,
css-color-3,
css-backgrounds-3,
css-images-3,
css-fonts-3,
css-multicol-1,
css-ui-3,
compositing-1,
css-writing-modes-3,
css-writing-modes-4,
css-transitions-1,
css-animations-1,
css-easing-1,
css-flexbox-1,
css-transforms-1,
css-variables-1,
css-text-3,
css-counter-styles-3,
css-masking-1,
css-shapes-1,
css-text-decor-3,
css-will-change-1,
css-speech-1,
css-align-3,
css-grid-1,
filter-effects-1,
css-break-3,
css-contain-1,
css-scroll-snap-1,
css-display-3,
css-font-loading-3" data-link-status="TR">
<ul class="index">
<li><a href="https://www.w3.org/TR/css-images-3/#valdef-image-orientation-angle"></a>
<li>
absolute
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-pitch-absolute">in css-speech-1, for voice-pitch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-range-absolute">in css-speech-1, for voice-range</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-position-absolute">in css2, for position</a>
</ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-composite-add">add</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-system-additive">additive</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-alias">alias</a>
<li>
all
<ul>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-span-all">in css-multicol-1, for column-span</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#valdef-transition-property-all">in css-transitions-1, for transition-property</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-text-combine-upright-all">in css-writing-modes-4, for text-combine-upright</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-all">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-all">in mediaqueries-4, for @media</a>
</ul>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-hanging-punctuation-allow-end">allow-end</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-all-scroll">all-scroll</a>
<li>
alpha
<ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-border-mode-alpha">in css-masking-1, for mask-border-mode</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-mode-alpha">in css-masking-1, for mask-mode</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-type-alpha">in css-masking-1, for mask-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-system-alphabetic">alphabetic</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-direction-alternate">alternate</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-direction-alternate-reverse">alternate-reverse</a>
<li>
always
<ul>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-stop-always">in css-scroll-snap-1, for scroll-snap-stop</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-speak-always">in css-speech-1, for speak</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-page-break-always">in css2, for page-break-before, page-break-after, page-break-inside</a>
</ul>
<li>
<angle>
<ul>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-image-orientation-angle">in css-images-3, for image-orientation</a>
<li><a href="https://www.w3.org/TR/css-images-3/#valdef-image-orientation-angle">in css-images-3, for image-orientation</a>
</ul>
<li>
anywhere
<ul>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere">in css-text-3, for line-break</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-anywhere">in css-text-3, for overflow-wrap</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-aqua">aqua</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-arabic-indic">arabic-indic</a>
<li>
armenian
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#armenian">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-armenian">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-armenian">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-content-attr-x">attr(x)</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-aural">aural</a>
<li>
auto
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-align-self-auto">in css-align-3, for align-self</a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-auto">in css-align-3, for justify-self</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-size-auto">in css-backgrounds-3, for background-size</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-border-image-width-auto">in css-backgrounds-3, for border-image-width</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-auto">in css-break-3, for break-before, break-after</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-inside-auto">in css-break-3, for break-inside, page-break-inside</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-range-auto">in css-counter-styles-3, for @counter-style/range</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-speak-as-auto">in css-counter-styles-3, for @counter-style/speak-as</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-auto">in css-flexbox-1, for align-items, align-self</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-basis-auto">in css-flexbox-1, for flex-basis</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-placement-auto">in css-grid-1, for <grid-line></a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-columns-auto">in css-grid-1, for grid-template-columns, grid-template-rows</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-image-rendering-auto">in css-images-3, for image-rendering</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-count-auto">in css-multicol-1, for column-count</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-fill-auto">in css-multicol-1, for column-fill</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-width-auto">in css-multicol-1, for column-width</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-padding-auto">in css-scroll-snap-1, for scroll-padding, scroll-padding-inline, scroll-padding-inline-start, scroll-padding-inline-end, scroll-padding-block, scroll-padding-block-start, scroll-padding-block-end</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-speak-auto">in css-speech-1, for speak</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-duration-auto">in css-speech-1, for voice-duration</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-hyphens-auto">in css-text-3, for hyphens</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-line-break-auto">in css-text-3, for line-break</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-align-last-auto">in css-text-3, for text-align-last</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-justify-auto">in css-text-3, for text-justify</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#underline-auto">in css-text-decor-3, for text-underline-position</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-caret-color-auto">in css-ui-3, for caret-color</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-auto">in css-ui-3, for cursor</a>
<li><a href="https://drafts.csswg.org/css-will-change-1/#valdef-will-change-auto">in css-will-change-1, for will-change</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-top-auto①">in css2, for <top>, <right>, <bottom>, <left></a>
<li><a href="https://drafts.csswg.org/css2/#valdef-clip-auto">in css2, for clip</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-height-auto">in css2, for height</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-overflow-auto">in css2, for overflow</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-page-break-auto">in css2, for page-break-before, page-break-after, page-break-inside</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-table-layout-auto">in css2, for table-layout</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-top-auto">in css2, for top, right, bottom, left</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-width-auto">in css2, for width</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-z-index-auto">in css2, for z-index</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#valdef-color-interpolation-filters-auto">in filter-effects-1, for color-interpolation-filters</a>
</ul>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fill">auto-fill</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit">auto-fit</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-s-auto-column">[ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'></a>
<li>
avoid
<ul>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-avoid">in css-break-3, for break-before, break-after</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-inside-avoid">in css-break-3, for break-inside, page-break-inside</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-page-break-avoid">in css2, for page-break-before, page-break-after, page-break-inside</a>
</ul>
<li>
avoid-column
<ul>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-avoid-column">in css-break-3, for break-before, break-after</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-inside-avoid-column">in css-break-3, for break-inside, page-break-inside</a>
</ul>
<li>
avoid-page
<ul>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-avoid-page">in css-break-3, for break-before, break-after</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-inside-avoid-page">in css-break-3, for break-inside, page-break-inside</a>
</ul>
<li>
avoid-region
<ul>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-avoid-region">in css-break-3, for break-before, break-after</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-inside-avoid-region">in css-break-3, for break-inside, page-break-inside</a>
</ul>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-fill-mode-backwards">backwards</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-fill-balance">balance</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-fill-balance-all">balance-all</a>
<li>
baseline
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-baseline">in css-align-3, for justify-self, justify-items, align-content, align-self, align-items, <baseline-position></a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-baseline">in css-flexbox-1, for align-items, align-self</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-baseline">in css2, for vertical-align</a>
</ul>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-outside-basic-shape"><basic-shape></a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-bengali">bengali</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-unicode-bidi-bidi-override">bidi-override</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-black">black</a>
<li>
blink
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-decoration-line-blink">in css-text-decor-3, for text-decoration-line</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-text-decoration-blink">in css2, for text-decoration</a>
</ul>
<li>
block
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-block">in css-display-3, for display, <display-outside></a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-type-block">in css-scroll-snap-1, for scroll-snap-type</a>
<li><a href="https://www.w3.org/TR/CSS2/visuren.html#value-def-block">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-block">in css2, for display</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-blue">blue</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-weight-bold">bold</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-weight-bolder">bolder</a>
<li>
border-box
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-clip-border-box">in css-backgrounds-3, for background-clip</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-origin-border-box">in css-backgrounds-3, for background-origin</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-clip-border-box">in css-masking-1, for mask-clip</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-origin-border-box">in css-masking-1, for mask-origin</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-box-border-box">in css-shapes-1, for <shape-box>, shape-outside</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-box-border-box">in css-transforms-1, for transform-box</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-box-sizing-border-box">in css-ui-3, for box-sizing</a>
</ul>
<li>
both
<ul>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-fill-mode-both">in css-animations-1, for animation-fill-mode</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-type-both">in css-scroll-snap-1, for scroll-snap-type</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-clear-both">in css2, for clear</a>
</ul>
<li>
bottom
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-bottom">in css-backgrounds-3, for background-position</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-origin-bottom">in css-transforms-1, for transform-origin</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-caption-side-bottom">in css2, for caption-side</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-bottom">in css2, for vertical-align</a>
</ul>
<li>
braille
<ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-braille">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-braille">in mediaqueries-4, for @media</a>
</ul>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all">break-all</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">break-spaces</a>
<li>
break-word
<ul>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word">in css-text-3, for overflow-wrap</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-word">in css-text-3, for word-break</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-speak-as-bullets">bullets</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-cambodian">cambodian</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-transform-capitalize">capitalize</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-caption">caption</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-cell">cell</a>
<li>
center
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-self-position-center">in css-align-3, for <self-position>, <content-position>, justify-self, align-self, justify-content, align-content</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-center">in css-backgrounds-3, for background-position</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-center">in css-flexbox-1, for align-content</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-center">in css-flexbox-1, for align-items, align-self</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-center">in css-flexbox-1, for justify-content</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-align-center">in css-scroll-snap-1, for scroll-snap-align</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-balance-center">in css-speech-1, for voice-balance</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-align-center">in css-text-3, for text-align</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-origin-center">in css-transforms-1, for transform-origin</a>
</ul>
<li><a href="https://drafts.csswg.org/css-values-3/#ch">ch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-family-child">child</a>
<li>
circle
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#circle">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-ending-shape-circle">in css-images-3, for <ending-shape></a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-style-circle">in css-text-decor-3, for text-emphasis-style</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-style-circle">in css-text-decor-3, for text-text-emphasis-style</a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-circle">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-circle">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#cjk-decimal">cjk-decimal</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-cjk-earthly-branch">cjk-earthly-branch</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-cjk-heavenly-stem">cjk-heavenly-stem</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#cjk-ideographic">cjk-ideographic</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#overflow-clip">clip</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-box-decoration-break-clone">clone</a>
<li>
close-quote
<ul>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-close-quote">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-close-quote">in css2, for content</a>
</ul>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-size-closest-corner">closest-corner</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-size-closest-side">closest-side</a>
<li><a href="https://drafts.csswg.org/css-values-3/#cm">cm</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-pointer-coarse">coarse</a>
<li>
collapse
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-visibility-collapse">in css-display-3, for visibility</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-border-collapse-collapse">in css2, for border-collapse</a>
</ul>
<li>
<color>
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#shadow-color">in css-backgrounds-3, for box-shadow</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-rule-color-color">in css-multicol-1, for column-rule-color</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-border-color-color">in css2, for border-color, border-top-color, border-right-color, border-bottom-color, border-left-color</a>
</ul>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-color">color</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-color-burn">color-burn</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-color-dodge">color-dodge</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-col-resize">col-resize</a>
<li>
column
<ul>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-column">in css-break-3, for break-before, break-after</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-direction-column">in css-flexbox-1, for flex-direction</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-auto-flow-column">in css-grid-1, for grid-auto-flow</a>
</ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-direction-column-reverse">column-reverse</a>
<li>
contain
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-size-contain">in css-backgrounds-3, for background-size</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-object-fit-contain">in css-images-3, for object-fit</a>
</ul>
<li>
content
<ul>
<li><a href="https://drafts.csswg.org/css-contain-1/#valdef-contain-content">in css-contain-1, for contain</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-basis-content">in css-flexbox-1, for flex-basis</a>
</ul>
<li>
content-box
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-clip-content-box">in css-backgrounds-3, for background-clip</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-origin-content-box">in css-backgrounds-3, for background-origin</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-clip-content-box">in css-masking-1, for mask-clip</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-origin-content-box">in css-masking-1, for mask-origin</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-box-content-box">in css-shapes-1, for <shape-box>, shape-outside</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-box-content-box">in css-transforms-1, for transform-box</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-box-sizing-content-box">in css-ui-3, for box-sizing</a>
</ul>
<li>
contents
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">in css-display-3, for display, <display-box></a>
<li><a href="https://drafts.csswg.org/css-will-change-1/#valdef-will-change-contents">in css-will-change-1, for will-change</a>
</ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-context-menu">context-menu</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-copy">copy</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-content-counter"><counter></a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-speak-as-counter-style-name"><counter-style-name></a>
<li>
cover
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-size-cover">in css-backgrounds-3, for background-size</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-object-fit-cover">in css-images-3, for object-fit</a>
</ul>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-image-rendering-crisp-edges">crisp-edges</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-crosshair">crosshair</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-generic-family-cursive">cursive</a>
<li>
<custom-ident>
<ul>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-placement-slot">in css-grid-1, for <grid-line></a>
<li><a href="https://drafts.csswg.org/css-will-change-1/#valdef-will-change-custom-ident">in css-will-change-1, for will-change</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-system-cyclic">cyclic</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-darken">darken</a>
<li>
dashed
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-dashed">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-dashed">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-dashed">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
</ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-volume-decibel"><decibel></a>
<li>
decimal
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#decimal">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-decimal">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-decimal">in css2, for list-style-type</a>
</ul>
<li>
decimal-leading-zero
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#decimal-leading-zero">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-decimal-leading-zero">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-decimal-leading-zero">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-default">default</a>
<li><a href="https://drafts.csswg.org/css-values-3/#deg">deg</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-auto-flow-dense">dense</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-devanagari">devanagari</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-difference">difference</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-speak-as-digits">digits</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-text-combine-upright-digits-integer">digits <integer>?</a>
<li>
disc
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#disc">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-disc">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-disc">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#disclosure-closed">disclosure-closed</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#disclosure-open">disclosure-open</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-justify-distribute">distribute</a>
<li>
dot
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-style-dot">in css-text-decor-3, for text-emphasis-style</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-style-dot">in css-text-decor-3, for text-text-emphasis-style</a>
</ul>
<li>
dotted
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-dotted">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-dotted">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-dotted">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
</ul>
<li>
double
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-double">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-double">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-double">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
</ul>
<li>
double-circle
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-style-double-circle">in css-text-decor-3, for text-emphasis-style</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-style-double-circle">in css-text-decor-3, for text-text-emphasis-style</a>
</ul>
<li><a href="https://drafts.csswg.org/css-values-3/#dpcm">dpcm</a>
<li><a href="https://drafts.csswg.org/css-values-3/#dpi">dpi</a>
<li><a href="https://drafts.csswg.org/css-values-3/#dppx">dppx</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-indent-each-line">each-line</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-cubic-bezier-easing-function-ease">ease</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-cubic-bezier-easing-function-ease-in">ease-in</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-cubic-bezier-easing-function-ease-in-out">ease-in-out</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-cubic-bezier-easing-function-ease-out">ease-out</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-ending-shape-ellipse">ellipse</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#overflow-ellipsis">ellipsis</a>
<li><a href="https://drafts.csswg.org/css-values-3/#em">em</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-unicode-bidi-embed">embed</a>
<li>
embossed
<ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-embossed">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-embossed">in mediaqueries-4, for @media</a>
</ul>
<li>
end
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-self-position-end">in css-align-3, for <self-position>, <content-position>, justify-self, align-self, justify-content, align-content</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-steps-end">in css-easing-1, for steps()</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-align-end">in css-scroll-snap-1, for scroll-snap-align</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-align-end">in css-text-3, for text-align</a>
</ul>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-radial-gradient-ending-shape"><ending-shape></a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-e-resize">e-resize</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-ethiopic-numeric">ethiopic-numeric</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-clip-rule-evenodd">evenodd</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-ew-resize">ew-resize</a>
<li><a href="https://drafts.csswg.org/css-values-3/#ex">ex</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-composite-exclude">exclude</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-exclusion">exclusion</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-system-extends">extends</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-family-family-name"><family-name></a>
<li><a href="https://drafts.csswg.org/css2/#valdef-generic-family-fantasy">fantasy</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-size-farthest-corner">farthest-corner</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-size-farthest-side">farthest-side</a>
<li>
fast
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-rate-fast">in css-speech-1, for voice-rate</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-update-fast">in mediaqueries-4, for @media/update</a>
</ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-family-female">female</a>
<li>
fill
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#border-image-slice-fill">in css-backgrounds-3, for border-image-slice</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-object-fit-fill">in css-images-3, for object-fit</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-border-slice-fill">in css-masking-1, for mask-border-slice</a>
</ul>
<li>
fill-box
<ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-clip-path-fill-box">in css-masking-1, for clip-path</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-clip-fill-box">in css-masking-1, for mask-clip</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-origin-fill-box">in css-masking-1, for mask-origin</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-box-fill-box">in css-transforms-1, for transform-box</a>
</ul>
<li>
filled
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-style-filled">in css-text-decor-3, for text-emphasis-style</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-style-filled">in css-text-decor-3, for text-text-emphasis-style</a>
</ul>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-pointer-fine">fine</a>
<li>
first
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-first-baseline">in css-align-3, for justify-self, justify-items, align-content, align-self, align-items, <baseline-position></a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-hanging-punctuation-first">in css-text-3, for hanging-punctuation</a>
</ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-first-baseline">first baseline</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-columns-fit-content">fit-content()</a>
<li>
fixed
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-attachment-fixed">in css-backgrounds-3, for background-attachment</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-system-fixed">in css-counter-styles-3, for @counter-style/system</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-position-fixed">in css2, for position</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-table-layout-fixed">in css2, for table-layout</a>
</ul>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-columns-flex"><flex></a>
<li>
flex
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-flex">in css-display-3, for display, <display-inside></a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-display-flex">in css-flexbox-1, for display</a>
</ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-flex-basis"><'flex-basis'></a>
<li>
flex-end
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-self-position-flex-end">in css-align-3, for <self-position>, <content-position>, justify-self, align-self, justify-content, align-content</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-flex-end">in css-flexbox-1, for align-content</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-flex-end">in css-flexbox-1, for align-items, align-self</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-flex-end">in css-flexbox-1, for justify-content</a>
</ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-flex-grow"><'flex-grow'></a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-flex-shrink"><'flex-shrink'></a>
<li>
flex-start
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-self-position-flex-start">in css-align-3, for <self-position>, <content-position>, justify-self, align-self, justify-content, align-content</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-flex-start">in css-flexbox-1, for align-content</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-flex-start">in css-flexbox-1, for align-items, align-self</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-flex-start">in css-flexbox-1, for justify-content</a>
</ul>
<li>
flip
<ul>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-image-orientation-angle">in css-images-3, for image-orientation</a>
<li><a href="https://www.w3.org/TR/css-images-3/#valdef-image-orientation-angle">in css-images-3, for image-orientation</a>
</ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-flow">flow</a>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-flow-root">flow-root</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-feature-settings-normal-value">font-feature-settings</a>
<li>
font-variant
<ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-none-value">in css-fonts-3</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-normal-value">in css-fonts-3</a>
</ul>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-hanging-punctuation-force-end">force-end</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-fill-mode-forwards">forwards</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-flex-fr">fr</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-pitch-frequency"><frequency></a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-image-orientation-from-image">from-image</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-flex-fr">fr unit</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-fuchsia">fuchsia</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-transform-full-size-kana">full-size-kana</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-transform-full-width">full-width</a>
<li>
georgian
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#georgian">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-georgian">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-georgian">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-grab">grab</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-grabbing">grabbing</a>
<li><a href="https://drafts.csswg.org/css-values-3/#grad">grad</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-gray">gray</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-green">green</a>
<li>
grid
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-grid">in css-display-3, for display, <display-inside></a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-display-grid">in css-grid-1, for display</a>
</ul>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-s-auto-row"><'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>?</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-template-rowcol"><'grid-template-rows'> / <'grid-template-columns'></a>
<li>
groove
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-groove">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-groove">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-groove">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-gujarati">gujarati</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-gurmukhi">gurmukhi</a>
<li>
handheld
<ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-handheld">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-handheld">in mediaqueries-4, for @media</a>
</ul>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-indent-hanging">hanging</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-hard-light">hard-light</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#hebrew">hebrew</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-help">help</a>
<li>
hidden
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-hidden">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-visibility-hidden">in css-display-3, for visibility</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-hidden">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-hidden">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-overflow-hidden">in css2, for overflow</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-empty-cells-hide">hide</a>
<li>
high
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-pitch-high">in css-speech-1, for voice-pitch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-range-high">in css-speech-1, for voice-range</a>
</ul>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-image-rendering-high-quality">high-quality</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#hiragana">hiragana</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#hiragana-iroha">hiragana-iroha</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-horizontal-tb">horizontal-tb</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-hover-hover">hover</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-hue">hue</a>
<li><a href="https://drafts.csswg.org/css-values-3/#Hz">hz</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-icon">icon</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-outside-image"><image></a>
<li><a href="https://drafts.csswg.org/css-values-3/#in">in</a>
<li>
infinite
<ul>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-iteration-count-infinite">in css-animations-1, for animation-iteration-count</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-resolution-infinite">in mediaqueries-4, for @media/resolution</a>
</ul>
<li><a href="https://drafts.csswg.org/css-cascade-4/#valdef-all-inherit">inherit</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#valdef-all-initial">initial</a>
<li>
inline
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-inline">in css-display-3, for display, <display-outside></a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-type-inline">in css-scroll-snap-1, for scroll-snap-type</a>
<li><a href="https://www.w3.org/TR/CSS2/visuren.html#value-def-inline">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-inline">in css2, for display</a>
</ul>
<li>
inline-block
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-inline-block">in css-display-3, for display, <display-legacy></a>
<li><a href="https://www.w3.org/TR/CSS2/visuren.html#value-def-inline-block">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-inline-block">in css2, for display</a>
</ul>
<li>
inline-flex
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-inline-flex">in css-display-3, for display, <display-legacy></a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-display-inline-flex">in css-flexbox-1, for display</a>
</ul>
<li>
inline-grid
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-inline-grid">in css-display-3, for display, <display-legacy></a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-display-inline-grid">in css-grid-1, for display</a>
</ul>
<li>
inline-table
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-inline-table">in css-display-3, for display, <display-legacy></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-inline-table">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-inline-table">in css2, for display</a>
</ul>
<li>
inset
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-inset">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#shadow-inset">in css-backgrounds-3, for box-shadow</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-inset">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-inset">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-list-style-position-inside">inside</a>
<li>
<integer>
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-order-integer">in css-display-3, for order</a>
<li><a href="https://www.w3.org/TR/css-flexbox-1/#valdef-order-integer">in css-flexbox-1, for order</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-family-integer">in css-speech-1, for voice-family</a>
</ul>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-count-integer-1"><integer [1,∞]></a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-placement-int"><integer> && <custom-ident>?</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-justify-inter-character">inter-character</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-scan-interlace">interlace</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-composite-intersect">intersect</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-justify-inter-word">inter-word</a>
<li>
invert
<ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-outline-color-invert">in css-ui-3, for outline-color</a>
<li><a href="https://www.w3.org/TR/CSS2/ui.html#value-def-invert">in css2</a>
</ul>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-unicode-bidi-isolate">isolate</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-unicode-bidi-isolate-override">isolate-override</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-style-italic">italic</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#japanese-formal">japanese-formal</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#japanese-informal">japanese-informal</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-steps-jump-both">jump-both</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-steps-jump-end">jump-end</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-steps-jump-none">jump-none</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-steps-jump-start">jump-start</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-align-justify">justify</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-align-justify-all">justify-all</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-kannada">kannada</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#katakana">katakana</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#katakana-iroha">katakana-iroha</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-word-break-keep-all">keep-all</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-name-keyframes-name"><keyframes-name></a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-khmer">khmer</a>
<li><a href="https://drafts.csswg.org/css-values-3/#kHz">khz</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#korean-hangul-formal">korean-hangul-formal</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#korean-hanja-formal">korean-hanja-formal</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#korean-hanja-informal">korean-hanja-informal</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-orientation-landscape">landscape</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-lao">lao</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-size-large">large</a>
<li>
last
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-last-baseline">in css-align-3, for justify-self, justify-items, align-content, align-self, align-items, <baseline-position></a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-hanging-punctuation-last">in css-text-3, for hanging-punctuation</a>
</ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-last-baseline">last baseline</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#valdef-contain-layout">layout</a>
<li>
left
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-content-left">in css-align-3, for justify-content, justify-self, justify-items</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-left">in css-backgrounds-3, for background-position</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-left">in css-break-3, for break-before, break-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-balance-left">in css-speech-1, for voice-balance</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-align-left">in css-text-3, for text-align</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-position-left">in css-text-decor-3, for text-emphasis-position</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-position-left">in css-text-decor-3, for text-text-emphasis-position</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#underline-left">in css-text-decor-3, for text-underline-position</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-origin-left">in css-transforms-1, for transform-origin</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-clear-left">in css2, for clear</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-float-left">in css2, for float</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-page-break-left">in css2, for page-break-before, page-break-after, page-break-inside</a>
</ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-balance-leftwards">leftwards</a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-items-legacy">legacy</a>
<li>
<length>
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-length">in css-backgrounds-3, for background-position</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-size-length">in css-images-3, for <size></a>
<li><a href="https://www.w3.org/TR/css-shapes-1/#valuedef-length">in css-shapes-1, for shape-margin</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-letter-spacing-length">in css-text-3, for letter-spacing</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-indent-length">in css-text-3, for text-indent</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-word-spacing-length">in css-text-3, for word-spacing</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-border-width-length">in css2, for <border-width>, border-top-width, border-right-width, border-bottom-wight, border-left-width, border-width</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-padding-width-length">in css2, for <padding-width></a>
<li><a href="https://drafts.csswg.org/css2/#valdef-top-length">in css2, for top, right, bottom, left</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-length">in css2, for vertical-align</a>
</ul>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-width-length-0"><length [0,∞]></a>
<li>
<length-percentage>
<ul>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-columns-length-percentage">in css-grid-1, for grid-template-columns, grid-template-rows</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-padding-length-percentage">in css-scroll-snap-1, for scroll-padding, scroll-padding-inline, scroll-padding-inline-start, scroll-padding-inline-end, scroll-padding-block, scroll-padding-block-start, scroll-padding-block-end</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-margin-length-percentage">in css-shapes-1, for shape-margin</a>
</ul>
<li>
<length-percentage [0,∞]>
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-size-length-percentage-0">in css-backgrounds-3, for background-size</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-border-image-width-length-percentage-0">in css-backgrounds-3, for border-image-width</a>
</ul>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-size-length-percentage2"><length-percentage>{2}</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-lighten">lighten</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-weight-lighter">lighter</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-lime">lime</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-easing-function-linear">linear</a>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#valdef-color-interpolation-filters-linearrgb">linearrgb</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-template-ascii">[ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?</a>
<li>
line-through
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-decoration-line-line-through">in css-text-decor-3, for text-decoration-line</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-text-decoration-line-through">in css2, for text-decoration</a>
</ul>
<li>
list-item
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-list-item">in css-display-3, for display, <display-list-item></a>
<li><a href="https://www.w3.org/TR/CSS2/visuren.html#value-def-list-item">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-list-item">in css2, for display</a>
</ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-speak-as-literal-punctuation">literal-punctuation</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-attachment-local">local</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-line-break-loose">loose</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-volume-loud">loud</a>
<li>
low
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-pitch-low">in css-speech-1, for voice-pitch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-range-low">in css-speech-1, for voice-range</a>
</ul>
<li>
lower-alpha
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#lower-alpha">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://drafts.csswg.org/css2/#velue-def-lower-alpha">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-lower-armenian">lower-armenian</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-transform-lowercase">lowercase</a>
<li>
lower-greek
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#lower-greek">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-lower-greek">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-lower-greek">in css2, for list-style-type</a>
</ul>
<li>
lower-latin
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#lower-latin">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-lower-latin">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-lower-latin">in css2, for list-style-type</a>
</ul>
<li>
lower-roman
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#lower-roman">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-lower-roman">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-lower-roman">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-direction-ltr">ltr</a>
<li>
luminance
<ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-border-mode-luminance">in css-masking-1, for mask-border-mode</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-mode-luminance">in css-masking-1, for mask-mode</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-type-luminance">in css-masking-1, for mask-type</a>
</ul>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-luminosity">luminosity</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-malayalam">malayalam</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-family-male">male</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-type-mandatory">mandatory</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-hyphens-manual">manual</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-box-margin-box">margin-box</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-maroon">maroon</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-align-match-parent">match-parent</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-mode-match-source">match-source</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-columns-max-content">max-content</a>
<li>
medium
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-width-medium">in css-backgrounds-3, for <line-width>, border-width, border-top-width, border-left-width, border-bottom-width, border-right-width, border</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-pause-before-medium">in css-speech-1, for pause-before, pause-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-rest-before-medium">in css-speech-1, for rest-before, rest-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-pitch-medium">in css-speech-1, for voice-pitch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-range-medium">in css-speech-1, for voice-range</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-rate-medium">in css-speech-1, for voice-rate</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-volume-medium">in css-speech-1, for voice-volume</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-border-width-medium">in css2, for <border-width>, border-top-width, border-right-width, border-bottom-wight, border-left-width, border-width</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-size-medium">in css2, for font-size</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-menu">menu</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-message-box">message-box</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-middle">middle</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-columns-min-content">min-content</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-columns-minmax">minmax()</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-text-orientation-mixed">mixed</a>
<li><a href="https://drafts.csswg.org/css-values-3/#mm">mm</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-stress-moderate">moderate</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-mongolian">mongolian</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-generic-family-monospace">monospace</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-move">move</a>
<li><a href="https://drafts.csswg.org/css-values-3/#ms">ms</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-multiply">multiply</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-myanmar">myanmar</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-navy">navy</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-ne-resize">ne-resize</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-nesw-resize">nesw-resize</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-family-neutral">neutral</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-speak-never">never</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-clip-no-clip">no-clip</a>
<li>
no-close-quote
<ul>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-no-close-quote">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-no-close-quote">in css2, for content</a>
</ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-no-drop">no-drop</a>
<li>
none
<ul>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-fill-mode-none">in css-animations-1, for animation-fill-mode</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-name-none">in css-animations-1, for animation-name</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-none">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-image-none">in css-backgrounds-3, for background-image</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#box-shadow-none">in css-backgrounds-3, for box-shadow</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#valdef-contain-none">in css-contain-1, for contain</a>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-none">in css-display-3, for display, <display-box></a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-none">in css-flexbox-1, for flex</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-none">in css-grid-1, for grid-template</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-areas-none">in css-grid-1, for grid-template-areas</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-rows-none">in css-grid-1, for grid-template-rows, grid-template-columns</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-image-orientation-none">in css-images-3, for image-orientation</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-object-fit-none">in css-images-3, for object-fit</a>
<li><a href="https://drafts.csswg.org/css-multicol-1/#valdef-column-span-none">in css-multicol-1, for column-span</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-align-none">in css-scroll-snap-1, for scroll-snap-align</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-type-none">in css-scroll-snap-1, for scroll-snap-type</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-outside-none">in css-shapes-1, for shape-outside</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-pause-before-none">in css-speech-1, for pause-before, pause-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-rest-before-none">in css-speech-1, for rest-before, rest-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-stress-none">in css-speech-1, for voice-stress</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-hanging-punctuation-none">in css-text-3, for hanging-punctuation</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-hyphens-none">in css-text-3, for hyphens</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-justify-none">in css-text-3, for text-justify</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-transform-none">in css-text-3, for text-transform</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-decoration-line-none">in css-text-decor-3, for text-decoration-line</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-style-none">in css-text-decor-3, for text-emphasis-style</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-style-none">in css-text-decor-3, for text-text-emphasis-style</a>
<li><a href="https://drafts.csswg.org/css-transitions-1/#valdef-transition-property-none">in css-transitions-1, for transition-property</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-none">in css-ui-3, for cursor</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-text-combine-upright-none">in css-writing-modes-4, for text-combine-upright</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-bo-none">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-bo-none">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-clear-none">in css2, for clear</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-content-none">in css2, for content</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-counter-reset-none">in css2, for counter-reset, counter-increment</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-display-none">in css2, for display</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-float-none">in css2, for float</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-list-style-type-none">in css2, for list-style-type</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-max-height-none">in css2, for max-height</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-max-width-none">in css2, for max-width</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-quotes-none">in css2, for quotes</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-text-decoration-none">in css2, for text-decoration</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-hover-none">in mediaqueries-4, for @media/hover</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-overflow-block-none">in mediaqueries-4, for @media/overflow-block</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-overflow-inline-none">in mediaqueries-4, for @media/overflow-inline</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-pointer-none">in mediaqueries-4, for @media/pointer</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-update-none">in mediaqueries-4, for @media/update</a>
</ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-none-value">none!!font-variant</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-clip-rule-nonzero">nonzero</a>
<li>
no-open-quote
<ul>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-no-open-quote">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-no-open-quote">in css2, for content</a>
</ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-speak-as-no-punctuation">no-punctuation</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-repeat-no-repeat">no-repeat</a>
<li>
normal
<ul>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-normal">in compositing-1, for <blend-mode></a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-align-self-normal">in css-align-3, for align-self</a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-content-normal">in css-align-3, for justify-content, align-content</a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-normal">in css-align-3, for justify-self</a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-row-gap-normal">in css-align-3, for row-gap, column-gap, gap</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-direction-normal">in css-animations-1, for animation-direction</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-stop-normal">in css-scroll-snap-1, for scroll-snap-stop</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-speak-as-normal">in css-speech-1, for speak-as</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-rate-normal">in css-speech-1, for voice-rate</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-stress-normal">in css-speech-1, for voice-stress</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-letter-spacing-normal">in css-text-3, for letter-spacing</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-line-break-normal">in css-text-3, for line-break</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-normal">in css-text-3, for overflow-wrap</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-white-space-normal">in css-text-3, for white-space</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-word-break-normal">in css-text-3, for word-break</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-word-spacing-normal">in css-text-3, for word-spacing</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-unicode-bidi-normal">in css-writing-modes-4, for unicode-bidi</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-content-normal">in css2, for content</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-style-normal">in css2, for font-style</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-variant-normal">in css2, for font-variant</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-weight-normal">in css2, for font-weight</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-line-height-normal">in css2, for line-height</a>
</ul>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-feature-settings-normal-value">normal!!font-feature-settings</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#font-variant-normal-value">normal!!font-variant</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-not">not</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-not-allowed">not-allowed</a>
<li>
nowrap
<ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-wrap-nowrap">in css-flexbox-1, for flex-wrap</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-white-space-nowrap">in css-text-3, for white-space</a>
</ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-n-resize">n-resize</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-ns-resize">ns-resize</a>
<li>
<number>
<ul>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-iteration-count-number">in css-animations-1, for animation-iteration-count</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-grow-number">in css-flexbox-1, for flex-grow</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-shrink-number">in css-flexbox-1, for flex-shrink</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#aspect-ratio-value">in css-fonts-3, for font-size-adjust</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-image-threshold-number">in css-shapes-1, for shape-image-threshold</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-balance-number">in css-speech-1, for voice-balance</a>
</ul>
<li>
<number [0,∞]>
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-border-image-slice-number-0">in css-backgrounds-3, for border-image-slice</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-border-image-width-number-0">in css-backgrounds-3, for border-image-width</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-speak-as-numbers">numbers</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-system-numeric">numeric</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-nw-resize">nw-resize</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-nwse-resize">nwse-resize</a>
<li>
objectboundingbox
<ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-clippathunits-objectboundingbox">in css-masking-1, for clipPathUnits</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-maskcontentunits-objectboundingbox">in css-masking-1, for maskContentUnits</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-maskunits-objectboundingbox">in css-masking-1, for maskUnits</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-style-oblique">oblique</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-family-old">old</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-olive">olive</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-only">only</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-text-emphasis-open">open</a>
<li>
open-quote
<ul>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-open-quote">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-open-quote">in css2, for content</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-orange">orange</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-oriya">oriya</a>
<li>
outset
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-outset">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-outset">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-outset">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-list-style-position-outside">outside</a>
<li>
over
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-position-over">in css-text-decor-3, for text-emphasis-position</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-position-over">in css-text-decor-3, for text-text-emphasis-position</a>
</ul>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-overlay">overlay</a>
<li>
overline
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-decoration-line-overline">in css-text-decor-3, for text-decoration-line</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-text-decoration-overline">in css2, for text-decoration</a>
</ul>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-color-gamut-p3">p3</a>
<li>
padding-box
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-clip-padding-box">in css-backgrounds-3, for background-clip</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-origin-padding-box">in css-backgrounds-3, for background-origin</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-clip-padding-box">in css-masking-1, for mask-clip</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-origin-padding-box">in css-masking-1, for mask-origin</a>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-shape-box-padding-box">in css-shapes-1, for <shape-box>, shape-outside</a>
</ul>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-page">page</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-overflow-block-paged">paged</a>
<li><a href="https://drafts.csswg.org/css-contain-1/#valdef-contain-paint">paint</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-paused">paused</a>
<li><a href="https://drafts.csswg.org/css-values-3/#pc">pc</a>
<li>
<percentage>
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-percentage">in css-backgrounds-3, for background-position</a>
<li><a href="https://www.w3.org/TR/css-shapes-1/#valuedef-percentage">in css-shapes-1, for shape-margin</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-pitch-percentage">in css-speech-1, for voice-pitch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-range-percentage">in css-speech-1, for voice-range</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-rate-percentage">in css-speech-1, for voice-rate</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-indent-percentage">in css-text-3, for text-indent</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-padding-width-percentage">in css2, for <padding-width></a>
<li><a href="https://drafts.csswg.org/css2/#valdef-top-percentage">in css2, for top, right, bottom, left</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-percentage">in css2, for vertical-align</a>
</ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-border-image-slice-percentage-0"><percentage [0,∞]></a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-persian">persian</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-image-rendering-pixelated">pixelated</a>
<li><a href="https://www.w3.org/TR/css-values-3/#px">pixel unit</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-unicode-bidi-plaintext">plaintext</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-pointer">pointer</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-orientation-portrait">portrait</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-radial-gradient-position"><position></a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre">pre</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-line">pre-line</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-family-preserve">preserve</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">pre-wrap</a>
<li>
print
<ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-print">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-print">in mediaqueries-4, for @media</a>
</ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-progress">progress</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-scan-progressive">progressive</a>
<li>
projection
<ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-projection">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-projection">in mediaqueries-4, for @media</a>
</ul>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-type-proximity">proximity</a>
<li><a href="https://drafts.csswg.org/css-values-3/#pt">pt</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-purple">purple</a>
<li><a href="https://drafts.csswg.org/css-values-3/#px">px</a>
<li><a href="https://drafts.csswg.org/css-values-3/#Q">q</a>
<li><a href="https://drafts.csswg.org/css-values-3/#rad">rad</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-color-gamut-rec2020">rec2020</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-recto">recto</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-red">red</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-stress-reduced">reduced</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-region">region</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-position-relative">relative</a>
<li><a href="https://drafts.csswg.org/css-values-3/#rem">rem</a>
<li>
repeat
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-repeat-repeat">in css-backgrounds-3, for background-repeat</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-border-image-repeat-repeat">in css-backgrounds-3, for border-image-repeat</a>
</ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-repeat-repeat-x">repeat-x</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-repeat-repeat-y">repeat-y</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-direction-reverse">reverse</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#valdef-all-revert">revert</a>
<li>
ridge
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-ridge">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-ridge">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-ridge">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
</ul>
<li>
right
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-content-right">in css-align-3, for justify-content, justify-self, justify-items</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-right">in css-backgrounds-3, for background-position</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-right">in css-break-3, for break-before, break-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-balance-right">in css-speech-1, for voice-balance</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-align-right">in css-text-3, for text-align</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-position-right">in css-text-decor-3, for text-emphasis-position</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-position-right">in css-text-decor-3, for text-text-emphasis-position</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#underline-right">in css-text-decor-3, for text-underline-position</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-origin-right">in css-transforms-1, for transform-origin</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-clear-right">in css2, for clear</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-float-right">in css2, for float</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-page-break-right">in css2, for page-break-before, page-break-after, page-break-inside</a>
</ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-balance-rightwards">rightwards</a>
<li>
round
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-repeat-round">in css-backgrounds-3, for background-repeat</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-border-image-repeat-round">in css-backgrounds-3, for border-image-repeat</a>
</ul>
<li>
row
<ul>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-direction-row">in css-flexbox-1, for flex-direction</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-auto-flow-row">in css-grid-1, for grid-auto-flow</a>
</ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-row-resize">row-resize</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-direction-row-reverse">row-reverse</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-direction-rtl">rtl</a>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-ruby">ruby</a>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-ruby-base">ruby-base</a>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-ruby-base-container">ruby-base-container</a>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-ruby-text">ruby-text</a>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-ruby-text-container">ruby-text-container</a>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-run-in">run-in</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-play-state-running">running</a>
<li><a href="https://drafts.csswg.org/css-values-3/#s">s</a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-overflow-position-safe">safe</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-generic-family-sans-serif">sans-serif</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-saturation">saturation</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-object-fit-scale-down">scale-down</a>
<li>
screen
<ul>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-screen">in compositing-1, for <blend-mode></a>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-screen">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-screen">in mediaqueries-4, for @media</a>
</ul>
<li>
scroll
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-attachment-scroll">in css-backgrounds-3, for background-attachment</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-overflow-scroll">in css2, for overflow</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-overflow-block-scroll">in mediaqueries-4, for @media/overflow-block</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-overflow-inline-scroll">in mediaqueries-4, for @media/overflow-inline</a>
</ul>
<li><a href="https://drafts.csswg.org/css-will-change-1/#valdef-will-change-scroll-position">scroll-position</a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-self-position-self-end">self-end</a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-self-position-self-start">self-start</a>
<li>
<semitones>
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-pitch-semitones">in css-speech-1, for voice-pitch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-range-semitones">in css-speech-1, for voice-range</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-border-collapse-separate">separate</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-se-resize">se-resize</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-generic-family-serif">serif</a>
<li>
sesame
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-style-sesame">in css-text-decor-3, for text-emphasis-style</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-style-sesame">in css-text-decor-3, for text-text-emphasis-style</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-empty-cells-show">show</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-text-orientation-sideways">sideways</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-sideways-lr">sideways-lr</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-text-orientation-sideways-right">sideways-right</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-sideways-rl">sideways-rl</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-volume-silent">silent</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-silver">silver</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#simp-chinese-formal">simp-chinese-formal</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#simp-chinese-informal">simp-chinese-informal</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-radial-gradient-size"><size></a>
<li><a href="https://drafts.csswg.org/css-contain-1/#valdef-contain-size">size</a>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-box-decoration-break-slice">slice</a>
<li>
slow
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-rate-slow">in css-speech-1, for voice-rate</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-update-slow">in mediaqueries-4, for @media/update</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-size-small">small</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-style-small-caps">small-caps</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-small-caption">small-caption</a>
<li><a href="https://drafts.csswg.org/css-images-3/#valdef-image-rendering-smooth">smooth</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-volume-soft">soft</a>
<li><a href="https://drafts.fxtf.org/compositing-1/#valdef-blend-mode-soft-light">soft-light</a>
<li>
solid
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-style-solid">in css-backgrounds-3, for <line-style>, border-style, border-top-style, border-left-style, border-bottom-style, border-right-style, border</a>
<li><a href="https://www.w3.org/TR/CSS2/box.html#value-def-solid">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-solid">in css2, for <border-style>, border-top-style, border-right-style, border-bottom-style, border-left-style, border-style</a>
</ul>
<li>
space
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-repeat-space">in css-backgrounds-3, for background-repeat</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-border-image-repeat-space">in css-backgrounds-3, for border-image-repeat</a>
</ul>
<li>
space-around
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-align-content-space-around">in css-align-3, for align-content, justify-content, <content-distribution></a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-space-around">in css-flexbox-1, for align-content</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-space-around">in css-flexbox-1, for justify-content</a>
</ul>
<li>
space-between
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-align-content-space-between">in css-align-3, for align-content, justify-content, <content-distribution></a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-space-between">in css-flexbox-1, for align-content</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-justify-content-space-between">in css-flexbox-1, for justify-content</a>
</ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-align-content-space-evenly">space-evenly</a>
<li><a href="https://drafts.csswg.org/css-grid-1/#grid-placement-span-int">span && [ <integer> || <custom-ident> ]</a>
<li>
speech
<ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-speech">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-speech">in mediaqueries-4, for @media</a>
</ul>
<li>
spell-out
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-speak-as-spell-out">in css-counter-styles-3, for @counter-style/speak-as</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-speak-as-spell-out">in css-speech-1, for speak-as</a>
</ul>
<li>
square
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#square">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-square">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-square">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-s-resize">s-resize</a>
<li>
srgb
<ul>
<li><a href="https://drafts.fxtf.org/filter-effects-1/#valdef-color-interpolation-filters-srgb">in filter-effects-1, for color-interpolation-filters</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-color-gamut-srgb">in mediaqueries-4, for @media/color-gamut</a>
</ul>
<li>
start
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-self-position-start">in css-align-3, for <self-position>, <content-position>, justify-self, align-self, justify-content, align-content</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-steps-start">in css-easing-1, for steps()</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-align-start">in css-scroll-snap-1, for scroll-snap-align</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-align-start">in css-text-3, for text-align</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-position-static">static</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-status-bar">status-bar</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-step-easing-function-step-end">step-end</a>
<li><a href="https://drafts.csswg.org/css-easing-1/#valdef-step-easing-function-step-start">step-start</a>
<li>
stretch
<ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-align-content-stretch">in css-align-3, for align-content, justify-content, <content-distribution></a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-align-self-stretch">in css-align-3, for align-self</a>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-stretch">in css-align-3, for justify-self</a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-border-image-repeat-stretch">in css-backgrounds-3, for border-image-repeat</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-content-stretch">in css-flexbox-1, for align-content</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-align-items-stretch">in css-flexbox-1, for align-items, align-self</a>
</ul>
<li>
strict
<ul>
<li><a href="https://drafts.csswg.org/css-contain-1/#valdef-contain-strict">in css-contain-1, for contain</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-line-break-strict">in css-text-3, for line-break</a>
</ul>
<li>
<string>
<ul>
<li><a href="https://drafts.csswg.org/css-shapes-1/#valdef-path-string">in css-shapes-1, for path()</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-style-string">in css-text-decor-3, for text-emphasis-style</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-style-string">in css-text-decor-3, for text-text-emphasis-style</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-content-string">in css2, for content</a>
</ul>
<li><a href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-areas-string"><string>+</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-quotes-strings">[<string> <string>]+</a>
<li>
stroke-box
<ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-clip-path-stroke-box">in css-masking-1, for clip-path</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-clip-stroke-box">in css-masking-1, for mask-clip</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-origin-stroke-box">in css-masking-1, for mask-origin</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-box-stroke-box">in css-transforms-1, for transform-box</a>
</ul>
<li>
strong
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-pause-before-strong">in css-speech-1, for pause-before, pause-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-rest-before-strong">in css-speech-1, for rest-before, rest-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-stress-strong">in css-speech-1, for voice-stress</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-sub">sub</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-composite-subtract">subtract</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-super">super</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-sw-resize">sw-resize</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-system-symbolic">symbolic</a>
<li>
table
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-table">in css-display-3, for display, <display-inside></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-table">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-table">in css2, for display</a>
</ul>
<li>
table-caption
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-table-caption">in css-display-3, for display, <display-internal></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-table-caption">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-table-caption">in css2, for display</a>
</ul>
<li>
table-cell
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-table-cell">in css-display-3, for display, <display-internal></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-table-cell">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-table-cell">in css2, for display</a>
</ul>
<li>
table-column
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-table-column">in css-display-3, for display, <display-internal></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-table-column">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-table-column">in css2, for display</a>
</ul>
<li>
table-column-group
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-table-column-group">in css-display-3, for display, <display-internal></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-table-column-group">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-table-column-group">in css2, for display</a>
</ul>
<li>
table-footer-group
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-table-footer-group">in css-display-3, for display, <display-internal></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-table-footer-group">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-table-footer-group">in css2, for display</a>
</ul>
<li>
table-header-group
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-table-header-group">in css-display-3, for display, <display-internal></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-table-header-group">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-table-header-group">in css2, for display</a>
</ul>
<li>
table-row
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-table-row">in css-display-3, for display, <display-internal></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-table-row">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-table-row">in css2, for display</a>
</ul>
<li>
table-row-group
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-display-table-row-group">in css-display-3, for display, <display-internal></a>
<li><a href="https://www.w3.org/TR/CSS2/tables.html#value-def-table-row-group">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-table-row-group">in css2, for display</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-tamil">tamil</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-teal">teal</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-telugu">telugu</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-text">text</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-text-bottom">text-bottom</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-text-top">text-top</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-thai">thai</a>
<li>
thick
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-width-thick">in css-backgrounds-3, for <line-width>, border-width, border-top-width, border-left-width, border-bottom-width, border-right-width, border</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-border-width-thick">in css2, for <border-width>, border-top-width, border-right-width, border-bottom-wight, border-left-width, border-width</a>
</ul>
<li>
thin
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-line-width-thin">in css-backgrounds-3, for <line-width>, border-width, border-top-width, border-left-width, border-bottom-width, border-right-width, border</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-border-width-thin">in css2, for <border-width>, border-top-width, border-right-width, border-bottom-wight, border-left-width, border-width</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-tibetan">tibetan</a>
<li>
<time>
<ul>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-delay-time">in css-animations-1, for animation-delay</a>
<li><a href="https://drafts.csswg.org/css-animations-1/#valdef-animation-duration-time">in css-animations-1, for animation-duration</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-pause-before-time">in css-speech-1, for pause-before, pause-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-rest-before-time">in css-speech-1, for rest-before, rest-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-duration-time">in css-speech-1, for voice-duration</a>
</ul>
<li>
top
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#valdef-background-position-top">in css-backgrounds-3, for background-position</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-origin-top">in css-transforms-1, for transform-origin</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-caption-side-top">in css2, for caption-side</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-vertical-align-top">in css2, for vertical-align</a>
</ul>
<li><a href="https://drafts.csswg.org/css-grid-1/#track-listing"><track-list> | <auto-track-list></a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#trad-chinese-formal">trad-chinese-formal</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#trad-chinese-informal">trad-chinese-informal</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-border-color-transparent">transparent</a>
<li>
triangle
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-style-triangle">in css-text-decor-3, for text-emphasis-style</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-style-triangle">in css-text-decor-3, for text-text-emphasis-style</a>
</ul>
<li>
tty
<ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-tty">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-tty">in mediaqueries-4, for @media</a>
</ul>
<li><a href="https://drafts.csswg.org/css-values-3/#turn">turn</a>
<li>
tv
<ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-media-tv">in css2, for @media</a>
<li><a href="https://drafts.csswg.org/mediaqueries-4/#valdef-media-tv">in mediaqueries-4, for @media</a>
</ul>
<li>
under
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-emphasis-position-under">in css-text-decor-3, for text-emphasis-position</a>
<li><a href="https://www.w3.org/TR/css-text-decor-3/#valdef-text-text-emphasis-position-under">in css-text-decor-3, for text-text-emphasis-position</a>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#underline-under">in css-text-decor-3, for text-underline-position</a>
</ul>
<li>
underline
<ul>
<li><a href="https://drafts.csswg.org/css-text-decor-3/#valdef-text-decoration-line-underline">in css-text-decor-3, for text-decoration-line</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-text-decoration-underline">in css2, for text-decoration</a>
</ul>
<li><a href="https://drafts.csswg.org/css-align-3/#valdef-overflow-position-unsafe">unsafe</a>
<li><a href="https://drafts.csswg.org/css-cascade-4/#valdef-all-unset">unset</a>
<li>
upper-alpha
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#upper-alpha">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://drafts.csswg.org/css2/#value-def-upper-alpha">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-name-upper-armenian">upper-armenian</a>
<li><a href="https://drafts.csswg.org/css-text-3/#valdef-text-transform-uppercase">uppercase</a>
<li>
upper-latin
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#upper-latin">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-upper-latin">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-upper-latin">in css2, for list-style-type</a>
</ul>
<li>
upper-roman
<ul>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#upper-roman">in css-counter-styles-3, for <counter-style-name></a>
<li><a href="https://www.w3.org/TR/CSS2/generate.html#value-def-upper-roman">in css2</a>
<li><a href="https://drafts.csswg.org/css2/#value-def-upper-roman">in css2, for list-style-type</a>
</ul>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-text-orientation-upright">upright</a>
<li><a href="https://drafts.csswg.org/css-fonts-3/#urange-value"><urange></a>
<li>
<uri>
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-cue-before-uri">in css-speech-1, for cue-before, cue-after</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-background-image-uri">in css2, for background-image</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-content-uri">in css2, for content</a>
</ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-image-url"><url></a>
<li>
userspaceonuse
<ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-clippathunits-userspaceonuse">in css-masking-1, for clipPathUnits</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-maskcontentunits-userspaceonuse">in css-masking-1, for maskContentUnits</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-maskunits-userspaceonuse">in css-masking-1, for maskUnits</a>
</ul>
<li><a href="https://drafts.csswg.org/css-break-3/#valdef-break-before-verso">verso</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-vertical-lr">vertical-lr</a>
<li><a href="https://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-vertical-rl">vertical-rl</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-vertical-text">vertical-text</a>
<li><a href="https://drafts.csswg.org/css-values-3/#vh">vh</a>
<li>
view-box
<ul>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-clip-path-view-box">in css-masking-1, for clip-path</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-clip-view-box">in css-masking-1, for mask-clip</a>
<li><a href="https://drafts.fxtf.org/css-masking-1/#valdef-mask-origin-view-box">in css-masking-1, for mask-origin</a>
<li><a href="https://drafts.csswg.org/css-transforms-1/#valdef-transform-box-view-box">in css-transforms-1, for transform-box</a>
</ul>
<li>
visible
<ul>
<li><a href="https://drafts.csswg.org/css-display-3/#valdef-visibility-visible">in css-display-3, for visibility</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-overflow-visible">in css2, for overflow</a>
</ul>
<li><a href="https://drafts.csswg.org/css-values-3/#vmax">vmax</a>
<li><a href="https://drafts.csswg.org/css-values-3/#vmin">vmin</a>
<li><a href="https://drafts.csswg.org/css-values-3/#vw">vw</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-wait">wait</a>
<li>
weak
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-pause-before-weak">in css-speech-1, for pause-before, pause-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-rest-before-weak">in css-speech-1, for rest-before, rest-after</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-white">white</a>
<li><a href="https://drafts.csswg.org/css-counter-styles-3/#valdef-counter-style-speak-as-words">words</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-wrap-wrap">wrap</a>
<li><a href="https://drafts.csswg.org/css-flexbox-1/#valdef-flex-wrap-wrap-reverse">wrap-reverse</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-w-resize">w-resize</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-type-x">x</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-rate-x-fast">x-fast</a>
<li>
x-high
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-pitch-x-high">in css-speech-1, for voice-pitch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-range-x-high">in css-speech-1, for voice-range</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-size-x-large">x-large</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-volume-x-loud">x-loud</a>
<li>
x-low
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-pitch-x-low">in css-speech-1, for voice-pitch</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-range-x-low">in css-speech-1, for voice-range</a>
</ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-rate-x-slow">x-slow</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-size-x-small">x-small</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-volume-x-soft">x-soft</a>
<li>
x-strong
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-pause-before-x-strong">in css-speech-1, for pause-before, pause-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-rest-before-x-strong">in css-speech-1, for rest-before, rest-after</a>
</ul>
<li>
x-weak
<ul>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-pause-before-x-weak">in css-speech-1, for pause-before, pause-after</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-rest-before-x-weak">in css-speech-1, for rest-before, rest-after</a>
</ul>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-size-xx-large">xx-large</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-font-size-xx-small">xx-small</a>
<li><a href="https://drafts.csswg.org/css-scroll-snap-1/#valdef-scroll-snap-type-y">y</a>
<li><a href="https://drafts.csswg.org/css2/#valdef-color-yellow">yellow</a>
<li><a href="https://drafts.csswg.org/css-speech-1/#valdef-voice-family-young">young</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-zoom-in">zoom-in</a>
<li><a href="https://drafts.csswg.org/css-ui-3/#valdef-cursor-zoom-out">zoom-out</a>
</ul>
</div>
<h2 class="heading settled" data-level="6" id="acks"><span class="secno">6. </span><span class="content">Acknowledgements</span><a class="self-link" href="#acks"></a></h2>
<p>Special thanks to Florian Rivoal for creating the initial draft of the <a href="#experimental">§ 3.2.1 Experimentation and Unstable Features</a> recommendations.</p>
</main>
<h2 class="no-ref no-num heading settled" id="w3c-conformance"><span class="content"> Conformance</span><a class="self-link" href="#w3c-conformance"></a></h2>
<h3 class="no-ref heading settled" id="w3c-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#w3c-conventions"></a></h3>
<p>Conformance requirements are expressed with a combination of
descriptive assertions and RFC 2119 terminology. The key words “MUST”,
“MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
“RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
document are to be interpreted as described in RFC 2119.
However, for readability, these words do not appear in all uppercase
letters in this specification. </p>
<p>All of the text of this specification is normative except sections
explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a></p>
<p>Examples in this specification are introduced with the words “for example”
or are set apart from the normative text with <code>class="example"</code>,
like this: </p>
<div class="example" id="w3c-example">
<a class="self-link" href="#w3c-example"></a>
<p>This is an example of an informative example.</p>
</div>
<p>Informative notes begin with the word “Note” and are set apart from the
normative text with <code>class="note"</code>, like this: </p>
<p class="note" role="note">Note, this is an informative note.</p>
<p>Advisements are normative sections styled to evoke special attention and are
set apart from other normative text with <code><strong class="advisement"></code>, like
this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
<h3 class="no-ref heading settled" id="w3c-conformance-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#w3c-conformance-classes"></a></h3>
<p>Conformance to this specification
is defined for three conformance classes: </p>
<dl>
<dt>style sheet
<dd>A <a href="https://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
style sheet</a>.
<dt>renderer
<dd>A <a href="https://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
documents that use them.
<dt>authoring tool
<dd>A <a href="https://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that writes a style sheet.
</dl>
<p>A style sheet is conformant to this specification
if all of its statements that use syntax defined in this module are valid
according to the generic CSS grammar and the individual grammars of each
feature defined in this module. </p>
<p>A renderer is conformant to this specification
if, in addition to interpreting the style sheet as defined by the
appropriate specifications, it supports all the features defined
by this specification by parsing them correctly
and rendering the document accordingly. However, the inability of a
UA to correctly render a document due to limitations of the device
does not make the UA non-conformant. (For example, a UA is not
required to render color on a monochrome monitor.) </p>
<p>An authoring tool is conformant to this specification
if it writes style sheets that are syntactically correct according to the
generic CSS grammar and the individual grammars of each feature in
this module, and meet all other conformance requirements of style sheets
as described in this module. </p>
<h3 class="no-ref heading settled" id="w3c-partial"><span class="content"> Partial implementations</span><a class="self-link" href="#w3c-partial"></a></h3>
<p>So that authors can exploit the forward-compatible parsing rules to
assign fallback values, CSS renderers <strong>must</strong> treat as invalid (and <a href="https://www.w3.org/TR/CSS21/conform.html#ignore">ignore
as appropriate</a>) any at-rules, properties, property values, keywords,
and other syntactic constructs for which they have no usable level of
support. In particular, user agents <strong>must not</strong> selectively
ignore unsupported component values and honor supported values in a single
multi-value property declaration: if any value is considered invalid
(as unsupported values must be), CSS requires that the entire declaration
be ignored.</p>
<h4 class="heading settled" id="w3c-conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#w3c-conform-future-proofing"></a></h4>
<p>To avoid clashes with future stable CSS features,
the CSSWG recommends <a href="https://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="https://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="https://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
<h3 class="no-ref heading settled" id="w3c-testing"><span class="content"> Non-experimental implementations</span><a class="self-link" href="#w3c-testing"></a></h3>
<p>Once a specification reaches the Candidate Recommendation stage,
non-experimental implementations are possible, and implementors should
release an unprefixed implementation of any CR-level feature they
can demonstrate to be correctly implemented according to spec. </p>
<p>To establish and maintain the interoperability of CSS across
implementations, the CSS Working Group requests that non-experimental
CSS renderers submit an implementation report (and, if necessary, the
testcases used for that implementation report) to the W3C before
releasing an unprefixed implementation of any CSS features. Testcases
submitted to W3C are subject to review and correction by the CSS
Working Group. </p>
<p>Further information on submitting testcases and implementation reports
can be found from on the CSS Working Group’s website at <a href="https://www.w3.org/Style/CSS/Test/">https://www.w3.org/Style/CSS/Test/</a>.
Questions should be directed to the <a href="https://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list.</p>
<script src="https://www.w3.org/scripts/TR/2021/fixup.js"></script>
<h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
<h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
<dl>
<dt id="biblio-compositing">[COMPOSITING]
<dd>Rik Cabanier; Nikos Andronikos. <a href="https://www.w3.org/TR/compositing-1/"><cite>Compositing and Blending Level 1</cite></a>. 13 January 2015. CR. URL: <a href="https://www.w3.org/TR/compositing-1/">https://www.w3.org/TR/compositing-1/</a>
<dt id="biblio-css-backgrounds-3">[CSS-BACKGROUNDS-3]
<dd>Bert Bos; Elika Etemad; Brad Kemper. <a href="https://www.w3.org/TR/css-backgrounds-3/"><cite>CSS Backgrounds and Borders Module Level 3</cite></a>. 26 July 2021. CR. URL: <a href="https://www.w3.org/TR/css-backgrounds-3/">https://www.w3.org/TR/css-backgrounds-3/</a>
<dt id="biblio-css-box-3">[CSS-BOX-3]
<dd>Elika Etemad. <a href="https://www.w3.org/TR/css-box-3/"><cite>CSS Box Model Module Level 3</cite></a>. 22 December 2020. CR. URL: <a href="https://www.w3.org/TR/css-box-3/">https://www.w3.org/TR/css-box-3/</a>
<dt id="biblio-css-cascade-4">[CSS-CASCADE-4]
<dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-4/"><cite>CSS Cascading and Inheritance Level 4</cite></a>. 3 December 2021. WD. URL: <a href="https://www.w3.org/TR/css-cascade-4/">https://www.w3.org/TR/css-cascade-4/</a>
<dt id="biblio-css-color-3">[CSS-COLOR-3]
<dd>Tantek Çelik; Chris Lilley; David Baron. <a href="https://www.w3.org/TR/css-color-3/"><cite>CSS Color Module Level 3</cite></a>. 5 August 2021. REC. URL: <a href="https://www.w3.org/TR/css-color-3/">https://www.w3.org/TR/css-color-3/</a>
<dt id="biblio-css-color-4">[CSS-COLOR-4]
<dd>Tab Atkins Jr.; Chris Lilley; Lea Verou. <a href="https://www.w3.org/TR/css-color-4/"><cite>CSS Color Module Level 4</cite></a>. 15 December 2021. WD. URL: <a href="https://www.w3.org/TR/css-color-4/">https://www.w3.org/TR/css-color-4/</a>
<dt id="biblio-css-color-adjust-1">[CSS-COLOR-ADJUST-1]
<dd>Elika Etemad; et al. <a href="https://www.w3.org/TR/css-color-adjust-1/"><cite>CSS Color Adjustment Module Level 1</cite></a>. 16 June 2021. WD. URL: <a href="https://www.w3.org/TR/css-color-adjust-1/">https://www.w3.org/TR/css-color-adjust-1/</a>
<dt id="biblio-css-conditional-3">[CSS-CONDITIONAL-3]
<dd>David Baron; Elika Etemad; Chris Lilley. <a href="https://www.w3.org/TR/css-conditional-3/"><cite>CSS Conditional Rules Module Level 3</cite></a>. 23 December 2021. CR. URL: <a href="https://www.w3.org/TR/css-conditional-3/">https://www.w3.org/TR/css-conditional-3/</a>
<dt id="biblio-css-contain-1">[CSS-CONTAIN-1]
<dd>Tab Atkins Jr.; Florian Rivoal. <a href="https://www.w3.org/TR/css-contain-1/"><cite>CSS Containment Module Level 1</cite></a>. 22 December 2020. REC. URL: <a href="https://www.w3.org/TR/css-contain-1/">https://www.w3.org/TR/css-contain-1/</a>
<dt id="biblio-css-counter-styles-3">[CSS-COUNTER-STYLES-3]
<dd>Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-counter-styles-3/"><cite>CSS Counter Styles Level 3</cite></a>. 27 July 2021. CR. URL: <a href="https://www.w3.org/TR/css-counter-styles-3/">https://www.w3.org/TR/css-counter-styles-3/</a>
<dt id="biblio-css-display-3">[CSS-DISPLAY-3]
<dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-display-3/"><cite>CSS Display Module Level 3</cite></a>. 3 September 2021. CR. URL: <a href="https://www.w3.org/TR/css-display-3/">https://www.w3.org/TR/css-display-3/</a>
<dt id="biblio-css-easing-1">[CSS-EASING-1]
<dd>Brian Birtles; et al. <a href="https://www.w3.org/TR/css-easing-1/"><cite>CSS Easing Functions Level 1</cite></a>. 1 April 2021. CR. URL: <a href="https://www.w3.org/TR/css-easing-1/">https://www.w3.org/TR/css-easing-1/</a>
<dt id="biblio-css-flexbox-1">[CSS-FLEXBOX-1]
<dd>Tab Atkins Jr.; et al. <a href="https://www.w3.org/TR/css-flexbox-1/"><cite>CSS Flexible Box Layout Module Level 1</cite></a>. 19 November 2018. CR. URL: <a href="https://www.w3.org/TR/css-flexbox-1/">https://www.w3.org/TR/css-flexbox-1/</a>
<dt id="biblio-css-fonts-3">[CSS-FONTS-3]
<dd>John Daggett; Myles Maxfield; Chris Lilley. <a href="https://www.w3.org/TR/css-fonts-3/"><cite>CSS Fonts Module Level 3</cite></a>. 20 September 2018. REC. URL: <a href="https://www.w3.org/TR/css-fonts-3/">https://www.w3.org/TR/css-fonts-3/</a>
<dt id="biblio-css-fonts-4">[CSS-FONTS-4]
<dd>John Daggett; Myles Maxfield; Chris Lilley. <a href="https://www.w3.org/TR/css-fonts-4/"><cite>CSS Fonts Module Level 4</cite></a>. 21 December 2021. WD. URL: <a href="https://www.w3.org/TR/css-fonts-4/">https://www.w3.org/TR/css-fonts-4/</a>
<dt id="biblio-css-grid-1">[CSS-GRID-1]
<dd>Tab Atkins Jr.; et al. <a href="https://www.w3.org/TR/css-grid-1/"><cite>CSS Grid Layout Module Level 1</cite></a>. 18 December 2020. CR. URL: <a href="https://www.w3.org/TR/css-grid-1/">https://www.w3.org/TR/css-grid-1/</a>
<dt id="biblio-css-grid-2">[CSS-GRID-2]
<dd>Tab Atkins Jr.; Elika Etemad; Rossen Atanassov. <a href="https://www.w3.org/TR/css-grid-2/"><cite>CSS Grid Layout Module Level 2</cite></a>. 18 December 2020. CR. URL: <a href="https://www.w3.org/TR/css-grid-2/">https://www.w3.org/TR/css-grid-2/</a>
<dt id="biblio-css-images-3">[CSS-IMAGES-3]
<dd>Tab Atkins Jr.; Elika Etemad; Lea Verou. <a href="https://www.w3.org/TR/css-images-3/"><cite>CSS Images Module Level 3</cite></a>. 17 December 2020. CR. URL: <a href="https://www.w3.org/TR/css-images-3/">https://www.w3.org/TR/css-images-3/</a>
<dt id="biblio-css-images-4">[CSS-IMAGES-4]
<dd>Tab Atkins Jr.; Elika Etemad; Lea Verou. <a href="https://www.w3.org/TR/css-images-4/"><cite>CSS Image Values and Replaced Content Module Level 4</cite></a>. 13 April 2017. WD. URL: <a href="https://www.w3.org/TR/css-images-4/">https://www.w3.org/TR/css-images-4/</a>
<dt id="biblio-css-lists-3">[CSS-LISTS-3]
<dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-lists-3/"><cite>CSS Lists and Counters Module Level 3</cite></a>. 17 November 2020. WD. URL: <a href="https://www.w3.org/TR/css-lists-3/">https://www.w3.org/TR/css-lists-3/</a>
<dt id="biblio-css-logical-1">[CSS-LOGICAL-1]
<dd>Rossen Atanassov; Elika Etemad. <a href="https://www.w3.org/TR/css-logical-1/"><cite>CSS Logical Properties and Values Level 1</cite></a>. 27 August 2018. WD. URL: <a href="https://www.w3.org/TR/css-logical-1/">https://www.w3.org/TR/css-logical-1/</a>
<dt id="biblio-css-multicol-1">[CSS-MULTICOL-1]
<dd>Florian Rivoal; Rachel Andrew. <a href="https://www.w3.org/TR/css-multicol-1/"><cite>CSS Multi-column Layout Module Level 1</cite></a>. 12 October 2021. CR. URL: <a href="https://www.w3.org/TR/css-multicol-1/">https://www.w3.org/TR/css-multicol-1/</a>
<dt id="biblio-css-position-3">[CSS-POSITION-3]
<dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-position-3/"><cite>CSS Positioned Layout Module Level 3</cite></a>. 16 December 2021. WD. URL: <a href="https://www.w3.org/TR/css-position-3/">https://www.w3.org/TR/css-position-3/</a>
<dt id="biblio-css-sizing-3">[CSS-SIZING-3]
<dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-sizing-3/"><cite>CSS Box Sizing Module Level 3</cite></a>. 17 December 2021. WD. URL: <a href="https://www.w3.org/TR/css-sizing-3/">https://www.w3.org/TR/css-sizing-3/</a>
<dt id="biblio-css-sizing-4">[CSS-SIZING-4]
<dd>Tab Atkins Jr.; Elika Etemad; Jen Simmons. <a href="https://www.w3.org/TR/css-sizing-4/"><cite>CSS Box Sizing Module Level 4</cite></a>. 20 May 2021. WD. URL: <a href="https://www.w3.org/TR/css-sizing-4/">https://www.w3.org/TR/css-sizing-4/</a>
<dt id="biblio-css-style-attr">[CSS-STYLE-ATTR]
<dd>Tantek Çelik; Elika Etemad. <a href="https://www.w3.org/TR/css-style-attr/"><cite>CSS Style Attributes</cite></a>. 7 November 2013. REC. URL: <a href="https://www.w3.org/TR/css-style-attr/">https://www.w3.org/TR/css-style-attr/</a>
<dt id="biblio-css-syntax-3">[CSS-SYNTAX-3]
<dd>Tab Atkins Jr.; Simon Sapin. <a href="https://www.w3.org/TR/css-syntax-3/"><cite>CSS Syntax Module Level 3</cite></a>. 24 December 2021. CR. URL: <a href="https://www.w3.org/TR/css-syntax-3/">https://www.w3.org/TR/css-syntax-3/</a>
<dt id="biblio-css-transforms-1">[CSS-TRANSFORMS-1]
<dd>Simon Fraser; et al. <a href="https://www.w3.org/TR/css-transforms-1/"><cite>CSS Transforms Module Level 1</cite></a>. 14 February 2019. CR. URL: <a href="https://www.w3.org/TR/css-transforms-1/">https://www.w3.org/TR/css-transforms-1/</a>
<dt id="biblio-css-transforms-2">[CSS-TRANSFORMS-2]
<dd>Tab Atkins Jr.; et al. <a href="https://www.w3.org/TR/css-transforms-2/"><cite>CSS Transforms Module Level 2</cite></a>. 9 November 2021. WD. URL: <a href="https://www.w3.org/TR/css-transforms-2/">https://www.w3.org/TR/css-transforms-2/</a>
<dt id="biblio-css-ui-3">[CSS-UI-3]
<dd>Tantek Çelik; Florian Rivoal. <a href="https://www.w3.org/TR/css-ui-3/"><cite>CSS Basic User Interface Module Level 3 (CSS3 UI)</cite></a>. 21 June 2018. REC. URL: <a href="https://www.w3.org/TR/css-ui-3/">https://www.w3.org/TR/css-ui-3/</a>
<dt id="biblio-css-values-3">[CSS-VALUES-3]
<dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-3/"><cite>CSS Values and Units Module Level 3</cite></a>. 6 June 2019. CR. URL: <a href="https://www.w3.org/TR/css-values-3/">https://www.w3.org/TR/css-values-3/</a>
<dt id="biblio-css-variables-1">[CSS-VARIABLES-1]
<dd>Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-variables-1/"><cite>CSS Custom Properties for Cascading Variables Module Level 1</cite></a>. 11 November 2021. CR. URL: <a href="https://www.w3.org/TR/css-variables-1/">https://www.w3.org/TR/css-variables-1/</a>
<dt id="biblio-css-will-change-1">[CSS-WILL-CHANGE-1]
<dd>Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-will-change-1/"><cite>CSS Will Change Module Level 1</cite></a>. 3 December 2015. CR. URL: <a href="https://www.w3.org/TR/css-will-change-1/">https://www.w3.org/TR/css-will-change-1/</a>
<dt id="biblio-css-writing-modes-3">[CSS-WRITING-MODES-3]
<dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-3/"><cite>CSS Writing Modes Level 3</cite></a>. 10 December 2019. REC. URL: <a href="https://www.w3.org/TR/css-writing-modes-3/">https://www.w3.org/TR/css-writing-modes-3/</a>
<dt id="biblio-css2">[CSS2]
<dd>Bert Bos; et al. <a href="https://www.w3.org/TR/CSS21/"><cite>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</cite></a>. 7 June 2011. REC. URL: <a href="https://www.w3.org/TR/CSS21/">https://www.w3.org/TR/CSS21/</a>
<dt id="biblio-css3-mediaqueries">[CSS3-MEDIAQUERIES]
<dd>Florian Rivoal; et al. <a href="https://www.w3.org/TR/css3-mediaqueries/"><cite>Media Queries</cite></a>. 19 June 2012. REC. URL: <a href="https://www.w3.org/TR/css3-mediaqueries/">https://www.w3.org/TR/css3-mediaqueries/</a>
<dt id="biblio-css3-namespace">[CSS3-NAMESPACE]
<dd>Elika Etemad. <a href="https://www.w3.org/TR/css-namespaces-3/"><cite>CSS Namespaces Module Level 3</cite></a>. 20 March 2014. REC. URL: <a href="https://www.w3.org/TR/css-namespaces-3/">https://www.w3.org/TR/css-namespaces-3/</a>
<dt id="biblio-resize-observer-1">[RESIZE-OBSERVER-1]
<dd>Aleks Totic; Greg Whitworth. <a href="https://www.w3.org/TR/resize-observer-1/"><cite>Resize Observer</cite></a>. 11 February 2020. WD. URL: <a href="https://www.w3.org/TR/resize-observer-1/">https://www.w3.org/TR/resize-observer-1/</a>
<dt id="biblio-rfc2119">[RFC2119]
<dd>S. Bradner. <a href="https://datatracker.ietf.org/doc/html/rfc2119"><cite>Key words for use in RFCs to Indicate Requirement Levels</cite></a>. March 1997. Best Current Practice. URL: <a href="https://datatracker.ietf.org/doc/html/rfc2119">https://datatracker.ietf.org/doc/html/rfc2119</a>
<dt id="biblio-selectors-3">[SELECTORS-3]
<dd>Tantek Çelik; et al. <a href="https://www.w3.org/TR/selectors-3/"><cite>Selectors Level 3</cite></a>. 6 November 2018. REC. URL: <a href="https://www.w3.org/TR/selectors-3/">https://www.w3.org/TR/selectors-3/</a>
<dt id="biblio-selectors-4">[SELECTORS-4]
<dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/selectors-4/"><cite>Selectors Level 4</cite></a>. 21 November 2018. WD. URL: <a href="https://www.w3.org/TR/selectors-4/">https://www.w3.org/TR/selectors-4/</a>
<dt id="biblio-web-animations-1">[WEB-ANIMATIONS-1]
<dd>Brian Birtles; et al. <a href="https://www.w3.org/TR/web-animations-1/"><cite>Web Animations</cite></a>. 18 May 2021. WD. URL: <a href="https://www.w3.org/TR/web-animations-1/">https://www.w3.org/TR/web-animations-1/</a>
</dl>
<h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
<dl>
<dt id="biblio-css-align-3">[CSS-ALIGN-3]
<dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-align-3/"><cite>CSS Box Alignment Module Level 3</cite></a>. 24 December 2021. WD. URL: <a href="https://www.w3.org/TR/css-align-3/">https://www.w3.org/TR/css-align-3/</a>
<dt id="biblio-css-animations-1">[CSS-ANIMATIONS-1]
<dd>Dean Jackson; et al. <a href="https://www.w3.org/TR/css-animations-1/"><cite>CSS Animations Level 1</cite></a>. 11 October 2018. WD. URL: <a href="https://www.w3.org/TR/css-animations-1/">https://www.w3.org/TR/css-animations-1/</a>
<dt id="biblio-css-break-3">[CSS-BREAK-3]
<dd>Rossen Atanassov; Elika Etemad. <a href="https://www.w3.org/TR/css-break-3/"><cite>CSS Fragmentation Module Level 3</cite></a>. 4 December 2018. CR. URL: <a href="https://www.w3.org/TR/css-break-3/">https://www.w3.org/TR/css-break-3/</a>
<dt id="biblio-css-cascade-3">[CSS-CASCADE-3]
<dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-3/"><cite>CSS Cascading and Inheritance Level 3</cite></a>. 11 February 2021. REC. URL: <a href="https://www.w3.org/TR/css-cascade-3/">https://www.w3.org/TR/css-cascade-3/</a>
<dt id="biblio-css-font-loading-3">[CSS-FONT-LOADING-3]
<dd>Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-font-loading-3/"><cite>CSS Font Loading Module Level 3</cite></a>. 22 May 2014. WD. URL: <a href="https://www.w3.org/TR/css-font-loading-3/">https://www.w3.org/TR/css-font-loading-3/</a>
<dt id="biblio-css-masking-1">[CSS-MASKING-1]
<dd>Dirk Schulze; Brian Birtles; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-masking-1/"><cite>CSS Masking Module Level 1</cite></a>. 5 August 2021. CR. URL: <a href="https://www.w3.org/TR/css-masking-1/">https://www.w3.org/TR/css-masking-1/</a>
<dt id="biblio-css-scroll-snap-1">[CSS-SCROLL-SNAP-1]
<dd>Matt Rakow; et al. <a href="https://www.w3.org/TR/css-scroll-snap-1/"><cite>CSS Scroll Snap Module Level 1</cite></a>. 11 March 2021. CR. URL: <a href="https://www.w3.org/TR/css-scroll-snap-1/">https://www.w3.org/TR/css-scroll-snap-1/</a>
<dt id="biblio-css-scrollbars-1">[CSS-SCROLLBARS-1]
<dd>Tantek Çelik; Rossen Atanassov; Florian Rivoal. <a href="https://www.w3.org/TR/css-scrollbars-1/"><cite>CSS Scrollbars Styling Module Level 1</cite></a>. 9 December 2021. CR. URL: <a href="https://www.w3.org/TR/css-scrollbars-1/">https://www.w3.org/TR/css-scrollbars-1/</a>
<dt id="biblio-css-shapes-1">[CSS-SHAPES-1]
<dd>Vincent Hardy; Rossen Atanassov; Alan Stearns. <a href="https://www.w3.org/TR/css-shapes-1/"><cite>CSS Shapes Module Level 1</cite></a>. 20 March 2014. CR. URL: <a href="https://www.w3.org/TR/css-shapes-1/">https://www.w3.org/TR/css-shapes-1/</a>
<dt id="biblio-css-speech-1">[CSS-SPEECH-1]
<dd>Daniel Weck. <a href="https://www.w3.org/TR/css-speech-1/"><cite>CSS Speech Module</cite></a>. 10 March 2020. CR. URL: <a href="https://www.w3.org/TR/css-speech-1/">https://www.w3.org/TR/css-speech-1/</a>
<dt id="biblio-css-text-3">[CSS-TEXT-3]
<dd>Elika Etemad; Koji Ishii; Florian Rivoal. <a href="https://www.w3.org/TR/css-text-3/"><cite>CSS Text Module Level 3</cite></a>. 22 April 2021. CR. URL: <a href="https://www.w3.org/TR/css-text-3/">https://www.w3.org/TR/css-text-3/</a>
<dt id="biblio-css-text-decor-3">[CSS-TEXT-DECOR-3]
<dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-text-decor-3/"><cite>CSS Text Decoration Module Level 3</cite></a>. 13 August 2019. CR. URL: <a href="https://www.w3.org/TR/css-text-decor-3/">https://www.w3.org/TR/css-text-decor-3/</a>
<dt id="biblio-css-transitions-1">[CSS-TRANSITIONS-1]
<dd>David Baron; et al. <a href="https://www.w3.org/TR/css-transitions-1/"><cite>CSS Transitions</cite></a>. 11 October 2018. WD. URL: <a href="https://www.w3.org/TR/css-transitions-1/">https://www.w3.org/TR/css-transitions-1/</a>
<dt id="biblio-css-writing-modes-4">[CSS-WRITING-MODES-4]
<dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-4/"><cite>CSS Writing Modes Level 4</cite></a>. 30 July 2019. CR. URL: <a href="https://www.w3.org/TR/css-writing-modes-4/">https://www.w3.org/TR/css-writing-modes-4/</a>
<dt id="biblio-filter-effects-1">[FILTER-EFFECTS-1]
<dd>Dirk Schulze; Dean Jackson. <a href="https://www.w3.org/TR/filter-effects-1/"><cite>Filter Effects Module Level 1</cite></a>. 18 December 2018. WD. URL: <a href="https://www.w3.org/TR/filter-effects-1/">https://www.w3.org/TR/filter-effects-1/</a>
<dt id="biblio-mediaqueries-4">[MEDIAQUERIES-4]
<dd>Florian Rivoal; Tab Atkins Jr.. <a href="https://www.w3.org/TR/mediaqueries-4/"><cite>Media Queries Level 4</cite></a>. 25 December 2021. CR. URL: <a href="https://www.w3.org/TR/mediaqueries-4/">https://www.w3.org/TR/mediaqueries-4/</a>
</dl>
<aside class="dfn-panel" data-for="editors-draft">
<b><a href="#editors-draft">#editors-draft</a></b><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-editors-draft">1.1.
Background: The W3C Process and CSS</a> <a href="#ref-for-editors-draft①">(2)</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="css-level-1">
<b><a href="#css-level-1">#css-level-1</a></b><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-css-level-1">2.4.
CSS Levels</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="css-level-2">
<b><a href="#css-level-2">#css-level-2</a></b><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-css-level-2">2.4.
CSS Levels</a> <a href="#ref-for-css-level-2①">(2)</a> <a href="#ref-for-css-level-2②">(3)</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="css-level-3">
<b><a href="#css-level-3">#css-level-3</a></b><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-css-level-3">2.4.
CSS Levels</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="unstable">
<b><a href="#unstable">#unstable</a></b><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-unstable">3.2. Implementations of Unstable and Proprietary Features</a>
<li><a href="#ref-for-unstable①">3.2.1.
Experimentation and Unstable Features</a> <a href="#ref-for-unstable②">(2)</a>
<li><a href="#ref-for-unstable③">3.2.3.
Market Pressure and De Facto Standards</a> <a href="#ref-for-unstable④">(2)</a>
<li><a href="#ref-for-unstable⑤">3.2.3.1.
Vendor-prefixing Unstable Features</a> <a href="#ref-for-unstable⑥">(2)</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="vendor-prefix">
<b><a href="#vendor-prefix">#vendor-prefix</a></b><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-vendor-prefix">3.2.2.
Proprietary and Non-standardized Features</a>
<li><a href="#ref-for-vendor-prefix①">3.2.3.
Market Pressure and De Facto Standards</a>
<li><a href="#ref-for-vendor-prefix②">3.2.3.1.
Vendor-prefixing Unstable Features</a> <a href="#ref-for-vendor-prefix③">(2)</a> <a href="#ref-for-vendor-prefix④">(3)</a>
<li><a href="#ref-for-vendor-prefix⑤">3.3. Implementations of CR-level Features</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="proprietary-extension">
<b><a href="#proprietary-extension">#proprietary-extension</a></b><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-proprietary-extension">3.2. Implementations of Unstable and Proprietary Features</a>
<li><a href="#ref-for-proprietary-extension①">3.2.2.
Proprietary and Non-standardized Features</a> <a href="#ref-for-proprietary-extension②">(2)</a> <a href="#ref-for-proprietary-extension③">(3)</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="rough-interoperability">
<b><a href="#rough-interoperability">#rough-interoperability</a></b><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-rough-interoperability">2.3.
Modules with Rough Interoperability</a>
<li><a href="#ref-for-rough-interoperability①">3.2.3.
Market Pressure and De Facto Standards</a>
</ul>
</aside>
<script>/* script-dfn-panel */
document.body.addEventListener("click", function(e) {
var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
// Find the dfn element or panel, if any, that was clicked on.
var el = e.target;
var target;
var hitALink = false;
while(el.parentElement) {
if(el.tagName == "A") {
// Clicking on a link in a <dfn> shouldn't summon the panel
hitALink = true;
}
if(el.classList.contains("dfn-paneled")) {
target = "dfn";
break;
}
if(el.classList.contains("dfn-panel")) {
target = "dfn-panel";
break;
}
el = el.parentElement;
}
if(target != "dfn-panel") {
// Turn off any currently "on" or "activated" panels.
queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
el.classList.remove("on");
el.classList.remove("activated");
});
}
if(target == "dfn" && !hitALink) {
// open the panel
var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
if(dfnPanel) {
dfnPanel.classList.add("on");
var rect = el.getBoundingClientRect();
dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
dfnPanel.style.top = window.scrollY + rect.top + "px";
var panelRect = dfnPanel.getBoundingClientRect();
var panelWidth = panelRect.right - panelRect.left;
if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
// Reposition, because the panel is overflowing
dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
}
} else {
console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
}
} else if(target == "dfn-panel") {
// Switch it to "activated" state, which pins it.
el.classList.add("activated");
el.style.left = null;
el.style.top = null;
}
});
</script> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/benches/files/github_com_17_05_2022.html | HTML |
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars.githubusercontent.com">
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
<link rel="preconnect" href="https://github.githubassets.com" crossorigin>
<link rel="preconnect" href="https://avatars.githubusercontent.com">
<link crossorigin="anonymous" media="all" integrity="sha512-IVVa++hW3DBYJnNsmMMiUwt96BJ1mjUpGNDRWeui5BY1iA04E58M5NujgomnZU9R9DB+H99IlE7a+9b5XlO25g==" rel="stylesheet" href="https://github.githubassets.com/assets/light-21555afbe856.css" /><link crossorigin="anonymous" media="all" integrity="sha512-1KkMNn8M/al/dtzBLupRwkIOgnA9MWkm8oxS+solP87jByEvY/g4BmoxLihRogKcX1obPnf4Yp7dI0ZTWO+ljg==" rel="stylesheet" href="https://github.githubassets.com/assets/dark-d4a90c367f0c.css" /><link data-color-theme="light" crossorigin="anonymous" media="all" integrity="sha512-IVVa++hW3DBYJnNsmMMiUwt96BJ1mjUpGNDRWeui5BY1iA04E58M5NujgomnZU9R9DB+H99IlE7a+9b5XlO25g==" rel="stylesheet" data-href="https://github.githubassets.com/assets/light-21555afbe856.css" /><link data-color-theme="dark" crossorigin="anonymous" media="all" integrity="sha512-1KkMNn8M/al/dtzBLupRwkIOgnA9MWkm8oxS+solP87jByEvY/g4BmoxLihRogKcX1obPnf4Yp7dI0ZTWO+ljg==" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark-d4a90c367f0c.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" integrity="sha512-cZa7DZqvMBwD236uzEunO/G1dvw8/QftyT2UtLWKQFEy0z0eq0R5WPwqVME+3NSZG1YaLJAaIqtU+m0zWf/6SQ==" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-7196bb0d9aaf.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" integrity="sha512-WVoKqJ4y1nLsdNH4RkRT5qrM9+n9RFe1RHSiTnQkBf5TSZkJEc9GpLpTIS7T15EQaUQBJ8BwmKvwFPVqfpTEIQ==" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-595a0aa89e32.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" integrity="sha512-XpAMBMSRZ6RTXgepS8LjKiOeNK3BilRbv8qEiA/M3m+Q4GoqxtHedOI5BAZRikCzfBL4KWYvVzYZSZ8Gp/UnUg==" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-5e900c04c491.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" integrity="sha512-3HF2HZ4LgEIQm77yOzoeR20CX1n2cUQlcywscqF4s+5iplolajiHV7E5ranBwkX65jN9TNciHEVSYebQ+8xxEw==" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-dc71761d9e0b.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" integrity="sha512-+J8j3T0kbK9/sL3zbkCfPtgYcRD4qQfRbT6xnfOrOTjvz4zhr0M7AXPuE642PpaxGhHs1t77cTtieW9hI2K6Gw==" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-f89f23dd3d24.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" integrity="sha512-AQeAx5wHQAXNf0DmkvVlHYwA3f6BkxunWTI0GGaRN57GqD+H9tW8RKIKlopLS0qGaC54seFsPc601GDlqIuuHg==" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-010780c79c07.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" integrity="sha512-+u5pmgAE0T03d/yI6Ha0NWwz6Pk0W6S6WEfIt8veDVdK8NTjcMbZmQB9XUCkDlrBoAKkABva8HuGJ+SzEpV1Uw==" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-faee699a0004.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-YMd2nXIVV2YB7grB+zN8CXqIxYKBZhvhYo+yPFqwCSxl31Q2ElJrLJ49zXBAhxZOrLA/L2DBn9PbHzjoqda88A==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-60c7769d7215.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-b1Jm+CqKWMjmxuPNfWZwQhExfwXqUOxPl62R2ZPP6WnxTPXq0JH4jQVF81E0iJ5CFWZ4PgtLg8W4KDd/O6Stww==" rel="stylesheet" href="https://github.githubassets.com/assets/behaviors-6f5266f82a8a.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-NVKv7E4PttnoKd7TSBEUFmXLKK7+FpfSM3Z3T7ovAaIUvfjH8HIlW/uddV4fnuJUPEOVNOg4Ph0btI0X6WAMKA==" rel="stylesheet" href="https://github.githubassets.com/assets/dashboard-3552afec4e0f.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-+v2WHr4UtaDL6fdxkluL1wuYpxBfShGjHROX50LaiqumKkaM78x6GaeoKfyAjfdYn7d/XkcJ8QkCk3kj0iodmQ==" rel="stylesheet" href="https://github.githubassets.com/assets/site-fafd961ebe14.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-5GHPfse3ElkIL++kNGcn5wKqddNRl+p6kApETJXoBpbLloJ86KOX4lwTbzy59Hkp6NcE50FYs8bCn+x7RXmgVA==" rel="stylesheet" href="https://github.githubassets.com/assets/home-e461cf7ec7b7.css" />
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-lTdozo1jzOqoCvy0nbaMRQMqXdAUhq6xrXXfbCa5nh9Z5h+fOnihFo4CN3vEMkpoIQsRRX98D6Owc14qN8FLVQ==" src="https://github.githubassets.com/assets/runtime-953768ce8d63.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-SpZgKJyhHfrmO9ZLmJztuQzJ+J7tYz7l2uK0FahNXJpiNvVqiy1b2P1HammIlT0b/yoq6M9ZC88oDEuIBe8X+g==" src="https://github.githubassets.com/assets/environment-4a9660289ca1.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-ZAKZQWCEc6bs9LSQOCPRWq3wqRDkQxG2bPL/pW9Lj/Seap0PV0kF/yKCHske8mW3Zytde9n1Im83jxrCmpaMrA==" src="https://github.githubassets.com/assets/5724-640299416084.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-yIsmzjyBs6Mu12a5shTZVT0Jr80it7wV2yjZs77L3GmHoFP5SPNsWY9P+Swu7lPaWMXMtyaxceBQGP/7/Kyl8w==" src="https://github.githubassets.com/assets/93-c88b26ce3c81.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-WtABWNDgj+0Z+nTC8dZsMxFYSujm/s9SJTsHmFnzg73joAek4tmQ1zXCSLBvgAsgdPE8EQuOuOOW0NNP97Y7UA==" src="https://github.githubassets.com/assets/8630-5ad00158d0e0.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-7ocxdRbeEIuk5x86ryHnbc5GBupcna8GP7PEtAqWS0+sMjp4CX10GV5P0XsN7Grx1XTum3BG1FFOwwpccenxkw==" src="https://github.githubassets.com/assets/5157-ee87317516de.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-0Eo1tvk2fS3TaBkpCcX1DHb0QadEpOrHoZhK08d+D7bRyJDo8RjvmwQhFirTGfqxPBNpBSGkbm3qpdTIDNy32A==" src="https://github.githubassets.com/assets/9207-d04a35b6f936.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-fz1GcL6l5OLkR8KJbj+h3RB9xHNT7BqyueLRP99uvAHF/4TINnzrq2EV2R/yEBUIHbxltkEDtCQPCmd7TilyGA==" src="https://github.githubassets.com/assets/github-elements-7f3d4670bea5.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-eJ60/5JwG8wJq9pDYeh89nOoqdR4uiSKaO1ZbhwPIsjLYJKLhMkDzKy90QJHqCOf/5h+gqerAg/ndxX7BncPvA==" src="https://github.githubassets.com/assets/element-registry-789eb4ff9270.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-Hb8d69V10VxkC90NX3zvjNovHq5vrRv0XCde5qNf5WiQAB6BziCN+gEbKG+fDj8i05B2pBdyGIh+3pmaRvzLJA==" src="https://github.githubassets.com/assets/5388-1dbf1debd575.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-JPHg6lXC/kVMbA05VoaD5W739fMUF/ObaJ4NrZWLi91OWI9xEhJ9NtwbGROmxjCm5FGwNOVohY+DXILkO19dtA==" src="https://github.githubassets.com/assets/8932-24f1e0ea55c2.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-EIceiRH5/XsS9RPMOGlnx37yFBM2TbSNcVWgTjKPmRwjdl/lfKNdColL/PLunshA/attRqdYJVnNNGXNyhx6Zw==" src="https://github.githubassets.com/assets/7077-10871e8911f9.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-9mbH9ANKp+mACS9WB6Dwf0B0JST0GGfdf1Cal3BazOkVjhvgxnw3FPD6oNcq/mrsBR8Eowgelgcwvu1KhyUUhQ==" src="https://github.githubassets.com/assets/6262-f666c7f4034a.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-K5XqHZlKou8Ex97bfu02vnw9p1q3z7EXg/hNqwyzevXKd7VQhkOwCH5y4Kx7AQ+wxdF7w2O30sb03ukDwHGVJQ==" src="https://github.githubassets.com/assets/3682-2b95ea1d994a.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-JLnnTPhYd6z7k1g7CjOIUK4YQRvqCzvSNqRq6GH8tenPhyDVVXDp//clwLGS9xZc07/khbn/oI6NNUUUU5viPQ==" src="https://github.githubassets.com/assets/3932-24b9e74cf858.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-oKM9eU+e5IX1sMjw0JZuecikY6Wu0RqZ4ePS/exLKYr4izQhdZC/BVxb9uf29YadFMF+GQRESNBqkjC2238gwQ==" src="https://github.githubassets.com/assets/4924-a0a33d794f9e.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-663xq9kijkU4QUuOOAGKOIzqmpwWu8l2pz8LHmB4w660KvO4SnXw92+kUxfD/gxkC3ETee7v0/HNY3RY4Aa+vQ==" src="https://github.githubassets.com/assets/behaviors-ebadf1abd922.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-nZpgXrBvHm7YePk3m1UhdxY43Ra8lTPxsGk7ocBtGBimPanKdybEgnPXXulh7k7tNLnPzPXFEJ5wY7QGowGOdw==" src="https://github.githubassets.com/assets/7749-9d9a605eb06f.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-KKLG+hE5uCMJHxwocsH3WQNYzT3qftRjkNe7L0b5aOMgoS5iT5oWDIwhiy38adTWwg6xdomYeWvi2+wQBjOBAg==" src="https://github.githubassets.com/assets/notifications-global-28a2c6fa1139.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-hZN/C8dP1MReDsLXTtUc3f0LOjRTx6lJtfLHtplhun0uazPq9xwV77FrhzsPUG+C6SORbdzjueWfFlw5ohmAgw==" src="https://github.githubassets.com/assets/marketing-85937f0bc74f.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-sD0ByN9hdKohKI5O4x8aDCgS3P1dI1FTFJJXvXhWnU7UzRXoZvJemMFx+6r64d+CZOFfNS8nOsc4UY78ktGLsw==" src="https://github.githubassets.com/assets/home-b03d01c8df61.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-8GiDf/OmGRUxPmvFpyo0UlHbuuotpSFGs71Cv3Zm/9/WjyCMcEaDpWt4d+EiYfi+/yZIOkFeKjFNIrUGTmHobg==" src="https://github.githubassets.com/assets/3198-f068837ff3a6.js"></script>
<script crossorigin="anonymous" defer="defer" type="application/javascript" integrity="sha512-cgQPAMzn2i/WtLDx8rAGZxzz/pk1g6oxCgajLr8mtc5dQbfKwSVI0wE+QopUKXo5IBbSXCm+5kVdbOhuMY47Xw==" src="https://github.githubassets.com/assets/webgl-globe-72040f00cce7.js"></script>
<title>GitHub: Where the world builds software · GitHub</title>
<meta name="request-id" content="8BD6:0A89:4E7B89:524FD8:6282CBA3" data-pjax-transient="true"/><meta name="html-safe-nonce" content="674406fdf037543da1d0d1bed9ebd977bdcc4b115426d33ff5ef36686cfbffaa" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QkQ2OjBBODk6NEU3Qjg5OjUyNEZEODo2MjgyQ0JBMyIsInZpc2l0b3JfaWQiOiI0NzI0MTcyMTg0MjI0OTc1Nzc5IiwicmVnaW9uX2VkZ2UiOiJmcmEiLCJyZWdpb25fcmVuZGVyIjoiZnJhIn0=" data-pjax-transient="true"/><meta name="visitor-hmac" content="736335afba2ee84942ce5bb69b08b2cb34adc65865fb5b8275e7f92589c84ece" data-pjax-transient="true"/>
<meta name="page-subject" content="GitHub">
<meta name="github-keyboard-shortcuts" content="dashboards" data-pjax-transient="true" />
<meta name="selected-link" value="/" data-pjax-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY">
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc">
<meta name="octolytics-url" content="https://collector.github.com/github/collect" />
<meta name="viewport" content="width=device-width">
<meta name="description" content="GitHub is where over 83 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and features, power your CI/CD and DevOps workflows, and secure code before you commit it.">
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<meta property="fb:app_id" content="1401488693436528">
<meta name="apple-itunes-app" content="app-id=1477376905" />
<meta name="twitter:image:src" content="https://github.githubassets.com/images/modules/site/social-cards/github-social.png" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="GitHub: Where the world builds software" /><meta name="twitter:description" content="GitHub is where over 83 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat..." />
<meta property="og:image" content="https://github.githubassets.com/images/modules/site/social-cards/github-social.png" /><meta property="og:image:alt" content="GitHub is where over 83 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat..." /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="GitHub: Where the world builds software" /><meta property="og:url" content="https://github.com/" /><meta property="og:description" content="GitHub is where over 83 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat..." />
<link rel="assets" href="https://github.githubassets.com/">
<meta name="hostname" content="github.com">
<meta name="user-login" content="">
<meta name="expected-hostname" content="github.com">
<meta name="enabled-features" content="ACTIONS_INHERIT_SECRETS_REUSABLE_WORKFLOWS">
<meta http-equiv="x-pjax-version" content="3090ae3794f5862e0a2b4f2a4328c9f787054de55163c35856a656b95c6988c2" data-turbo-track="reload">
<meta http-equiv="x-pjax-csp-version" content="8a71cc298af18a4abffe2d93ce3e6650d932e37df2bcd110e9cc81ce4229d217" data-turbo-track="reload">
<meta http-equiv="x-pjax-css-version" content="843bcadf81c2bc96dbc1edf58d8e49701077503fb9031be7661549583cafb8bd" data-turbo-track="reload">
<meta http-equiv="x-pjax-js-version" content="3ec9943f727b233d88dc5a88713e1631ae76fd40f5754f8afcae0b5f5fbb8cdb" data-turbo-track="reload">
<meta name="turbo-cache-control" content="no-preview">
<meta name="homepage-version-ga-dimension" content ="dimension11">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="620">
<link rel="preload" href="/webgl-globe/data/data.json" as="fetch" type="application/json">
<link rel="preload" href="https://github.githubassets.com/static/fonts/alliance/Alliance-No-1-ExtraBold.woff2" as="font" type="font/woff" crossorigin>
<link rel="preload" href="https://github.githubassets.com/static/fonts/alliance/Alliance-No-1-Regular.woff2" as="font" type="font/woff" crossorigin>
<link rel="canonical" href="https://github.com/" data-pjax-transient>
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<meta name="browser-optimizely-client-errors-url" content="https://api.github.com/_private/browser/optimizely_client/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000">
<link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png">
<link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327">
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-out env-production page-responsive header-overlay" style="word-wrap: break-word;">
<div class="position-relative js-header-wrapper ">
<a href="#start-of-content" class="px-2 py-4 color-bg-accent-emphasis color-fg-on-emphasis show-on-focus js-skip-to-content">Skip to content</a>
<span data-view-component="true" class="progress-pjax-loader js-pjax-loader-bar Progress position-fixed width-full">
<span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis"></span>
</span>
<header class="Header-old header-logged-out js-details-container Details position-relative f4 py-2" role="banner">
<div class="container-xl d-lg-flex flex-items-center p-responsive">
<div class="d-flex flex-justify-between flex-items-center">
<a class="mr-4 color-fg-inherit" href="https://github.com/" aria-label="Homepage" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark">
<svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github">
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path>
</svg>
</a>
<div class="d-lg-none css-truncate css-truncate-target width-fit p-2">
</div>
<div class="d-flex flex-items-center">
<a href="/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F&source=header-home"
class="d-inline-block d-lg-none f5 no-underline border color-border-default rounded-2 px-2 py-1 mr-3 mr-sm-5 color-fg-inherit"
data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/","user_id":null}}" data-hydro-click-hmac="520d87e8f83281e6946b192f0f840552721c7fcba9b9c36d802e898a816314e2"
>
Sign up
</a>
<button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target btn-link d-lg-none mt-1 color-fg-inherit"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-three-bars">
<path fill-rule="evenodd" d="M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"></path>
</svg>
</button> </div>
</div>
<div class="HeaderMenu HeaderMenu--logged-out position-fixed top-0 right-0 bottom-0 height-fit position-lg-relative d-lg-flex flex-justify-between flex-items-center flex-auto">
<div class="d-flex d-lg-none flex-justify-end border-bottom color-bg-subtle p-3">
<button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target btn-link"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-x color-fg-muted">
<path fill-rule="evenodd" d="M5.72 5.72a.75.75 0 011.06 0L12 10.94l5.22-5.22a.75.75 0 111.06 1.06L13.06 12l5.22 5.22a.75.75 0 11-1.06 1.06L12 13.06l-5.22 5.22a.75.75 0 01-1.06-1.06L10.94 12 5.72 6.78a.75.75 0 010-1.06z"></path>
</svg>
</button> </div>
<nav class="mt-0 px-3 px-lg-0 mb-5 mb-lg-0" aria-label="Global">
<ul class="d-lg-flex list-style-none">
<li class="mr-0 mr-lg-3 position-relative flex-wrap flex-justify-between flex-items-center border-bottom border-lg-bottom-0 d-block d-lg-flex flex-lg-nowrap flex-lg-items-center">
<details class="HeaderMenu-details details-overlay details-reset width-full">
<summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-block d-lg-inline-block">
Product
<svg x="0" y="0" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-absolute position-lg-relative"><path d="M1,1l6.2,6L13,1"></path></svg>
</summary>
<div class="dropdown-menu flex-auto rounded px-0 mt-0 pb-4 p-lg-4 position-relative position-lg-absolute left-0 left-lg-n4">
<ul class="list-style-none f5 pb-1">
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--primary text-bold py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Features","label":"ref_page:/;ref_cta:Features;"}" href="/features">
Features
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Mobile","label":"ref_page:/;ref_cta:Mobile;"}" href="/mobile">
Mobile
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Actions","label":"ref_page:/;ref_cta:Actions;"}" href="/features/actions">
Actions
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Codespaces","label":"ref_page:/;ref_cta:Codespaces;"}" href="/features/codespaces">
Codespaces
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Packages","label":"ref_page:/;ref_cta:Packages;"}" href="/features/packages">
Packages
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Security","label":"ref_page:/;ref_cta:Security;"}" href="/features/security">
Security
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Code review","label":"ref_page:/;ref_cta:Code review;"}" href="/features/code-review">
Code review
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Issues","label":"ref_page:/;ref_cta:Issues;"}" href="/features/issues">
Issues
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Integrations","label":"ref_page:/;ref_cta:Integrations;"}" href="/features/integrations">
Integrations
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--primary text-bold border-top pt-4 pb-2 mt-3" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to GitHub Sponsors","label":"ref_page:/;ref_cta:GitHub Sponsors;"}" href="/sponsors">
GitHub Sponsors
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--primary text-bold py-2" data-analytics-event="{"category":"Header dropdown (logged out), Product","action":"click to go to Customer stories","label":"ref_page:/;ref_cta:Customer stories;"}" href="/customer-stories">
Customer stories
</a> </li>
</ul>
</div>
</details>
</li>
<li class="mr-0 mr-lg-3 position-relative flex-wrap flex-justify-between flex-items-center border-bottom border-lg-bottom-0 d-block d-lg-flex flex-lg-nowrap flex-lg-items-center">
<a class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-analytics-event="{"category":"Header menu top item (logged out)","action":"click to go to Team","label":"ref_page:/;ref_cta:Team;"}" href="/team">Team</a>
</li>
<li class="mr-0 mr-lg-3 position-relative flex-wrap flex-justify-between flex-items-center border-bottom border-lg-bottom-0 d-block d-lg-flex flex-lg-nowrap flex-lg-items-center">
<a class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-analytics-event="{"category":"Header menu top item (logged out)","action":"click to go to Enterprise","label":"ref_page:/;ref_cta:Enterprise;"}" href="/enterprise">Enterprise</a>
</li>
<li class="mr-0 mr-lg-3 position-relative flex-wrap flex-justify-between flex-items-center border-bottom border-lg-bottom-0 d-block d-lg-flex flex-lg-nowrap flex-lg-items-center">
<details class="HeaderMenu-details details-overlay details-reset width-full">
<summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-block d-lg-inline-block">
Explore
<svg x="0" y="0" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-absolute position-lg-relative"><path d="M1,1l6.2,6L13,1"></path></svg>
</summary>
<div class="dropdown-menu flex-auto rounded px-0 mt-0 pb-4 p-lg-4 position-relative position-lg-absolute left-0 left-lg-n4">
<ul class="list-style-none f5 pb-1">
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--primary text-bold py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to Explore GitHub","label":"ref_page:/;ref_cta:Explore GitHub;"}" href="/explore">
Explore GitHub
</a> </li>
<li class="color-fg-muted text-normal f6 text-mono mb-1 border-top pt-3 mt-3 mb-1">Learn and contribute</li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to Topics","label":"ref_page:/;ref_cta:Topics;"}" href="/topics">
Topics
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to Collections","label":"ref_page:/;ref_cta:Collections;"}" href="/collections">
Collections
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to Trending","label":"ref_page:/;ref_cta:Trending;"}" href="/trending">
Trending
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to Learning Lab","label":"ref_page:/;ref_cta:Learning Lab;"}" href="https://lab.github.com/">
Learning Lab
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to Open source guides","label":"ref_page:/;ref_cta:Open source guides;"}" href="https://opensource.guide">
Open source guides
</a> </li>
<li class="color-fg-muted text-normal f6 text-mono mb-1 border-top pt-3 mt-3 mb-1">Connect with others</li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to The ReadME Project","label":"ref_page:/;ref_cta:The ReadME Project;"}" href="/readme">
The ReadME Project
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to Events","label":"ref_page:/;ref_cta:Events;"}" href="/events">
Events
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to Community forum","label":"ref_page:/;ref_cta:Community forum;"}" href="https://github.community">
Community forum
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to GitHub Education","label":"ref_page:/;ref_cta:GitHub Education;"}" href="https://education.github.com">
GitHub Education
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Explore","action":"click to go to GitHub Stars program","label":"ref_page:/;ref_cta:GitHub Stars program;"}" href="https://stars.github.com">
GitHub Stars program
</a> </li>
</ul>
</div>
</details>
</li>
<li class="mr-0 mr-lg-3 position-relative flex-wrap flex-justify-between flex-items-center border-bottom border-lg-bottom-0 d-block d-lg-flex flex-lg-nowrap flex-lg-items-center">
<a class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-analytics-event="{"category":"Header menu top item (logged out)","action":"click to go to Marketplace","label":"ref_page:/;ref_cta:Marketplace;"}" href="/marketplace">Marketplace</a>
</li>
<li class="mr-0 mr-lg-3 position-relative flex-wrap flex-justify-between flex-items-center border-bottom border-lg-bottom-0 d-block d-lg-flex flex-lg-nowrap flex-lg-items-center">
<details class="HeaderMenu-details details-overlay details-reset width-full">
<summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-block d-lg-inline-block">
Pricing
<svg x="0" y="0" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-absolute position-lg-relative"><path d="M1,1l6.2,6L13,1"></path></svg>
</summary>
<div class="dropdown-menu flex-auto rounded px-0 mt-0 pb-4 p-lg-4 position-relative position-lg-absolute left-0 left-lg-n4">
<ul class="list-style-none f5 pb-1">
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--primary text-bold py-2" data-analytics-event="{"category":"Header dropdown (logged out), Pricing","action":"click to go to Plans","label":"ref_page:/;ref_cta:Plans;"}" href="/pricing">
Plans
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Pricing","action":"click to go to Compare plans","label":"ref_page:/;ref_cta:Compare plans;"}" href="/pricing#compare-features">
Compare plans
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--secondary py-2" data-analytics-event="{"category":"Header dropdown (logged out), Pricing","action":"click to go to Contact Sales","label":"ref_page:/;ref_cta:Contact Sales;"}" href="https://github.com/enterprise/contact">
Contact Sales
</a> </li>
<li>
<a class="lh-condensed-ultra d-block no-underline position-relative Link--primary text-bold border-top pt-4 pb-2 mt-3" data-analytics-event="{"category":"Header dropdown (logged out), Pricing","action":"click to go to Education","label":"ref_page:/;ref_cta:Education;"}" href="https://education.github.com">
Education
</a> </li>
</ul>
</div>
</details>
</li>
</ul>
</nav>
<div class="d-lg-flex flex-items-center px-3 px-lg-0 text-center text-lg-left">
<div class="d-lg-flex min-width-0 mb-3 mb-lg-0">
<div class="header-search flex-auto js-site-search position-relative flex-self-stretch flex-md-self-auto mb-3 mb-md-0 mr-0 mr-md-3 js-jump-to"
>
<div class="position-relative">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" role="search" aria-label="Site" data-unscoped-search-url="/search" data-turbo="false" action="/search" accept-charset="UTF-8" method="get">
<label class="form-control input-sm header-search-wrapper p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center">
<input type="text"
class="form-control input-sm header-search-input jump-to-field js-jump-to-field js-site-search-focus "
data-hotkey=s,/
name="q"
data-test-selector="nav-search-input"
placeholder="Search GitHub"
data-unscoped-placeholder="Search GitHub"
data-scoped-placeholder="Search"
autocapitalize="off"
role="combobox"
aria-haspopup="listbox"
aria-expanded="false"
aria-autocomplete="list"
aria-controls="jump-to-results"
aria-label="Search GitHub"
data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations"
spellcheck="false"
autocomplete="off"
>
<input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="9yN6dnoB/G9LPVrOdo7wdKQ0AwfjEEiUzqABoouv3hpmh0WsU9pB/ImIk7Ho/UhSUvguqb3FK1gwfvH+Kbz3hg==" />
<input type="hidden" class="js-site-search-type-field" name="type" >
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1 header-search-key-slash"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg>
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<ul class="d-none js-jump-to-suggestions-template-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-suggestion" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="" data-item-type="suggestion">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0">
<path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path>
</svg>
<svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0">
<path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path>
</svg>
<svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0">
<path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path>
</svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in all of GitHub">
Search
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
</ul>
<ul class="d-none js-jump-to-no-results-template-container">
<li class="d-flex flex-justify-center flex-items-center f5 d-none js-jump-to-suggestion p-2">
<span class="color-fg-muted">No suggested jump to results</span>
</li>
</ul>
<ul id="jump-to-results" role="listbox" class="p-0 m-0 js-navigation-container jump-to-suggestions-results-container js-jump-to-suggestions-results-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-scoped-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="" data-item-type="scoped_search">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0">
<path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path>
</svg>
<svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0">
<path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path>
</svg>
<svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0">
<path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path>
</svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in all of GitHub">
Search
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-owner-scoped-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="" data-item-type="owner_scoped_search">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0">
<path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path>
</svg>
<svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0">
<path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path>
</svg>
<svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0">
<path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path>
</svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in all of GitHub">
Search
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-global-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="" data-item-type="global_search">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0">
<path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path>
</svg>
<svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0">
<path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path>
</svg>
<svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0">
<path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path>
</svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in all of GitHub">
Search
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
</ul>
</div>
</label>
</form> </div>
</div>
</div>
<div class="position-relative mr-3 mb-4 mb-lg-0 d-inline-block">
<a href="/login"
class="HeaderMenu-link flex-shrink-0 no-underline"
data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/","user_id":null}}" data-hydro-click-hmac="cd4f672ed9a2fa51ea92c28de162e81edb2d11a2aad6884ec89a6d60b21b1cfb"
data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">
Sign in
</a>
</div>
<a href="/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F&source=header-home"
class="HeaderMenu-link flex-shrink-0 d-inline-block no-underline border color-border-default rounded px-2 py-1"
data-hydro-click="{"event_type":"authentication.click","payload":{"location_in_page":"site header menu","repository_id":null,"auth_type":"SIGN_UP","originating_url":"https://github.com/","user_id":null}}" data-hydro-click-hmac="cd4f672ed9a2fa51ea92c28de162e81edb2d11a2aad6884ec89a6d60b21b1cfb"
data-analytics-event="{"category":"Sign up","action":"click to sign up for account","label":"ref_page:/;ref_cta:Sign up;ref_loc:header logged out"}"
>
Sign up
</a>
</div>
</div>
</div>
</header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div data-pjax-replace id="js-flash-container">
<template class="js-flash-template">
<div class="flash flash-full {{ className }}">
<div class="px-2" >
<button class="flash-close js-flash-close" type="button" aria-label="Dismiss this message">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
<path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path>
</svg>
</button>
<div>{{ message }}</div>
</div>
</div>
</template>
</div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div
class="application-main "
data-commit-hovercards-enabled
data-discussion-hovercards-enabled
data-issue-and-pr-hovercards-enabled
>
<main class="font-mktg">
<div class="overflow-hidden">
<div class="home-hero-container position-relative js-webgl-globe-data">
<div class="home-hero position-absolute z-1 top-0 right-0 bottom-0 left-0 overflow-hidden">
<div class="d-flex flex-column flex-justify-between mx-auto container-xl p-responsive height-full pb-md-9">
<div class="d-flex gutter gutter-spacious flex-column flex-lg-row flex-items-center height-full px-0 px-lg-3">
<div class="ml-md-n3 mr-md-3 col-12 col-lg-6 text-center text-md-left">
<h1 class="h1-mktg color-text-white mb-3 position-relative z-2"> Where the world builds software </h1>
<p class="f2-mktg text-normal text-gray-light-mktg mr-lg-n4 mb-4 position-relative z-2">Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.</p>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form data-turbo="false" class="mx-auto mx-md-0 col-5-max js-signup-form position-relative z-2" autocomplete="off" action="/signup" accept-charset="UTF-8" method="get"> <div class="d-flex flex-column flex-sm-row flex-items-center">
<dl class="col-12 my-0 pb-2 pb-sm-0 pr-0 pr-sm-2 flex-auto">
<dt>
<label for="user_email" class="sr-only">Email address</label>
</dt>
<dd>
<input class="form-control border-0 f4-mktg py-3 px-4 width-full" style="height: 3rem" placeholder="Email address" type="email" name="user_email" id="user_email" autocomplete="off" spellcheck="false">
</dd>
</dl>
<input type="hidden" name="source" value="form-home-signup">
<button class="btn-mktg width-full width-sm-auto btn-signup-mktg" data-analytics-event="{"category":"Sign up","action":"click to sign up for account","label":"ref_page:/;ref_cta:Sign up for GitHub;ref_loc:hero launchpad"}" type="submit">
Sign up for GitHub
</button>
</div>
</form>
<div class="position-lg-absolute bottom-lg-8 left-lg-0 right-lg-0 mt-4 z-1 position-relative">
<div class="container-xl mx-auto px-lg-3">
<div class="py-4" style="border-top: 1px solid rgba(255,255,255,0.1)">
<div class="d-flex gutter-condensed gutter-md-spacious col-12 col-lg-8 flex-justify-between text-md-left">
<div class="col-6 col-sm-4 col-md-3">
<h2 class="f3-mktg text-mono color-text-white text-normal no-wrap">83<span class="text-white-fade">+</span> million</h2>
<p class="m-0 text-mono text-white-fade f6-mktg">Developers</p>
</div>
<div class="col-6 col-sm-4 col-md-3">
<h2 class="f3-mktg text-mono color-text-white text-normal no-wrap">4<span class="text-white-fade">+</span> million</h2>
<p class="m-0 text-mono text-white-fade f6-mktg">Organizations</p>
</div>
<div class="col-sm-4 col-md-3 d-none d-md-block">
<h2 class="f3-mktg text-mono color-text-white text-normal no-wrap">200<span class="text-white-fade">+</span> million</h2>
<p class="m-0 text-mono text-white-fade f6-mktg">Repositories</p>
</div>
<div class="col-3 d-none d-sm-block">
<h3 class="f3-mktg text-mono color-text-white text-normal no-wrap">90%</h3>
<p class="m-0 text-mono text-white-fade f6-mktg">Fortune 100</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 text-center text-md-left position-relative">
<div class="home-globe-container home-globe-container-webgl">
<div class="mx-auto width-full mt-n9 mt-lg-2 home-globe position-relative height-full js-webgl-globe">
<video width="916" height="918" loop muted playsinline preload="none" class="home-globe-container-video js-globe-fallback-video " hidden>
<source type="video/mp4; codecs=hevc,mp4a.40.2" src="https://github.githubassets.com/images/modules/site/home/globe-900.hevc.mp4">
<source type="video/mp4; codecs=avc1.4D401E,mp4a.40.2" src="https://github.githubassets.com/images/modules/site/home/globe-900.h264.mp4">
</video>
<video loop muted playsinline preload="none" class="home-globe-container-video js-globe-fallback-video-small" hidden>
<source type="video/mp4; codecs=hevc,mp4a.40.2" src="https://github.githubassets.com/images/modules/site/home/globe-500.hevc.mp4">
<source type="video/mp4; codecs=avc1.4D401E,mp4a.40.2" src="https://github.githubassets.com/images/modules/site/home/globe-500.h264.mp4">
</video>
<img
srcset="https://github.githubassets.com/images/modules/site/home/globe-700.jpg 700w,
https://github.githubassets.com/images/modules/site/home/globe.jpg 1400w"
sizes="(max-width: 700px) 70vw, 700px"
src="https://github.githubassets.com/images/modules/site/home/globe.jpg"
alt="Planet earth with visualization of GitHub activity crossing the globe"
class="width-full height-auto js-globe-fallback-image"
loading="lazy"
decoding="async"
width="1238"
height="1404"
hidden
>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" height="704" viewBox="0 0 704 704" width="704" class="js-webgl-globe-loading position-absolute left-0 right-0 top-0 bottom-0" style="margin: auto; transform: scale(0.8)"><filter id="a" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="560" width="560" x="70" y="70"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" mode="normal" result="shape"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dx="2" dy="2"></feOffset><feGaussianBlur stdDeviation="7.5"></feGaussianBlur><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.447059 0 0 0 0 0.643137 0 0 0 0 0.988235 0 0 0 0.49 0"></feColorMatrix><feBlend in2="shape" mode="normal" result="effect1_innerShadow"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dx="1" dy="1"></feOffset><feGaussianBlur stdDeviation="3"></feGaussianBlur><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.625 0 0 0 0 0.9325 0 0 0 0 1 0 0 0 0.32 0"></feColorMatrix><feBlend in2="effect1_innerShadow" mode="normal" result="effect2_innerShadow"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dx="-10" dy="-10"></feOffset><feGaussianBlur stdDeviation="3"></feGaussianBlur><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend in2="effect2_innerShadow" mode="normal" result="effect3_innerShadow"></feBlend></filter><radialGradient id="b" cx="0" cy="0" gradientTransform="matrix(-199.20400108 -199.20400108 199.20400108 -199.20400108 332.08 338.37)" gradientUnits="userSpaceOnUse" r="1"><stop offset=".875" stop-color="#fff"></stop><stop offset=".937507" stop-color="#3e68ff"></stop><stop offset="1" stop-color="#03009f" stop-opacity="0"></stop></radialGradient><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="352" x2="352" y1="331" y2="628"><stop offset="0" stop-color="#06060e"></stop><stop offset="1" stop-color="#0f0e20"></stop></linearGradient><radialGradient id="d" cx="0" cy="0" gradientTransform="matrix(-5.99972278 523.99965313 -523.99965313 -5.99972278 170 147)" gradientUnits="userSpaceOnUse" r="1"><stop offset="0" stop-color="#4b60fb"></stop><stop offset=".565687" stop-color="#33205d"></stop><stop offset="1" stop-color="#33205d" stop-opacity="0"></stop></radialGradient><radialGradient id="e" cx="0" cy="0" gradientTransform="matrix(41.99992987 206.0000547 -206.0000547 41.99992987 292 327)" gradientUnits="userSpaceOnUse" r="1"><stop offset="0" stop-color="#354097"></stop><stop offset="1" stop-color="#243273" stop-opacity="0"></stop></radialGradient><radialGradient id="f" cx="0" cy="0" gradientTransform="matrix(-84.00137423 185.99914213 -185.99914213 -84.00137423 462 399)" gradientUnits="userSpaceOnUse" r="1"><stop offset="0" stop-color="#040d20"></stop><stop offset="1" stop-color="#040d20" stop-opacity="0"></stop></radialGradient><circle cx="352" cy="352" fill="url(#b)" r="303" transform="matrix(.98453041 .1752138 -.1752138 .98453041 67.120553 -56.22996)"></circle><g filter="url(#a)"><circle cx="352" cy="352" fill="url(#c)" r="276"></circle><circle cx="352" cy="352" fill="url(#d)" r="276"></circle><circle cx="352" cy="352" fill="url(#e)" r="276"></circle><circle cx="352" cy="352" fill="url(#f)" r="276"></circle></g></svg>
</div>
</div>
</div>
</div>
</div>
<img src="https://github.githubassets.com/images/modules/site/home/hero-glow.svg" alt="Glowing universe" class="position-absolute home-hero-glow events-none z-1">
<video loop muted playsinline preload="none" class="js-globe-aurora position-absolute top-0 left-0 right-0 bottom-0" style="margin: auto; z-index: -1; min-width: 100%; min-height: 100%;" hidden>
<source type="video/mp4; codecs=avc1.4D401E,mp4a.40.2" src="https://github.githubassets.com/images/modules/site/home/aurora.h264.mp4">
</video>
</div>
<div class="position-absolute width-full color-bg-default" style="bottom: -4rem;">
<div class="container-xl p-responsive">
<div class="d-flex flex-justify-center flex-lg-justify-end color-bg-default">
<div class="col-8 col-sm-7 col-md-6 col-lg-5 position-relative z-2 right-lg-n12 events-none">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/astro-mona.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/astro-mona.svg" width="960" height="967" class="home-astro-mona width-full position-absolute bottom-0 height-auto" alt="Mona looking at GitHub activity across the globe">
</picture>
</div>
</div>
</div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" preserveAspectRatio="none" viewBox="0 0 1680 40" class="position-absolute width-full z-1" style="bottom: -1px;"><path d="M0 40h1680V30S1340 0 840 0 0 30 0 30z" fill="#fff"></path></svg>
</div>
<div class="mx-auto container-xl p-responsive py-8 py-md-9 overflow-hidden d-flex gutter gutter-spacious js-build-in-trigger" data-build-margin-bottom="20">
<div class="js-build-in-item build-in-scale-up color-bg-default col-10-max mx-auto">
<div class="d-flex position-relative rounded-2 box-shadow-card-border-mktg overflow-hidden">
<div class="col-5-max mx-auto mx-md-0">
<div class="col-12 col-md-9 px-4 pl-md-7 pt-4 py-md-6 mb-md-0 position-relative z-1 text-center text-md-left" style="margin-bottom: 25%; box-shadow: 0 0 50px 30px #fff">
<h2 class="h5-mktg mb-1 mx-auto mx-md-0" style="max-width: 310px;"><span class="text-gray-mktg">Build like the best with GitHub Enterprise</span></h2>
<p class="f5-mktg text-gray-mktg mx-auto mx-md-0" style="max-width: 380px;">Take collaboration to the next level with security and administrative features built for teams.</p>
<div class="d-flex flex-column flex-sm-row flex-items-center flex-justify-center flex-md-justify-start">
<a class="btn-mktg mb-3 mb-sm-0 mr-sm-2 btn-muted-mktg" data-analytics-event="{"category":"Start a free trial","action":"click to set up Enterprise trial","label":"ref_page:/;ref_cta:Start a free trial;ref_loc:billboard launchpad"}" href="/organizations/enterprise_plan?ref_cta=Start%2520a%2520free%2520trial&ref_loc=billboard&ref_page=%2F" data-test-selector="start-trial-button">
Start a free trial
</a>
<a class="btn-mktg btn-subtle-mktg" data-analytics-event="{"category":"Contact Sales","action":"click to Contact Sales","label":"ref_page:/;ref_cta:Contact Sales;ref_loc:billboard launchpad;","ref_loc":"billboard launchpad"}" href="https://github.com/enterprise/contact?ref_page=/&ref_cta=Contact%20Sales&ref_loc=billboard%20launchpad">
Contact Sales
</a>
</div>
</div>
</div>
<div class="col-12 col-md-8 position-absolute text-right position-relative height-full right-0">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/enterprise-city-w-logos.jpg?width=1376 1376w,https://github.githubassets.com/images/modules/site/home/enterprise-city-w-logos.jpg?width=1100 1100w,https://github.githubassets.com/images/modules/site/home/enterprise-city-w-logos.jpg?width=825 825w,https://github.githubassets.com/images/modules/site/home/enterprise-city-w-logos.jpg?width=688 688w,https://github.githubassets.com/images/modules/site/home/enterprise-city-w-logos.jpg?width=550 550w,https://github.githubassets.com/images/modules/site/home/enterprise-city-w-logos.jpg?width=275 275w" sizes="(max-width: 1120px) 60vw, 688px" type="image/jpeg"></source>
<img class="width-full height-auto position-absolute right-0 bottom-0" width="1376" height="436" loading="lazy" decoding="async" alt="" src="https://github.githubassets.com/images/modules/site/home/enterprise-city-w-logos.jpg?width=1376" />
</picture>
</div>
</div>
</div>
</div>
</div>
<div class="position-relative pt-5 mt-5">
<div class="sub-nav-mktg js-toggler-container js-sticky js-position-sticky top-0 width-full z-3 scrollnav">
<div class="container-xl sub-nav-mktg-wrapper d-flex flex-items-center p-3">
<button type="button" class="btn-octicon sub-nav-mktg-toggle d-lg-none p-1 flex-order-1 float-right js-toggler-target" aria-label="Toggle page navigation">
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-chevron-down on-hidden">
<path fill-rule="evenodd" d="M5.22 8.72a.75.75 0 000 1.06l6.25 6.25a.75.75 0 001.06 0l6.25-6.25a.75.75 0 00-1.06-1.06L12 14.44 6.28 8.72a.75.75 0 00-1.06 0z"></path>
</svg>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-x on-visible">
<path fill-rule="evenodd" d="M5.72 5.72a.75.75 0 011.06 0L12 10.94l5.22-5.22a.75.75 0 111.06 1.06L13.06 12l5.22 5.22a.75.75 0 11-1.06 1.06L12 13.06l-5.22 5.22a.75.75 0 01-1.06-1.06L10.94 12 5.72 6.78a.75.75 0 010-1.06z"></path>
</svg>
</button>
<div class="sub-nav-mktg-links flex-auto f4-mktg d-lg-flex flex-lg-justify-around">
<a href="#home-code" class="sub-nav-mktg-link Link--primary no-underline py-1 py-lg-2 js-scrollnav-item js-smoothscroll-anchor" data-analytics-event="{"category":"Homepage","action":"click nav item to scroll to Code","label":"ref_page:/;ref_cta:Code;"}">Code</a>
<a href="#home-collaborate" class="sub-nav-mktg-link Link--primary no-underline py-1 py-lg-2 js-scrollnav-item js-smoothscroll-anchor" data-analytics-event="{"category":"Homepage","action":"click nav item to scroll to Collaborate","label":"ref_page:/;ref_cta:Code;"}">Collaborate</a>
<a href="#home-develop" class="sub-nav-mktg-link Link--primary no-underline py-1 py-lg-2 js-scrollnav-item js-smoothscroll-anchor" data-analytics-event="{"category":"Homepage","action":"click nav item to scroll to Develop","label":"ref_page:/;ref_cta:Code;"}">Develop</a>
<a href="#home-automate" class="sub-nav-mktg-link Link--primary no-underline py-1 py-lg-2 js-scrollnav-item js-smoothscroll-anchor" data-analytics-event="{"category":"Homepage","action":"click nav item to scroll to Automate","label":"ref_page:/;ref_cta:Code;"}">Automate</a>
<a href="#home-secure" class="sub-nav-mktg-link Link--primary no-underline py-1 py-lg-2 js-scrollnav-item js-smoothscroll-anchor" data-analytics-event="{"category":"Homepage","action":"click nav item to scroll to Secure","label":"ref_page:/;ref_cta:Code;"}">Secure</a>
<a href="#home-community" class="sub-nav-mktg-link Link--primary no-underline py-1 py-lg-2 js-scrollnav-item js-smoothscroll-anchor" data-analytics-event="{"category":"Homepage","action":"click nav item to scroll to Community","label":"ref_page:/;ref_cta:Code;"}">Community</a>
</div>
<div class="sub-nav-mktg-ctas ml-lg-3">
<a class="btn-mktg ml-lg-2 mt-2 mt-lg-0 d-block d-lg-inline-block btn-signup-mktg" data-analytics-event="{"category":"Homepage","action":"click to Sign up","label":"ref_page:/;ref_cta:Sign up;ref_loc:Homepage;","ref_loc":"Homepage"}" href="/join?ref_cta=Sign+up&ref_loc=homepage+sticky+nav&ref_page=%2F&source=homepage-sticky-nav">
Sign up
<svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</div>
</div>
</div>
<div class="overflow-hidden">
<meta property="page-title" content="GitHub: Where the world builds software">
<meta property="page-description" content="GitHub is where over 83 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and features, power your CI/CD and DevOps workflows, and secure code before you commit it.">
<div class="position-relative z-2 mx-auto box-shadow-default-mktg wide-block js-section" id="home-code" data-color-mode=dark data-light-theme=light data-dark-theme=dark>
<div class="container-xl p-responsive">
<div class="d-flex flex-column gutter gutter-spacious">
<div class="col-12 col-sm-10 offset-sm-1">
<div class="col-6-max">
<h2 class="h2-mktg color-fg-default mb-6 mb-md-8 text-gradient-mint-blue-dark">Give your code a home in the cloud</h2>
</div>
</div>
<div class="col-11 col-sm-10 offset-1">
<ul class="home-git-log-dark d-flex gutter gutter-spacious flex-column list-style-none pb-5">
<li class="col-12 col-md-9 col-lg-6 mt-n3 pb-4">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="f2-mktg text-gray-light-mktg text-semibold mb-3">Record or rewind any change to your code to keep you and your team in sync. <span class="color-fg-default">Host it all for free with unlimited public and private repositories.</span></h3>
<a class="link-mktg text-semibold color-fg-default py-1 f4-mktg link-emphasis-mktg" href="/signup" data-analytics-event="{"category":"Sign up","action":"click to sign up for account","label":"ref_page:/;ref_cta:Sign up for GitHub;ref_loc:code launchpad"}">
Sign up for GitHub <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</li>
<li class="col-12 d-flex flex-items-center position-relative f5-mktg text-gray-light-mktg py-2 unselectable" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 32" aria-hidden="true" class="home-git-icon home-git-item flex-shrink-0 mr-3 position-relative z-1" height="32" width="28"><g fill="#fff"><path d="m17.8 24.4h-11c-.6 0-1.1-.5-1.1-1.1v-1.3c0-.8.6-1.4 1.4-1.4h7.2c.5 0 .9-.4.9-.9s-.4-.9-.9-.9h-7.3c-.5 0-.9.1-1.4.3v-12.3c0-.6.5-1.1 1.1-1.1h13.6v6.9c0 .5.4.9.9.9s.9-.4.9-.9v-7.8c0-.5-.4-.9-.9-.9h-14.4c-1.6 0-2.9 1.3-2.9 2.9v16.5c0 1.6 1.3 2.9 2.9 2.9h11c.5 0 .9-.4.9-.9s-.5-.9-.9-.9z"></path><path d="m25.4 19.2-3.5-3.8c-.3-.4-.9-.4-1.3 0l-3.5 3.8c-.2.2-.2.4-.2.6s.1.4.3.6.4.3.6.2c.2 0 .4-.1.6-.3l2-2.1v9c0 .5.4.9.9.9s.9-.4.9-.9v-9l2 2.1c.2.2.4.3.6.3s.5-.1.6-.2c.2-.2.3-.4.3-.6-.1-.3-.2-.5-.3-.6z"></path></g></svg>
<span class="text-truncate"><strong class="text-bold color-fg-default">jasonetco</strong> added some commits 8 minutes ago</span>
</li>
<li class="col-12 d-flex flex-items-center position-relative f6-mktg text-mono text-gray-light-mktg py-2 unselectable" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="22" width="28" aria-hidden="true" class="home-git-icon home-git-item flex-shrink-0 mr-3 position-relative z-1"><path d="m2.5 10a1 1 0 1 0 0 2zm23 2a1 1 0 1 0 0-2zm-23 0h23v-2h-23z" fill="#465061"></path><circle cx="14" cy="11" fill="#041027" r="5" stroke="#465061" stroke-width="2"></circle></svg>
<img src="https://avatars.githubusercontent.com/jasonetco?s=64&v=4" class="d-none d-sm-block flex-shrink-0 opacity-4 avatar avatar-4 mr-3 circle color-bg-subtle" alt="@jasonetco" decoding="async">
<span class="opacity-4 text-truncate">Updated README.md</span>
</li>
</ul>
</div>
<div class="col-12 position-relative">
<div class="home-repo-comp position-relative py-3">
<div class="position-relative z-2 js-build-in build-in-scale-up js-build-in-trigger js-type-in-trigger">
<div class="home-repo-comp-browser rounded-2 box-shadow-default-mktg position-absolute z-1 top-0 left-0 right-0 box-shadow-active-border-light-mktg js-build-in-item" style="font-size: 0;">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/repo-browser.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/repo-browser.png" class="width-full height-auto" width="2496" height="1480" alt="The resulting GitHub repository page from pushing" decoding="async">
</picture>
</div>
<div class="home-repo-editor rounded-2 position-relative mr-n1 ml-n1 mr-md-0 ml-md-0 overflow-hidden js-build-in-item">
<div class="d-flex position-absolute top-0 right-0 bottom-0 left-0 home-repo-editor-ui js-build-in-item">
<div class="col-3 d-none d-lg-block">
<div class="d-flex home-repo-editor-filetree height-full flex-column py-2">
<div class="d-flex py-1 px-3">
<img src="https://github.githubassets.com/images/modules/site/home/icons/folder.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>octocat-classifier</div>
</div>
<div class="d-flex py-1 px-4">
<img src="https://github.githubassets.com/images/modules/site/home/icons/folder.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>assets</div>
</div>
<div class="opacity-4 d-flex py-1 px-4">
<img src="https://github.githubassets.com/images/modules/site/home/icons/folder.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>tests</div>
</div>
<div class="d-flex py-1 px-3">
<img src="https://github.githubassets.com/images/modules/site/home/icons/file.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>LICENSE</div>
</div>
<div class="d-flex py-1 px-3">
<img src="https://github.githubassets.com/images/modules/site/home/icons/file.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>README.md</div>
</div>
<div class="d-flex py-1 px-3">
<img src="https://github.githubassets.com/images/modules/site/home/icons/file.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>index.js</div>
</div>
<div class="d-flex py-1 px-3">
<img src="https://github.githubassets.com/images/modules/site/home/icons/file.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>package.json</div>
</div>
</div>
</div>
<div class="col-12 col-lg-9 position-relative">
<div class="d-flex home-repo-editor-tabs">
<div class="home-repo-editor-tab--active color-text-white d-flex flex-items-center">
<img src="https://github.githubassets.com/images/modules/site/home/icons/file.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>README.md</div>
</div>
<div class="d-lg-none home-repo-editor-tab opacity-4 d-flex flex-items-center">
<img src="https://github.githubassets.com/images/modules/site/home/icons/file.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>app.js</div>
</div>
<div class="d-lg-none home-repo-editor-tab opacity-4 d-flex flex-items-center">
<img src="https://github.githubassets.com/images/modules/site/home/icons/file.svg" alt="File icon" class="mr-1" loading="lazy" decoding="async" width="16" height="16">
<div>index.html</div>
</div>
</div>
<div class="home-repo-editor-file">
<div class="d-flex opacity-4">
<pre class="opacity-4 text-right color-text-white home-pre pre-line p-3">
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre>
<div class="flex-1">
<pre class="pre-line color-text-white home-pre px-2 py-3">
<span class="code-green"># Octocat Classifier :octopus: :cat: :mag:</span>
<span class="code-pink">  </span>
As the name suggests, Octocat Classifier is used to determine whether a given image contains an Octocat. It is trained with images from the <span class="code-pink">[Octodex](1)</span>, images shared with <span class="code-pink">[#MyOctocat on Twitter](2)</span>, and <span class="code-pink">[photographs of laptops with :octocat: stickers on them]()</span>.
<span class="code-green">## Installation</span>
```
git clone https://github.com/jasonetco/octocat-classifier
```
</pre>
</div>
</div>
</div>
<div class="home-repo-editor-terminal p-3 position-absolute right-0 bottom-0 left-0" style="border-bottom-right-radius: 0.375rem;">
<svg height="16" class="octicon octicon-x text-gray-light-mktg position-absolute right-3 top-3" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
<div class="terminal-mktg text-mono bg-gray-800-mktg home-pre rounded-2 js-type-in-item" data-color-mode=dark data-light-theme=light data-dark-theme=dark>
<div class="p-4" data-type-delay="800">
<div class="">
<strong class="code-pink">→</strong>
<strong class="color-fg-success">~/octocat-classifier</strong>
<span class="js-type-letters">$ gh repo create octocat-classifier</span>
</div>
<div class="js-type-row">
<span><em>✓</em> Created repository jasonetco/octocat-classifier on GitHub</span>
</div>
<div class="js-type-row">
<span><em>✓</em> Added remote <a href="https://github.com/jasonetco/octocat-classifier.git">https://github.com/jasonetco/octocat-classifier.git</a></span>
</div>
<div class="js-type-row">
<span> </span>
</div>
<div class="js-type-row">
<strong class="code-pink">→</strong>
<strong class="color-fg-success">~/octocat-classifier</strong>
<span class="js-type-letters">$ git push origin main</span>
</div>
</div></div>
</div>
</div>
</div>
</div>
<img src="https://github.githubassets.com/images/modules/site/home/repo-editor-glow.svg" class="position-absolute z-n1 js-build-in-item build-in-scale-up" style="width: 117.31%; margin: 0 -8.65%; top: 50%; transform: translateY(-50%);" alt="Light glowing behind the editor" decoding="async">
</div>
</div>
</div>
<div class="col-11 col-sm-10 offset-1">
<ul class="home-git-log-dark d-flex gutter gutter-spacious flex-column list-style-none pt-5 pb-8 pb-md-9">
<li class="col-12 d-flex flex-items-center position-relative f6-mktg text-mono text-gray-light-mktg py-2 unselectable" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="22" width="28" aria-hidden="true" class="home-git-icon home-git-item flex-shrink-0 mr-3 position-relative z-1"><path d="m2.5 10a1 1 0 1 0 0 2zm23 2a1 1 0 1 0 0-2zm-23 0h23v-2h-23z" fill="#465061"></path><circle cx="14" cy="11" fill="#041027" r="5" stroke="#465061" stroke-width="2"></circle></svg>
<img src="https://avatars.githubusercontent.com/jasonetco?s=64&v=4" class="d-none d-sm-block flex-shrink-0 opacity-4 avatar avatar-4 mr-3 circle color-bg-subtle" alt="@jasonetco" loading="lazy">
<span class="opacity-4 text-truncate">Support Octocats shared on Twitter</span>
</li>
<li class="col-12 d-flex flex-items-center position-relative f6-mktg text-mono text-gray-light-mktg py-2 unselectable" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="22" width="28" aria-hidden="true" class="home-git-icon home-git-item flex-shrink-0 mr-3 position-relative z-1"><path d="m2.5 10a1 1 0 1 0 0 2zm23 2a1 1 0 1 0 0-2zm-23 0h23v-2h-23z" fill="#465061"></path><circle cx="14" cy="11" fill="#041027" r="5" stroke="#465061" stroke-width="2"></circle></svg>
<img src="https://avatars.githubusercontent.com/jasonetco?s=64&v=4" class="d-none d-sm-block flex-shrink-0 opacity-4 avatar avatar-4 mr-3 circle color-bg-subtle" alt="@jasonetco" loading="lazy">
<span class="opacity-4 text-truncate">Created index.js</span>
</li>
<li class="col-12 col-md-9 col-lg-12">
<div class="d-flex flex-column flex-lg-row flex-lg-row-reverse flex-items-center gutter gutter-spacious my-4">
<div class="col-12 col-lg-6 py-5 js-build-in build-in-slideX-left">
<h2 class="h3-mktg color-fg-default mb-3 text-gradient-mint-blue-dark"> Build on what's been built </h2>
<h3 class="f2-mktg text-gray-light-mktg lh-condensed text-semibold mb-3">
<span class="color-fg-default">Write less code thanks to the world's largest software package registry.</span>
Find the best community-approved projects to accelerate your work, then share it with the world with <a class="text-gray-light-mktg text-underline" data-analytics-event="{"category":"npm","action":"click to npm site","label":"ref_page:/;ref_cta:npm;ref_loc:code launchpad"}" href="https://www.npmjs.com">npm</a> and GitHub Packages.
</h3>
</div>
<div class="col-12 col-lg-6" aria-hidden="true">
<div class="position-relative">
<div class="terminal-mktg text-mono package-registry bg-gray-800-mktg home-pre rounded-2 js-type-in" data-color-mode=dark data-light-theme=light data-dark-theme=dark>
<div class="p-4">
<div class="">
<strong class="code-pink">→</strong>
<strong class="color-fg-success">~/octocat-classifier</strong>
<span class="js-type-letters">$ npm install eslint</span>
</div>
<div class="js-type-row">
<span>+ eslint@7.8.1</span>
</div>
<div class="js-type-row">
<span> added 109 packages from 64 contributors and audited 109 packages in 3.491s</span>
</div>
<div class="js-type-row">
<span> </span>
</div>
<div class="js-type-row">
<span>9 packages are looking for funding</span>
</div>
<div class="js-type-row">
<span> run `npm fund` for details</span>
</div>
<div class="js-type-row">
<span> </span>
</div>
<div class="js-type-row">
<span>found 0 vulnerabilities</span>
</div>
<div class="js-type-row">
<strong class="code-pink">→</strong>
<strong class="color-fg-success">~/octocat-classifier</strong>
<span class="js-type-letters">$ </span>
</div>
</div></div>
<img src="https://github.githubassets.com/images/modules/site/home/repo-terminal-glow.svg" class="position-absolute z-n1" style="width: 150%; margin: 0 -25%; top: 50%; transform: translateY(-50%);" alt="Light glowing behind the editor" loading="lazy">
</div>
</div>
</div>
</li>
<li class="col-12 d-flex flex-items-center position-relative f6-mktg text-mono text-gray-light-mktg py-2 unselectable" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="22" width="28" aria-hidden="true" class="home-git-icon home-git-item flex-shrink-0 mr-3 position-relative z-1"><path d="m2.5 10a1 1 0 1 0 0 2zm23 2a1 1 0 1 0 0-2zm-23 0h23v-2h-23z" fill="#465061"></path><circle cx="14" cy="11" fill="#041027" r="5" stroke="#465061" stroke-width="2"></circle></svg>
<img src="https://avatars.githubusercontent.com/jasonetco?s=64&v=4" class="d-none d-sm-block flex-shrink-0 opacity-4 avatar avatar-4 mr-3 circle color-bg-subtle" alt="@jasonetco" loading="lazy">
<span class="opacity-4 text-truncate">Added package for javascript linting</span>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="overflow-hidden width-full position-relative z-1">
<div class="container-xl p-responsive mx-auto">
<div class="d-flex flex-column gutter gutter-spacious position-relative">
<div class="home-git-log-light col-12 offset-md-1 pt-5 pt-md-6">
<div class="d-flex flex-column gutter gutter-spacious js-section" id="home-collaborate">
<div class="home-branch-container position-relative f6-mktg text-mono text-gray-light-mktg z-1">
<div class="d-flex flex-items-center py-1 home-git-log-terminal unselectable" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="26" width="28" class="flex-shrink-0 mr-3"><path d="m0 0h28v26h-28z" fill="#fff"></path><g fill="#8392ad"><path d="m11.25 13a.75.75 0 0 1 -.22.53l-2.75 2.75a.75.75 0 0 1 -1.06-1.06l2.22-2.22-2.22-2.22a.75.75 0 1 1 1.06-1.06l2.75 2.75c.141.14.22.331.22.53zm2 2a.75.75 0 0 0 0 1.5h5a.75.75 0 0 0 0-1.5z"></path><path clip-rule="evenodd" d="m2 5.75c0-.966.784-1.75 1.75-1.75h20.5c.966 0 1.75.784 1.75 1.75v14.5a1.75 1.75 0 0 1 -1.75 1.75h-20.5a1.75 1.75 0 0 1 -1.75-1.75zm1.75-.25a.25.25 0 0 0 -.25.25v14.5c0 .138.112.25.25.25h20.5a.25.25 0 0 0 .25-.25v-14.5a.25.25 0 0 0 -.25-.25z" fill-rule="evenodd"></path></g></svg>
git checkout -b origin add-status-screens
</div>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" preserveAspectRatio="none" viewBox="0 0 110 142" class="d-none d-md-block position-relative home-branch offset-n1"><path d="m1-8c0 75 108 75 108 150" stroke-width="2" vector-effect="non-scaling-stroke"></path></svg>
</div>
<div class="home-git-log-light col-10 offset-1 pb-5 pb-md-6 pt-6 pt-md-0">
<div class="col-6-max">
<div class="mb-5 mb-md-6 mt-n3">
<div class="d-flex flex-items-center position-relative z-1 unselectable" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="20" viewBox="0 0 28 20" width="28" class="home-git-icon home-git-item flex-shrink-0 mr-3 position-relative z-1"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<div class="d-inline-block border py-1 px-2 text-mono rounded-pill f6-mktg text-gray-mktg">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch mr-1">
<path fill-rule="evenodd" d="M11.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122V6A2.5 2.5 0 0110 8.5H6a1 1 0 00-1 1v1.128a2.251 2.251 0 11-1.5 0V5.372a2.25 2.25 0 111.5 0v1.836A2.492 2.492 0 016 7h4a1 1 0 001-1v-.628A2.25 2.25 0 019.5 3.25zM4.25 12a.75.75 0 100 1.5.75.75 0 000-1.5zM3.5 3.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z"></path>
</svg>origin/add-status-screens
</div>
</div>
</div>
<div class="mb-3 d-flex flex-items-center" aria-hidden="true">
<div class="mr-3">
<img class="float-left circle border unselectable" width="32" height="32" alt="@nplasterer" src="https://avatars.githubusercontent.com/nplasterer?s=64&v=4" loading="lazy">
<img class="float-left circle ml-n3 border unselectable" width="32" height="32" alt="@ampinsk" src="https://avatars.githubusercontent.com/ampinsk?s=64&v=4" loading="lazy">
<img class="float-left circle ml-n3 border unselectable" width="32" height="32" alt="@joshaber" src="https://avatars.githubusercontent.com/joshaber?s=64&v=4" loading="lazy">
</div>
<h4 class="f4-mktg d-inline-block text-gray-mktg opacity-4 unselectable text-bold">+3 collaborators</h4>
</div>
<h2 class="h2-mktg mb-3"><span class="text-gradient-pink-blue">Ready player two.</span> Scale your team to any size in the cloud.</h2>
<a class="link-mktg text-semibold color-fg-default py-1 f3-mktg link-emphasis-mktg" href="/account/organizations/new" data-analytics-event="{"category":"Homepage Collaborate section","action":"click","label":"text:Create a new organization for free;ref_loc:home launchpad"}">
Create a new organization for free <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</div>
</div>
<div class="col-12 d-none d-lg-block">
<div class="d-flex gutter gutter-spacious">
<div class="col-lg-6 offset-lg-7 position-relative">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/pr-screen.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/pr-screen.png" class="position-absolute top-0 z-n1 height-auto home-pr-screen" alt="Timeline of a pull request on GitHub" loading="lazy" decoding="async" width="1400" height="2474">
</picture>
</div>
</div>
</div>
<div class="col-12 offset-1 position-relative">
<ul class="home-git-log-light d-flex gutter gutter-spacious flex-column list-style-none ">
<li class="js-build-in-trigger col-11 col-sm-10 col-lg-12">
<div class="d-flex flex-column flex-lg-row flex-items-center gutter gutter-spacious" style="padding: 8% 0 10.5%">
<div class="col-12 col-lg-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="js-build-in-item build-in-slideX-left f2-mktg text-gray-mktg lh-condensed text-semibold mb-5 mb-lg-0 col-5-max"> <span class="text-gray-dark-mktg">Better code starts with pull requests</span>—conversations around your code where you can experiment, squash bugs, and build new features.</h3>
</div>
<div class="col-12 col-lg-5">
<div class="js-build-in-item home-pr-description rounded-2 position-relative z-2">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/pr-description.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/pr-description.png" class="width-full height-auto" alt="Pull request description on GitHub" loading="lazy" decoding="async" width="980" height="434">
</picture>
</div>
</div>
</div>
</li>
<li class="js-build-in-trigger col-11 col-sm-10 col-lg-12">
<div class="d-flex flex-column flex-lg-row flex-items-center gutter gutter-spacious" style="padding: 5% 0 14.5%">
<div class="col-12 col-lg-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="js-build-in-item build-in-slideX-left f2-mktg text-gray-mktg text-semibold mb-5 mb-lg-0 col-5-max"><span class="text-gray-dark-mktg">Code review is built in.</span> Pull requests cover the entire review flow: propose changes, browse code, ask for input, make a suggestion, and sign off in one place. </h3>
</div>
<div class="col-12 col-lg-5">
<div class="js-build-in-item home-pr-comment rounded-2 position-relative z-2">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/pr-comment.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/pr-comment.png" class="width-full height-auto" alt="Pull request comment on GitHub" loading="lazy" decoding="async" width="980" height="940">
</picture>
</div>
</div>
</div>
</li>
<li class="js-build-in-trigger col-11 col-sm-10 col-lg-12">
<div class="d-flex flex-column flex-lg-row flex-items-center gutter gutter-spacious pt-5 pt-md-6 pb-9 pb-md-10">
<div class="col-12 col-lg-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="js-build-in-item build-in-slideX-left f2-mktg text-gray-mktg text-semibold mb-5 mb-lg-0 col-5-max"><span class="text-gray-dark-mktg"> Know when your pull request is ready to merge when everything’s green.</span> Reviews approved? Check. Tests passing? Check check. No conflicts? Ship it already.</h3>
</div>
<div class="col-12 col-lg-5">
<div class="js-build-in-item home-pr-merge rounded-2 position-relative z-2">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/pr-merge.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/pr-merge.png" class="width-full height-auto" alt="Merge pull request on GitHub" loading="lazy" decoding="async" width="980" height="888">
</picture>
</div>
</div>
</div>
</li>
<li class="col-12 d-flex flex-items-center position-relative z-1 f6-mktg text-mono text-gray-light-mktg" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="26" width="28" class="home-git-item flex-shrink-0 mr-3 position-relative z-1"><path d="m0 0h28v26h-28z" fill="#fff"></path><g fill="#8392ad"><path d="m11.25 13a.75.75 0 0 1 -.22.53l-2.75 2.75a.75.75 0 0 1 -1.06-1.06l2.22-2.22-2.22-2.22a.75.75 0 1 1 1.06-1.06l2.75 2.75c.141.14.22.331.22.53zm2 2a.75.75 0 0 0 0 1.5h5a.75.75 0 0 0 0-1.5z"></path><path clip-rule="evenodd" d="m2 5.75c0-.966.784-1.75 1.75-1.75h20.5c.966 0 1.75.784 1.75 1.75v14.5a1.75 1.75 0 0 1 -1.75 1.75h-20.5a1.75 1.75 0 0 1 -1.75-1.75zm1.75-.25a.25.25 0 0 0 -.25.25v14.5c0 .138.112.25.25.25h20.5a.25.25 0 0 0 .25-.25v-14.5a.25.25 0 0 0 -.25-.25z" fill-rule="evenodd"></path></g></svg>
<span class="text-truncate unselectable">git merge add-status-screens</span>
</li>
</ul>
</div>
<div class="home-branch-container position-relative f6-mktg text-mono text-gray-light-mktg z-1 mb-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" preserveAspectRatio="none" viewBox="0 0 110 142" aria-hidden="true" class="d-none d-md-block position-relative home-branch offset-n1" style="transform: scaleX(-1);"><path d="m1-8c0 75 108 75 108 150" stroke-width="2" vector-effect="non-scaling-stroke"></path></svg>
<div class="d-flex flex-items-center" style="margin-left: -2.3125rem;">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="20" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon flex-shrink-0 mr-3 d-none d-md-block"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
</div>
</div>
<div class="col-12 mb-8 mb-md-9">
<div class="d-flex gutter gutter-spacious flex-column flex-lg-row">
<div class="offset-sm-1 ml-lg-0 col-12 col-sm-11 col-md-10 col-lg-5 d-flex flex-column mb-5 mb-md-6">
<div class="text-center" style="max-width: 490px;">
<div class="js-build-in build-in-slideY home-mobile-iphone mx-auto box-shadow-active-mktg mb-5 mb-md-6 position-relative">
<img src="https://github.githubassets.com/images/modules/site/home/iphone-notch.svg" class="width-full position-absolute top-0 right-0 left-0 " alt="iPhone notch" loading="lazy">
<video loop muted playsinline class="width-full js-viewport-aware-video looping-mktg" data-threshold="0" preload="none" poster="https://github.githubassets.com/images/modules/site/home/gh-mobile.png" style="border-radius: 1.75rem;">
<source type="video/mp4; codecs=avc1.4D401E,mp4a.40.2" src="https://github.githubassets.com/images/modules/site/home/gh-mobile.h264.mp4">
</video>
</div>
</div>
<div>
<h3 class="f2-mktg text-gray-mktg text-semibold mb-5 mb-lg-0 col-5-max">
<span class="text-gray-dark-mktg">Keep work moving.</span>
Review or merge code, manage notifications, browse repositories, and more with <a class="color-fg-accent" data-analytics-event="{"category":"Home","action":"click to learn about GitHub Mobile","label":"ref_page:/;ref_cta:GitHub Mobile;ref_loc:collaboration launchpad;"}" href="/mobile">GitHub Mobile</a>.
</h3>
<h4 class="f4-mktg text-semibold text-gray-mktg mb-3">Available for iOS and Android</h4>
<ul class="list-style-none d-flex flex-items-center">
<li class="mr-1 px-1">
<a href="https://apps.apple.com/app/github/id1477376905?ls=1"
data-analytics-event="{"category":"Home","action":"click to get GitHub Mobile on Apple App Store","label":"ref_page:/;ref_cta:apple icon;ref_loc:develop launchpad;"}"
>
<img src="https://github.githubassets.com/images/modules/site/home/logos/platform-apple.svg" alt="Apple App Store" loading="lazy">
</a>
</li>
<li class="px-1">
<a href="https://play.google.com/store/apps/details?id=com.github.android"
data-analytics-event="{"category":"Home","action":"click to get GitHub Mobile on Google Play Store","label":"ref_page:/;ref_cta:google icon;ref_loc:develop launchpad;"}"
>
<img src="https://github.githubassets.com/images/modules/site/home/logos/platform-google.svg" alt="Google Play Store" loading="lazy">
</a>
</li>
</ul>
</div>
</div>
<div class="offset-sm-1 ml-lg-0 col-12 col-sm-11 col-md-10 col-lg-5 d-flex flex-column mb-5 mb-md-6">
<div class="js-build-in-trigger js-type-in-trigger position-relative d-flex flex-items-center mb-5 mb-md-6 home-desktop-comp">
<div class="col-12">
<div class="js-build-in-item build-in-slideX-left home-desktop box-shadow-default-border-mktg offset-2 overflow-hidden">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/gh-desktop.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/gh-desktop.png" width="709" height="510" loading="lazy" class="width-full height-auto" alt="Viewing changelog in GitHub Desktop">
</picture>
</div>
<div class="js-build-in-item home-cli position-absolute width-full">
<div class="terminal-mktg text-mono f6-mktg bg-gray-dark-mktg box-shadow-active-mktg rounded-2 js-type-in" data-color-mode=dark data-light-theme=light data-dark-theme=dark>
<div class="px-4 pt-3 position-relative">
<div class="d-flex flex-row flex-nowrap position-absolute mt-1" aria-hidden="true">
<span class="d-inline-block circle mr-2 color-bg-emphasis" style="width: 12px; height: 12px; opacity: .4;"></span>
<span class="d-inline-block circle mr-2 color-bg-emphasis" style="width: 12px; height: 12px; opacity: .4;"></span>
<span class="d-inline-block circle mr-2 color-bg-emphasis" style="width: 12px; height: 12px; opacity: .4;"></span>
</div>
<div class="text-center text-small color-fg-subtle mb-n3">
bash
</div>
</div>
<div class="p-4" data-type-row-delay="100">
<div class="">
<strong class="code-pink">→</strong>
<strong class="color-fg-success">~/</strong>
<span class="js-type-letters">$ gh pr status</span>
</div>
<div class="js-type-row">
<span><var>Relevant pull requests in cli/cli</var></span>
</div>
<div class="js-type-row">
<span> </span>
</div>
<div class="js-type-row">
<span><strong>Current branch</strong></span>
</div>
<div class="js-type-row">
<span><var>There is no pull request associated with [main]</var></span>
</div>
<div class="js-type-row">
<span> </span>
</div>
<div class="js-type-row">
<span><strong>Created by you</strong></span>
</div>
<div class="js-type-row">
<span><var>You have no open pull requests</var></span>
</div>
<div class="js-type-row">
<span> </span>
</div>
<div class="js-type-row">
<span><strong>Requesting a code review from you</strong></span>
</div>
<div class="js-type-row">
<span><em>#1401</em> Correctly handle and set empty fields... </span>
</div>
<div class="js-type-row">
<span><var>[octocat:emptyBody]</var></span>
</div>
<div class="js-type-row">
<span><em>✓ Checks passing</em></span>
</div>
<div class="js-type-row">
<span><em>#1357</em> Added confirmation steps for risk... </span>
</div>
<div class="js-type-row">
<span><var>[octocat:confirmations]</var></span>
</div>
<div class="js-type-row">
<span><del>x 1/3 checks failing</del></span>
</div>
<div class="js-type-row">
<strong class="code-pink">→</strong>
<strong class="color-fg-success">~/</strong>
<span class="js-type-letters">$ </span>
</div>
</div></div>
</div>
</div>
</div>
<div>
<h3 class="f2-mktg text-gray-mktg text-semibold mb-5 mb-lg-0 col-5-max"><span class="text-gray-dark-mktg">Work however you want.</span>
Put a GUI on it with <a class="color-fg-accent" data-analytics-event="{"category":"Home","action":"click to learn about GitHub Desktop","label":"ref_page:/;ref_cta:npm;ref_loc:code launchpad"}" href="https://desktop.github.com/">GitHub Desktop</a> or stay in the command line with <a class="color-fg-accent" data-analytics-event="{"category":"Home","action":"click to learn about GitHub CLI","label":"ref_page:/;ref_cta:npm;ref_loc:code launchpad"}" href="https://cli.github.com/">GitHub CLI</a>.
</h3>
<h4 class="f4-mktg text-semibold text-gray-mktg mb-3">Available for macOS, Windows, and Linux*</h4>
<ul class="list-style-none d-flex flex-items-center mb-2">
<li class="mr-1 px-1"><img src="https://github.githubassets.com/images/modules/site/home/logos/platform-apple.svg" alt="macOS" loading="lazy"></li>
<li class="px-1"><img src="https://github.githubassets.com/images/modules/site/home/logos/platform-windows.svg" alt="Windows" loading="lazy"></li>
<li class="mr-1 px-1"><img src="https://github.githubassets.com/images/modules/site/home/logos/platform-linux.svg" alt="Linux" loading="lazy"></li>
</ul>
<p class="f6-mktg text-gray-mktg">* GitHub CLI is available on macOS, Windows, and Linux<br>* GitHub Desktop is available on macOS and Windows</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="mx-auto box-shadow-default-mktg wide-block py-0 position-relative home-git-log-dark-icons js-section" id="home-develop" data-color-mode=dark data-light-theme=light data-dark-theme=dark>
<div class="container-xl p-responsive height-full position-absolute top-0 left-0 right-0 width-full events-none overflow-hidden">
<div class="d-flex flex-column gutter gutter-spacious height-full events-none">
<div class="col-10 offset-1 home-git-log-dark height-full" style="padding: 6.5rem 0 0;">
</div>
</div>
</div>
<div class="container-xl p-responsive">
<div class="d-flex flex-column">
<div class="col-11 col-md-10 offset-1 home-codespaces-container">
<div class="col-8-max mx-lg-auto text-lg-center mb-6 mb-md-8 position-relative z-2">
<h2 class="h2-mktg color-fg-default mb-3">Blazing fast cloud developer environments with <span class="text-gradient-turq-purple-dark">Codespaces</span></h2>
<a class="link-mktg text-semibold color-fg-default py-1 f3-mktg link-emphasis-mktg" href="/features/codespaces" data-analytics-event="{"category":"Home","action":"click to learn more about Codespaces","label":"ref_page:/;ref_cta:Learn more about GitHub Codespaces;ref_loc:codespaces launchpad"}">
Learn more about GitHub Codespaces <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</div>
<div class="d-flex flex-column pt-5 z-1">
<div class="js-build-in col-12 col-md-9 col-lg-6 home-codespaces-copy-item home-codespaces-copy-item-1 position-relative" data-build-non-decorative="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1" style="right: -0.26rem"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="f2-mktg text-gray-light-mktg text-semibold">The future of code is in the cloud, not your local copy. <span class="color-fg-default">Codespaces gives you a complete, configurable dev environment on top of a powerful VM in minutes.</span></h3>
</div>
<div class="js-build-in col-12 col-md-9 col-lg-6 home-codespaces-copy-item home-codespaces-copy-item-2 position-relative" data-build-non-decorative="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="64" viewBox="0 0 56 64" width="56" aria-hidden="true" class="d-none d-sm-block float-left position-relative z-1" style="margin-left: -4.6875rem;"><path d="m0 0h56v64h-56z" fill="#051127"></path><rect fill="#fff" height="56" rx="16" width="56" y="4"></rect><path d="m43.6096 18.8281-6.923-3.3333c-.8013-.3858-1.7591-.2231-2.388.4058l-22.6636 20.664c-.6096.5558-.6089 1.5155.0015 2.0704l1.8512 1.6829c.4991.4538 1.2506.4871 1.7879.0796l27.2923-20.7046c.9156-.6946 2.2307-.0416 2.2307 1.1077v-.0804c0-.8067-.4621-1.5421-1.189-1.8921z" fill="#0065a9"></path><path d="m43.6096 45.1719-6.923 3.3334c-.8013.3857-1.7591.223-2.388-.4058l-22.6636-20.664c-.6096-.5558-.6089-1.5156.0015-2.0705l1.8512-1.6829c.4991-.4537 1.2506-.4871 1.7879-.0795l27.2923 20.7045c.9156.6946 2.2307.0416 2.2307-1.1077v.0804c0 .8067-.4621 1.5421-1.189 1.8921z" fill="#007acc"></path><path d="m36.6877 48.5059c-.8015.3855-1.7593.2226-2.3882-.4063.7749.7749 2.1.226 2.1-.8699v-30.4603c0-1.096-1.3251-1.6448-2.1-.8699.6289-.6289 1.5867-.7919 2.3882-.4064l6.9219 3.3287c.7274.3498 1.1899 1.0855 1.1899 1.8926v22.5704c0 .8071-.4625 1.5427-1.1899 1.8925z" fill="#1f9cf0"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="d-block d-sm-none home-git-icon home-git-item float-left mr-n6 position-relative z-1" style="right: -0.26rem"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="f2-mktg text-gray-light-mktg text-semibold"><span class="color-fg-default">Visual Studio Code, in your browser, full stop.</span> Codespaces brings the world’s most popular desktop editor to every repo. Code, build, test, use the terminal, and open pull requests from anywhere.</h3>
</div>
<div class="js-build-in col-12 col-md-9 col-lg-6 home-codespaces-copy-item home-codespaces-copy-item-3 position-relative" data-build-non-decorative="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1" style="right: -0.26rem"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="f2-mktg text-gray-light-mktg text-semibold"><span class="color-fg-default">Customize to your heart’s desire.</span> Add your favorite VS Code extensions, create a devcontainer config file, install new themes, and tweak your settings.</h3>
</div>
<div class="col-12 col-lg-6 position-absolute top-0 right-0 height-full home-codespaces-illo events-none" style="padding-left: 0 !important; padding-right: 0 !important;">
<div class="top-0 right-0 position-sticky z-1 pt-3 pt-lg-8">
<div class="home-codespaces-img-container overflow-hidden d-flex flex-items-start position-relative pl-2 pl-lg-4">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/codespaces-vscode-1.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/codespaces-vscode-1.png" class="home-codespaces-view home-codespaces-view-1 z-2 rounded-2 box-shadow-active-border-light-mktg" alt="VS Code running in the browser with your project's code and development environment running. A terminal panel is visiable in the editor." loading="lazy">
</picture>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/codespaces-vscode-2.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/codespaces-vscode-2.png" class="home-codespaces-view home-codespaces-view-2 z-2 rounded-2 box-shadow-active-border-light-mktg" alt="VS Code running in the browser with your project's code and development environment running. A terminal panel is visiable in the editor." loading="lazy">
</picture>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/codespaces-vscode-3.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/codespaces-vscode-3.png" class="home-codespaces-view home-codespaces-view-3 z-2 rounded-2 box-shadow-active-border-light-mktg" alt="VS Code running in the browser with your project's code and development environment running. A terminal panel is visiable in the editor." loading="lazy">
</picture>
</div>
<div class="home-codespaces-glow-container position-absolute top-0 bottom-0 overflow-hidden">
<img src="https://github.githubassets.com/images/modules/site/home/codespaces-glow.svg" class="home-codespaces-glow position-absolute z-n1" alt="Light glowing behind the editor" loading="lazy">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="width-full overflow-hidden">
<div class="d-flex flex-column gutter gutter-spacious">
<div class="d-none d-lg-flex offset-1 col-5 px-0 position-relative z-1">
<div class="flex-auto ml-n7" style="height: 1rem; border-radius: 0 0 0 1rem; border-bottom: 2px solid #424d65; border-left: 2px solid #424d65;"></div>
<div class="mr-n4" style="width: 1rem; height: 10rem; margin-top: 0.875rem; border-radius: 0 16px 0 0; border-top: 2px solid #424d65; border-right: 2px solid #424d65;"></div>
<div class="ml-n7 height-full position-absolute top-0 width-full z-n1 bg-home-dark" style="background-color: #040d21"></div>
</div>
</div>
</div>
</div>
</div>
<div class="overflow-hidden">
<div class="overflow-hidden js-section" id="home-automate">
<div class="container-xl p-responsive pb-8 pb-md-9">
<div class="home-git-log-center pt-10 pt-md-11 pb-8 pb-md-9">
<div class="col-8-max mx-0 mx-lg-auto text-left text-lg-center mb-4 mb-md-7 color-bg-default pb-3">
<h2 class="h2-mktg mb-3"> Automate anything with <span class="text-gradient-purple-coral no-wrap">GitHub Actions</span></h2>
<a class="link-mktg text-semibold color-fg-default py-1 f3-mktg link-emphasis-mktg" href="/features/actions" data-analytics-event="{"category":"Home","action":"click to learn more about GitHub Actions","label":"ref_page:/;ref_cta:Learn more about GitHub Actions;ref_loc:automate launchpad"}">
Learn more about GitHub Actions <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</div>
<div class="river-mktg js-build-in-trigger d-flex flex-column gutter gutter-spacious flex-md-items-center my-3 my-sm-7 my-md-8 position-relative flex-md-row-reverse pb-4 pb-md-7" data-build-in-stagger="100">
<div class="col-12 py-3 js-build-in-item col-sm-10 col-md-6 col-lg-5 build-in-slideX-left">
<div class="pl-md-4">
<div class="f2-mktg text-gray-mktg text-semibold">
<span class="text-gray-dark-mktg">Setup CI/CD, enhance your DevOps, and script your entire workflow with GitHub Actions.</span> Kick off automated workflows with GitHub events like push, issue creation, merge, and release.
</div>
</div>
</div>
<div class="col-12 py-3 col-md-6 col-lg-7">
<div class="position-relative">
<div style="max-width: 706px; font-size: 0;" class="js-build-in-item build-in-scale-up color-bg-default rounded-2 box-shadow-active-border-mktg position-relative overflow-hidden">
<img src="https://github.githubassets.com/images/modules/site/home/actions-autocomplete.png" class="width-full" alt="GitHub Actions web editor editing workflow file showcasing autocomplete" loading="lazy">
<video loop muted playsinline preload="none" class="width-full looping-mktg js-viewport-aware-video" data-threshold="0" poster="https://github.githubassets.com/images/modules/site/home/actions-autocomplete-poster.png">
<source type="video/mp4; codecs=hevc,mp4a.40.2" src="https://github.githubassets.com/images/modules/site/home/actions-autocomplete.hevc.mp4">
<source type="video/mp4; codecs=avc1.4D401E,mp4a.40.2" src="https://github.githubassets.com/images/modules/site/home/actions-autocomplete.h264.mp4">
</video>
</div>
</div>
</div>
</div>
<div class="river-mktg js-build-in-trigger d-flex flex-column gutter gutter-spacious flex-md-items-center my-3 my-sm-7 my-md-8 position-relative flex-md-row pb-4 pb-md-7" data-build-in-stagger="100">
<div class="col-12 py-3 js-build-in-item col-sm-10 col-md-6 col-lg-5 build-in-slideX-right">
<div class="pr-md-4">
<div class="mb-3">
<h4 class="h3-mktg mb-3 lh-condensed-ultra text-gradient-purple-coral">11,000+ <br>Actions</h4>
<h3 class="f2-mktg text-gray-mktg text-semibold mb-4 col-5-max">Write your own, or import Actions from the open source community, all within our world-class editor. Feeling stuck? Browse the Actions developer docs as you code.</h3>
<a class="link-mktg text-semibold color-fg-default py-1 f4-mktg link-emphasis-mktg" href="/marketplace/actions" data-analytics-event="{"category":"Home","action":"click to go to Actions Marketplace","label":"ref_page:/;ref_cta:Explore the Actions Marketplace;ref_loc:automate launchpad"}">
Explore the Actions Marketplace <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</div>
</div>
</div>
<div class="col-12 py-3 col-md-6 col-lg-7">
<div class="position-relative">
<div class="js-build-in-item home-workflow-comp position-relative rounded-2 box-shadow-active-border-mktg overflow-hidden">
<div class="home-workflow-sidebar height-full position-absolute top-0 right-0 bottom-0 border-left" style="max-width: 276px">
<div class="position-absolute right-0 bottom-0 left-0 z-1 overflow-hidden" style="top: 10%;">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/actions-editor-actions.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/actions-editor-actions.png" class="home-workflow-actions width-full" alt="The Actions Marketplace is available inline alongside the GitHub Actions workflow editor" loading="lazy" decoding="async">
</picture>
</div>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/actions-editor-sidebar.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/actions-editor-sidebar.png" class="height-full" alt="The Actions Marketplace is available inline alongside the GitHub Actions workflow editor" loading="lazy" decoding="async">
</picture>
</div>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/actions-editor.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/actions-editor.png" class="width-full height-auto" alt="The GitHub Actions workflow editor" width="706" height="452" loading="lazy" decoding="async">
</picture>
</div>
</div>
</div>
</div>
<div class="d-flex flex-column gutter gutter-spacious flex-lg-items-center my-7 my-md-8 pb-7">
<div class="col-6-max text-left text-lg-center mx-lg-auto pt-3 pb-5 pb-md-6 color-bg-default">
<h3 class="f2-mktg text-gray-mktg text-semibold mb-5">You can have it all. <span class="text-gray-dark-mktg">Run actions in any language or operating system, on Linux, macOS, Windows, ARM, and containers. Or all at once with matrix builds.</span></h3>
<ul class="list-style-none d-flex flex-items-center flex-justify-start flex-lg-justify-center">
<li class="mr-1 px-1"><img src="https://github.githubassets.com/images/modules/site/home/logos/platform-linux.svg" alt="Linux" loading="lazy"></li>
<li class="mr-1 px-1"><img src="https://github.githubassets.com/images/modules/site/home/logos/platform-apple.svg" alt="macOS" loading="lazy"></li>
<li class="mr-1 px-1"><img src="https://github.githubassets.com/images/modules/site/home/logos/platform-windows.svg" alt="Windows" loading="lazy"></li>
<li class="px-1"><img src="https://github.githubassets.com/images/modules/site/home/logos/platform-arm.svg" alt="ARM" loading="lazy"></li>
</ul>
</div>
<div class="col-12 col-lg-7 mx-lg-auto">
<div class="position-relative z-2" style="max-width: 706px;">
<div class="js-build-in home-matrix-comp d-flex position-absolute top-6 top-lg-3 bottom-0 flex-items-center" data-build-margin-top="0" data-build-margin-bottom="0">
<div class="home-matrix-string d-flex gutter-condensed flex-items-start flex-justify-center mx-3 mx-lg-0 width-full position-relative">
<div class="d-none d-lg-block col-4 flex-auto">
<div class="home-matrix-build mt-3 float-right color-bg-default width-full rounded-2 position-relative box-shadow-card-border-mktg">
<div class="home-matrix-connector home-matrix-connector--right"><div class="home-matrix-connector-bg"></div></div>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/matrix-workflow-build.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-build.png" class="width-full" alt="Actions build workflow" loading="lazy">
</picture>
</div>
</div>
<div class="col-6 col-lg-4 flex-auto">
<div class="home-matrix-test mx-auto color-bg-default width-full rounded-2 position-relative z-1" style="border-top-left-radius: 0 !important;">
<div class="home-matrix-tab-container position-absolute" style="width: 22%;">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/matrix-workflow-test-tab.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-test-tab.png" class="width-full position-relative z-1" alt="Actions build workflow" loading="lazy">
</picture>
<div class="home-matrix-tab position-absolute top-0 overflow-hidden width-full"></div>
</div>
<div class="home-matrix-connector d-none d-lg-block"><div class="home-matrix-connector-bg"></div></div>
<div class="home-matrix-connector home-matrix-connector--right"><div class="home-matrix-connector-bg"></div></div>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/matrix-workflow-test.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-test.png" class="width-full" alt="Actions build workflow" loading="lazy">
</picture>
</div>
</div>
<div class="col-6 col-lg-4 flex-auto">
<div class="home-matrix-publish float-lg-left mx-auto color-bg-default width-full rounded-2 position-relative box-shadow-card-border-mktg" style="border-top-left-radius: 0 !important;">
<div class="home-matrix-tab-container position-absolute" style="width: 27%;">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/matrix-workflow-publish-tab.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-publish-tab.png" class="width-full position-relative z-1" alt="Actions build workflow" loading="lazy">
</picture>
<div class="home-matrix-tab position-absolute top-0 overflow-hidden width-full"></div>
</div>
<div class="home-matrix-connector"><div class="home-matrix-connector-bg"></div></div>
<div class="position-absolute d-flex flex-column flex-justify-around"
style="left: 9.75%; top: 9.5%; width: 5.5%; height: 80.25%;">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-spinner.svg" class="home-matrix-spinner-1" loading="lazy" alt="">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-spinner.svg" class="home-matrix-spinner-2" loading="lazy" alt="">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-spinner.svg" class="home-matrix-spinner-3" loading="lazy" alt="">
</div>
<div class="position-absolute d-flex flex-column flex-justify-around"
style="left: 9.75%; top: 9.5%; width: 5.5%; height: 80.25%;">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-success.svg" class="home-matrix-success-1" loading="lazy" alt="">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-success.svg" class="home-matrix-success-2" loading="lazy" alt="">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-success.svg" class="home-matrix-success-3" loading="lazy" alt="">
</div>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/matrix-workflow-publish.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-publish.png" class="width-full" alt="Actions publish workflow" loading="lazy">
</picture>
</div>
</div>
</div>
</div>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/matrix-workflow-canvas.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/matrix-workflow-canvas.png" class="width-full height-auto rounded-2 box-shadow-default-border-mktg" alt="Actions workflow canvas" loading="lazy" decoding="async" width="1412" height="844">
</picture>
</div>
</div>
<div class="col-6-max text-left text-lg-center mx-lg-auto d-flex flex-sm-row-reverse flex-lg-column flex-items-center mt-5 mt-lg-0">
<div class="d-none d-sm-block flex-shrink-0 color-bg-default circle position-relative mt-lg-n7 mx-auto js-build-in" style="width: 164px; height: 164px;" data-build-margin-top="0" data-build-margin-bottom="0">
<div class="position-absolute text-left top-0 right-0 bottom-0 left-0 home-actions-success circle z-1">
<img src="https://github.githubassets.com/images/modules/site/home/icons/actions-check.svg" class="home-actions-success-check"
alt="Large representation of the indicator that a workflow is successfully completed" loading="lazy">
</div>
<img src="https://github.githubassets.com/images/modules/site/home/actions-spinner.svg" class="width-full home-actions-spinner" alt="Large representation of the indicator that a workflow is running" loading="lazy">
</div>
<h3 class="col-5-max f2-mktg text-gray-mktg text-semibold color-bg-default pt-lg-4 pr-4 pr-lg-0 pb-lg-3"><span class="text-gray-dark-mktg">With 70 million jobs run per month you’re in good company with Actions, the number one CI service on the world’s largest developer platform.</span></h3>
</div>
</div>
</div>
<div class="js-build-in-trigger d-flex flex-column flex-lg-row-reverse gutter flex-lg-justify-end flex-lg-items-center pt-5 pb-8 pb-md-9">
<div class="col-12 col-lg-5 mb-4">
<div class="mb-5 mb-md-6">
<h3 class="js-build-in-item build-in-slideX-left f2-mktg text-gray-mktg text-semibold mb-4 col-5-max">Speaking of automation, <span class="text-gray-dark-mktg">Dependabot keeps your projects up to date</span> with automated pull requests that update all your dependencies. Just review and merge to keep your software secure.</h3>
<a class="link-mktg text-semibold color-fg-default py-1 f4-mktg link-emphasis-mktg" href="https://docs.github.com/github/managing-security-vulnerabilities/configuring-dependabot-security-updates" data-analytics-event="{"category":"Homepage Automation section","action":"click","label":"text:Learn more about Dependabot;ref_loc:automate launchpad;"}">
Learn more about Dependabot <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</div>
</div>
<div class="col-12 col-lg-7">
<div class="js-build-in-item home-dependabot-comp position-relative">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/dependabot-pr.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/dependabot-pr.png" class="width-full home-dependabot-pr rounded-2 box-shadow-active-border-mktg" alt="Automated pull request that updates a dependency in your repository" loading="lazy">
</picture>
<div class="home-dependabot-merge mx-4 position-absolute right-0 bottom-0 left-0 rounded-2 box-shadow-default-border-mktg z-n1">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/dependabot-merge.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/dependabot-merge.png" class="opacity-4 width-full" alt="Merge pull request on GitHub" loading="lazy">
</picture>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="position-relative z-1 mx-auto box-shadow-default-mktg wide-block overflow-hidden js-section" style="padding-top: 0 !important" id="home-secure" data-color-mode=dark data-light-theme=light data-dark-theme=dark>
<div class="container-xl p-responsive">
<div class="d-flex flex-column gutter gutter-spacious position-relative">
<div class="home-git-log-dark col-12 offset-md-1 pt-10">
<div class="d-flex flex-column gutter gutter-spacious">
<div class="home-branch-container position-relative f6 text-mono text-gray-light-mktg z-1">
<div class="d-flex flex-items-center" style="margin-left: -2.3125rem;">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="20" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon flex-shrink-0 mr-3 d-none d-md-block"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
</div>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" preserveAspectRatio="none" viewBox="0 0 110 142" aria-hidden="true" class="d-none d-md-block position-relative home-branch offset-n1"><path d="m1-8c0 75 108 75 108 150" stroke-width="2" vector-effect="non-scaling-stroke"></path></svg>
</div>
<div class="home-git-log-dark col-11 offset-1 pb-5 pb-md-6">
<div class="col-12 col-md-10">
<div class="mb-5 mb-md-6 mt-n3">
<div class="d-flex flex-items-center position-relative z-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="20" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item flex-shrink-0 mr-3 position-relative z-1"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
</div>
</div>
<h2 class="h2-mktg color-fg-default mt-n8 mt-md-n9 mb-3">Find and fix vulnerabilities <br> <span class="text-gradient-coral-yellow-dark pb-1">before you merge</span></h2>
<a class="link-mktg text-semibold color-fg-default py-1 f3-mktg link-emphasis-mktg" href="/features/security" data-analytics-event="{"category":"Home","action":"click to learn more about advanced security","label":"ref_page:/;ref_cta:Learn more about advanced security;ref_loc:secure launchpad"}">
Learn more about advanced security <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</div>
</div>
<div class="col-12 offset-1">
<ul class="home-git-log-dark d-flex gutter gutter-spacious flex-column list-style-none ">
<li class="col-11 col-sm-10 col-lg-12">
<div class="js-build-in-trigger d-flex flex-column flex-lg-row flex-items-center gutter gutter-spacious py-5 py-md-6">
<div class="col-12 col-lg-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="js-build-in-item build-in-slideX-left f2-mktg text-gray-light-mktg text-semibold mb-5 mb-lg-0 col-5-max"><span class="color-fg-default">Secure your code as you write it.</span> CodeQL’s code scanning automatically reviews every change to your codebase and identifies known vulnerabilities before they ever reach production.</h3>
</div>
<div class="col-12 col-lg-5">
<div class="js-build-in-item home-codeql-comp position-relative pt-8 pt-md-9">
<div class="home-codeql-step-3 rounded-2 position-absolute box-shadow-active-border-light-mktg">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/codeql-step-3.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/codeql-step-3.png" alt="Step 3" class="width-full" loading="lazy">
</picture>
</div>
<div class="home-codeql-step-2 rounded-2 position-absolute box-shadow-active-border-light-mktg">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/codeql-step-2.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/codeql-step-2.png" alt="Step 2" class="width-full" loading="lazy">
</picture>
</div>
<div class="home-codeql-step-1 rounded-2 position-relative z-1">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/codeql-step-1.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/codeql-step-1.png" alt="Step 1" class="width-full" loading="lazy">
</picture>
</div>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/codeql-description.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/codeql-description.png" alt="Code injection alert" class="home-codeql-description width-full" loading="lazy" decoding="async">
</picture>
</div>
</div>
</div>
</li>
<li class="col-12 d-flex flex-items-center position-relative f6 text-mono text-gray-light-mktg py-2" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="29" width="28" class="home-git-item flex-shrink-0 mr-3 position-relative z-1"><path d="m0 0h28v29h-28z" fill="#041027"></path><g fill="#ffd33d"><path d="m15 19.5a1 1 0 1 1 -2 0 1 1 0 0 1 2 0zm-.25-8.25a.75.75 0 0 0 -1.5 0v4.5a.75.75 0 0 0 1.5 0z"></path><path clip-rule="evenodd" d="m11.836 5.244c.963-1.665 3.366-1.665 4.329 0l8.966 15.504c.964 1.667-.239 3.752-2.164 3.752h-17.933c-1.925 0-3.128-2.085-2.164-3.752zm3.03.751a1 1 0 0 0 -1.731 0l-8.967 15.504a1 1 0 0 0 .866 1.501h17.933a1 1 0 0 0 .865-1.5l-8.966-15.506z" fill-rule="evenodd"></path></g></svg>
<span class="text-truncate color-fg-attention unselectable">Vulnerabilities found</span>
</li>
<li class="col-12 d-flex flex-items-center position-relative f6 text-mono text-gray-light-mktg py-2 unselectable" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="22" width="28" class="home-git-icon home-git-item flex-shrink-0 mr-3 position-relative z-1"><path d="m2.5 10a1 1 0 1 0 0 2zm23 2a1 1 0 1 0 0-2zm-23 0h23v-2h-23z" fill="#465061"></path><circle cx="14" cy="11" fill="#041027" r="5" stroke="#465061" stroke-width="2"></circle></svg>
<img src="https://avatars.githubusercontent.com/jasonetco?s=64&v=4" class="d-none d-sm-block flex-shrink-0 opacity-4 avatar avatar-4 mr-3 circle color-bg-subtle" alt="@jasonetco" loading="lazy">
<span class="opacity-4 text-truncate">Fixed deserialized data security vulnerability</span>
</li>
<li class="col-11 col-sm-10 col-lg-12">
<div class="js-build-in-trigger d-flex flex-column flex-lg-row flex-items-center gutter gutter-spacious py-7 py-md-8">
<div class="col-12 col-lg-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="js-build-in-item build-in-slideX-left f2-mktg text-gray-light-mktg text-semibold mb-5 mb-lg-0 col-5-max"><span class="color-fg-default">Keep your secrets.</span> We automatically scan repositories for OAuth tokens, API keys, personal tokens, and more. If we find one, we’ll notify you and the partner that issued it to invalidate the secret.</h3>
</div>
<div class="col-12 col-lg-5">
<div class="js-build-in-item home-secret-comp">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/secret-alert.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/secret-alert.png" class="width-full rounded-2 home-secret-alert position-relative z-1" alt="An alert of found secret committed to the repository" loading="lazy">
</picture>
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/secret-list.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/secret-list.png" class="width-full home-secret-list" alt="List of exposed secrets found in the repository" loading="lazy">
</picture>
</div>
</div>
</div>
</li>
<li class="col-12 d-flex flex-items-center position-relative f6 text-mono text-gray-light-mktg py-2" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="29" width="28" class="home-git-item flex-shrink-0 mr-3 position-relative z-1"><path d="m0 0h28v29h-28z" fill="#041027"></path><g fill="#ffd33d"><path d="m15 19.5a1 1 0 1 1 -2 0 1 1 0 0 1 2 0zm-.25-8.25a.75.75 0 0 0 -1.5 0v4.5a.75.75 0 0 0 1.5 0z"></path><path clip-rule="evenodd" d="m11.836 5.244c.963-1.665 3.366-1.665 4.329 0l8.966 15.504c.964 1.667-.239 3.752-2.164 3.752h-17.933c-1.925 0-3.128-2.085-2.164-3.752zm3.03.751a1 1 0 0 0 -1.731 0l-8.967 15.504a1 1 0 0 0 .866 1.501h17.933a1 1 0 0 0 .865-1.5l-8.966-15.506z" fill-rule="evenodd"></path></g></svg>
<span class="text-truncate color-fg-attention unselectable">OAuth token found</span>
</li>
<li class="col-12 d-flex flex-items-center position-relative f6 text-mono text-gray-light-mktg pt-2 unselectable" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="22" width="28" class="home-git-icon home-git-item flex-shrink-0 mr-3 position-relative z-1"><path d="m2.5 10a1 1 0 1 0 0 2zm23 2a1 1 0 1 0 0-2zm-23 0h23v-2h-23z" fill="#465061"></path><circle cx="14" cy="11" fill="#041027" r="5" stroke="#465061" stroke-width="2"></circle></svg>
<img src="https://avatars.githubusercontent.com/jasonetco?s=64&v=4" class="d-none d-sm-block flex-shrink-0 opacity-4 avatar avatar-4 mr-3 circle color-bg-subtle" alt="@jasonetco" loading="lazy">
<span class="opacity-4 text-truncate">Replaced OAuth token with a key vault value</span>
</li>
</ul>
</div>
<div class="home-branch-container position-relative f6 text-mono text-gray-light-mktg z-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" preserveAspectRatio="none" viewBox="0 0 110 142" aria-hidden="true" class="d-none d-md-block position-relative home-branch offset-n1" style="transform: scaleX(-1);"><path d="m1-8c0 75 108 75 108 150" stroke-width="2" vector-effect="non-scaling-stroke"></path></svg>
<div class="d-flex flex-items-center" style="margin-left: -2.3125rem;">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="20" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon flex-shrink-0 mr-3 d-none d-md-block"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
</div>
</div>
<div class="offset-1 col-11 col-sm-10 col-lg-12">
<div class="home-git-log-dark home-security-point-3 d-flex flex-column flex-lg-row flex-items-center gutter gutter-spacious pt-8 pt-md-0 mb-n12 mb-md-0">
<div class="col-12 col-lg-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left d-block d-md-none mr-n6 position-relative z-2"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="js-build-in build-in-slideX-left f2-mktg text-gray-light-mktg text-semibold mt-md-n5 mb-5 mb-md-n11 col-5-max"><span class="color-fg-default">Found a vulnerability?</span> Our security advisory remediation tools help developers identify and disclose them responsibly so maintainers can patch them in dedicated, private workspaces.</h3>
</div>
</div>
</div>
<div class="col-12 offset-1 ml-md-0 events-none">
<img src="https://github.githubassets.com/images/modules/site/home/security-alert-fan.svg" class="home-security-alert-fan mb-7 mb-md-8 position-relative z-1 unselectable" alt="Distributed security alerts" loading="lazy" decoding="async">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-xl p-responsive mx-auto js-section" id="home-community">
<div class="d-flex flex-column gutter gutter-spacious position-relative">
<div class="col-12">
<div class="d-flex flex-column gutter gutter-spacious">
<div class="home-git-log-light col-10 offset-1 pt-10 pt-md-11 pb-lg-6">
<div class="col-5-max">
<h2 class="h2-mktg overflow-visible">The home for all developers — including you</h2>
</div>
</div>
<div class="col-12 offset-1 position-relative">
<ul class="home-git-log-light d-flex gutter gutter-spacious flex-column list-style-none pb-md-12 mb-12">
<li class="col-11 col-sm-10 col-lg-12">
<div
class="js-build-in-trigger d-flex flex-column flex-lg-row flex-items-center gutter gutter-spacious pb-9 pb-md-10 mt-6 mt-lg-n6">
<div class="col-12 col-lg-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="24" viewBox="0 0 28 24" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1"><path clip-rule="evenodd" d="m7.5 6.75c0-.0663.02634-.12989.07322-.17678.04689-.04688.11048-.07322.17678-.07322h8.5c.0663 0 .1299.02634.1768.07322.0469.04689.0732.11048.0732.17678v5.5c0 .0663-.0263.1299-.0732.1768s-.1105.0732-.1768.0732h-3.5c-.1989.0002-.3895.0793-.53.22l-2.72 2.72v-2.19c0-.1989-.07902-.3897-.21967-.5303-.14065-.1407-.33142-.2197-.53033-.2197h-1c-.0663 0-.12989-.0263-.17678-.0732-.04688-.0469-.07322-.1105-.07322-.1768zm.25-1.75c-.46413 0-.90925.18437-1.23744.51256s-.51256.77331-.51256 1.23744v5.5c0 .966.784 1.75 1.75 1.75h.25v1.543c.0001.2881.08561.5697.24571.8092s.38762.4262.65379.5364.55904.1391.84161.0829c.28259-.0562.54209-.1948.74589-.3985l2.574-2.573h3.189c.4641 0 .9092-.1844 1.2374-.5126.3282-.3281.5126-.7733.5126-1.2374v-5.5c0-.46413-.1844-.90925-.5126-1.23744s-.7733-.51256-1.2374-.51256zm12.75 3.75c0-.0663-.0263-.12989-.0732-.17678-.0469-.04688-.1105-.07322-.1768-.07322h-.5c-.1989 0-.3897-.07902-.5303-.21967-.1407-.14065-.2197-.33142-.2197-.53033s.079-.38968.2197-.53033c.1406-.14065.3314-.21967.5303-.21967h.5c.966 0 1.75.784 1.75 1.75v5.5c0 .4641-.1844.9092-.5126 1.2374s-.7733.5126-1.2374.5126h-.25v1.543c-.0001.2881-.0856.5697-.2457.8092s-.3876.4262-.6538.5364-.559.1391-.8416.0829-.5421-.1948-.7459-.3985l-2.293-2.293c-.0737-.0687-.1328-.1515-.1738-.2435s-.063-.1913-.0648-.292.0168-.2007.0545-.2941.0938-.1782.1651-.2494c.0712-.0713.156-.1274.2494-.1651s.1934-.0563.2941-.0545.2.0238.292.0648.1748.1001.2435.1738l2.22 2.22v-2.19c0-.1989.079-.3897.2197-.5303.1406-.1407.3314-.2197.5303-.2197h1c.0663 0 .1299-.0263.1768-.0732s.0732-.1105.0732-.1768z" fill="#dadfe9" fill-rule="evenodd"></path></svg>
<h3
class="js-build-in-item build-in-slideX-left f2-mktg text-gray-mktg text-semibold mb-4 col-5-max">
<span class="text-gray-dark-mktg">GitHub Discussions is dedicated space for your community to come together, ask and answer questions, and have open-ended conversations.</span>
</h3>
<a class="link-mktg text-semibold color-fg-default py-1 f3-mktg link-emphasis-mktg" href="https://docs.github.com/discussions" data-analytics-event="{"category":"Home","action":"click to learn how to get started with Discussions","label":"ref_page:/;ref_cta:Learn how to get started with Discussions;ref_loc:community launchpad"}">
Learn how to get started with Discussions <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</div>
<div class="col-12 col-lg-5 offset-lg-1">
<div class="js-build-in-item home-discussions-comp position-relative">
<div class="rounded-2 box-shadow-default-border-mktg position-relative z-1 overflow-hidden home-discussions-1">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/community-discussions-1.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/community-discussions-1.png" class="opacity-4 width-full height-auto"
alt="Technical question from the Gatsby community" loading="lazy" width="808" height="480">
</picture>
</div>
<div class="rounded-2 box-shadow-active-mktg position-relative z-1 float-right home-discussions-2">
<img src="https://github.githubassets.com/images/modules/site/home/discussions-answered-check.svg"
class="home-discussions-check-0 js-build-in-item position-absolute z-1" alt="Answered checkmark" loading="lazy">
<img src="https://github.githubassets.com/images/modules/site/home/discussions-check.svg"
class="home-discussions-check-1 js-build-in-item position-absolute z-1" alt="Floating checkmark" loading="lazy">
<img src="https://github.githubassets.com/images/modules/site/home/discussions-check.svg"
class="home-discussions-check-2 js-build-in-item position-absolute z-1" alt="Floating checkmark" loading="lazy">
<img src="https://github.githubassets.com/images/modules/site/home/discussions-check.svg"
class="home-discussions-check-3 js-build-in-item position-absolute z-1" alt="Floating checkmark" loading="lazy">
<div class="rounded-2 float-right home-discussions-answer overflow-hidden">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/community-discussions-2.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/community-discussions-2.png" class="width-full height-auto"
alt="Answer to the technical question from the Gatsby community" style="min-width: 10px" loading="lazy" width="768" height="792" decoding="async">
</picture>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="col-11 col-sm-10 col-lg-12">
<div class="js-build-in-trigger d-flex flex-column flex-lg-row flex-items-center gutter gutter-spacious py-9">
<div class="col-12 col-lg-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="24" viewBox="0 0 28 24" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1"><path clip-rule="evenodd" d="m7.5 12c0-1.7239.68482-3.37721 1.90381-4.59619 1.21899-1.21899 2.87229-1.90381 4.59619-1.90381s3.3772.68482 4.5962 1.90381c1.219 1.21898 1.9038 2.87229 1.9038 4.59619s-.6848 3.3772-1.9038 4.5962-2.8723 1.9038-4.5962 1.9038-3.3772-.6848-4.59619-1.9038-1.90381-2.8723-1.90381-4.5962zm6.5-8c-2.1217 0-4.15656.84285-5.65685 2.34315-1.5003 1.50029-2.34315 3.53512-2.34315 5.65685 0 2.1217.84285 4.1566 2.34315 5.6569 1.50029 1.5002 3.53515 2.3431 5.65685 2.3431s4.1566-.8429 5.6569-2.3431c1.5002-1.5003 2.3431-3.5352 2.3431-5.6569 0-2.12173-.8429-4.15656-2.3431-5.65685-1.5003-1.5003-3.5352-2.34315-5.6569-2.34315zm-3 8c.2652 0 .5196-.1054.7071-.2929s.2929-.4419.2929-.7071-.1054-.5196-.2929-.7071-.4419-.2929-.7071-.2929-.5196.1054-.7071.2929-.2929.4419-.2929.7071.1054.5196.2929.7071.4419.2929.7071.2929zm7-1c0 .2652-.1054.5196-.2929.7071s-.4419.2929-.7071.2929-.5196-.1054-.7071-.2929-.2929-.4419-.2929-.7071.1054-.5196.2929-.7071.4419-.2929.7071-.2929.5196.1054.7071.2929.2929.4419.2929.7071zm-6.68 2.636c.1613-.113.3606-.1579.5549-.1252.1942.0327.3677.1406.4831.3002l.007.009c.1028.118.2205.2221.35.31.264.178.683.37 1.285.37s1.02-.192 1.285-.371c.1295-.0879.2472-.192.35-.31l.007-.008c.1154-.1621.2904-.2716.4865-.3046.1962-.033.3975.0132.5595.1286s.2716.2904.3046.4865c.033.1962-.0132.3975-.1286.5595l-.614-.431c.614.43.614.431.613.431v.001l-.001.002-.002.003-.005.007-.014.019c-.0562.0753-.1177.1464-.184.213-.1607.1664-.3383.3155-.53.445-.6298.4184-1.3709.6376-2.127.629-.946 0-1.652-.308-2.126-.63-.2508-.1697-.4772-.3729-.673-.604-.0143-.0174-.0283-.0351-.042-.053l-.014-.02-.005-.006-.002-.003v-.002h-.001l.613-.432-.614.43c-.114-.1628-.1588-.3641-.1245-.5599.0343-.1957.1449-.3698.3075-.4841z" fill="#dadfe9" fill-rule="evenodd"></path></svg>
<h3 class="js-build-in-item build-in-slideX-left f2-mktg text-gray-mktg text-semibold mb-5 col-5-max">
<span class="text-gray-dark-mktg"> Amplify your voice in your own personal README on your profile.</span>
Tell the story of your work through your repositories, contributions, and technologies of choice.
</h3>
</div>
<div class="col-12 col-lg-5 offset-lg-1">
<div class="js-build-in-item home-readme-comp">
<div class="rounded-2 box-shadow-default-border-mktg position-relative z-1 overflow-hidden home-readme-1">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/community-readme-1.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/community-readme-1.png" class="width-full height-auto opacity-4" alt="GitHub profile README for @M0nica" loading="lazy" width="766" height="748">
</picture>
</div>
<div class="rounded-2 box-shadow-active-border-mktg position-relative z-1 overflow-hidden float-right home-readme-2">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/community-readme-2.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/community-readme-2.png" class="width-full height-auto" alt="GitHub profile README for @ethomson" loading="lazy" width="766" height="730">
</picture>
</div>
</div>
</div>
</div>
</li>
<li class="col-12 d-flex flex-items-center position-relative f5-mktg text-gray-light-mktg py-2 unselectable" aria-hidden="true">
<img src="https://github.githubassets.com/images/modules/site/home/icons/heart.svg" class="home-git-item color-bg-default flex-shrink-0 mr-3 position-relative z-1" height="22" width="28" alt="" loading="lazy" decoding="async">
<img src="https://avatars.githubusercontent.com/sophshep?s=64&v=4" class="d-none d-sm-block flex-shrink-0 avatar avatar-4 mr-3 circle color-bg-subtle" alt="@sophshep" loading="lazy">
<span class="text-truncate"><strong class="text-semibold text-gray-dark-mktg">sophshep</strong> started sponsoring you for <strong class="text-semibold text-gray-dark-mktg">$10/month</strong> <span title="Label: 2x" data-view-component="true" class="Label">2x</span> 3 days ago</span>
</li>
<li class="col-12 d-flex flex-items-center position-relative f5-mktg text-gray-light-mktg py-2 unselectable" aria-hidden="true">
<img src="https://github.githubassets.com/images/modules/site/home/icons/heart.svg" class="home-git-item color-bg-default flex-shrink-0 mr-3 position-relative z-1" height="22" width="28" alt="" loading="lazy" decoding="async">
<img src="https://avatars.githubusercontent.com/joshaber?s=64&v=4" class="d-none d-sm-block flex-shrink-0 avatar avatar-4 mr-3 circle color-bg-subtle" alt="@joshaber" loading="lazy">
<span class="text-truncate"><strong class="text-semibold text-gray-dark-mktg">joshaber</strong> started sponsoring you for <strong class="text-semibold text-gray-dark-mktg">$10/month</strong> <span title="Label: 5x" data-view-component="true" class="Label">5x</span> 2 days ago</span>
</li>
<li class="col-12 d-flex flex-items-center position-relative f5-mktg text-gray-light-mktg py-2 unselectable" aria-hidden="true">
<img src="https://github.githubassets.com/images/modules/site/home/icons/heart.svg" class="home-git-item color-bg-default flex-shrink-0 mr-3 position-relative z-1" height="22" width="28" alt="" loading="lazy" decoding="async">
<img src="https://avatars.githubusercontent.com/pmarsceill?s=64&v=4" class="d-none d-sm-block flex-shrink-0 avatar avatar-4 mr-3 circle color-bg-subtle" alt="@pmarsceill" loading="lazy">
<span class="text-gray-mktg text-truncate"><strong class="text-semibold text-gray-dark-mktg">pmarsceill</strong> started sponsoring you for <strong class="text-semibold text-gray-dark-mktg">$25/month</strong> 2 days ago</span>
</li>
<li class="col-11 col-sm-10 col-lg-12 position-relative z-1">
<div class="js-build-in-trigger d-flex flex-column flex-lg-row flex-items-center gutter gutter-spacious py-9 py-md-10">
<div class="js-build-in-item build-in-slideX-left col-12 col-lg-5 mb-6">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" height="28" viewBox="0 0 28 20" width="28" aria-hidden="true" class="home-git-icon home-git-item float-left mr-n6 position-relative z-1"><circle cx="14" cy="10" fill="#fff" r="5" stroke="#d0d6df" stroke-width="2"></circle></svg>
<h3 class="f2-mktg text-gray-mktg text-semibold mb-5 col-5-max">That open source code you wrote for yourself might just help someone else. <span class="text-gray-dark-mktg">Get paid for building what matters to you with GitHub Sponsors.</span></h3>
<h4 class="f4-mktg text-semibold text-gray-mktg mb-1">Support the projects you depend on, too.</h4>
<h3 class="h5-mktg mb-5 text-gradient-blue-purple">100% to developers, zero fees</h3>
<a class="link-mktg text-semibold color-fg-default py-1 f4-mktg link-emphasis-mktg" href="/sponsors" data-analytics-event="{"category":"Home","action":"click to learn more about Sponsors","label":"ref_page:/;ref_cta:Learn more about Sponsors;ref_loc:community launchpad"}">
Learn more about Sponsors <svg xmlns="http://www.w3.org/2000/svg" class="octicon arrow-symbol-mktg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill="currentColor" d="M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z"></path><path class="octicon-chevrow-stem" stroke="currentColor" d="M1.75 8H11" stroke-width="1.5" stroke-linecap="round"></path></svg>
</a>
</div>
<div class="col-12 col-lg-5 offset-lg-1">
<div class="js-build-in-item home-sponsors-comp">
<div class="rounded-2 box-shadow-default-border-mktg position-relative z-1 home-sponsors-1">
<img src="https://github.githubassets.com/images/modules/site/home/icons/heart.svg" width="72" height="72" class="home-sponsors-heart-1 js-build-in-item position-absolute z-1" alt="Floating heart" loading="lazy">
<img src="https://github.githubassets.com/images/modules/site/home/icons/heart.svg" width="72" height="72" class="home-sponsors-heart-2 js-build-in-item position-absolute z-1" alt="Floating heart" loading="lazy">
<img src="https://github.githubassets.com/images/modules/site/home/icons/heart.svg" width="72" height="72" class="home-sponsors-heart-3 js-build-in-item position-absolute z-1" alt="Floating heart" loading="lazy">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/community-sponsor-1.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/community-sponsor-1.png" class="width-full height-auto opacity-4" alt="GitHub profile card for the Homebrew organization" loading="lazy" width="768" height="484">
</picture>
</div>
<div class="rounded-2 box-shadow-active-border-mktg position-relative z-1 float-right home-sponsors-2">
<img src="https://github.githubassets.com/images/modules/site/home/icons/heart.svg" width="72" height="72" class="home-sponsors-heart-1 js-build-in-item position-absolute z-1" alt="Floating heart" loading="lazy">
<img src="https://github.githubassets.com/images/modules/site/home/icons/heart.svg" width="72" height="72" class="home-sponsors-heart-2 js-build-in-item position-absolute z-1" alt="Floating heart" loading="lazy">
<img src="https://github.githubassets.com/images/modules/site/home/icons/heart.svg" width="72" height="72" class="home-sponsors-heart-3 js-build-in-item position-absolute z-1" alt="Floating heart" loading="lazy">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/community-sponsor-2.webp" type="image/webp">
<img src="https://github.githubassets.com/images/modules/site/home/community-sponsor-2.png" class="width-full height-auto" alt="GitHub profile card for @prophen" loading="lazy" width="768" height="524">
</picture>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="bg-gray-dark-mktg pb-11 pb-md-12 position-relative" data-color-mode=dark data-light-theme=light data-dark-theme=dark>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" preserveAspectRatio="none" viewBox="0 0 1680 40" aria-hidden="true" class="position-absolute top-0 width-full mt-n1" style="transform: scaleY(-1);"><path d="M0 40h1680V30S1340 0 840 0 0 30 0 30z" fill="#fff"></path></svg>
<div class="container-xl p-responsive">
<picture>
<source srcset="https://github.githubassets.com/images/modules/site/home/footer-illustration.webp" media="(min-width: 700px)" type="image/webp">
<source srcset="https://github.githubassets.com/images/modules/site/home/footer-illustration-894.webp" type="image/webp">
<source srcset="https://github.githubassets.com/images/modules/site/home/footer-illustration.svg" media="(min-width: 700px)" type="image/svg">
<source srcset="https://github.githubassets.com/images/modules/site/home/footer-illustration-894.svg" type="image/svg">
<img
src="https://github.githubassets.com/images/modules/site/home/footer-illustration.svg"
alt="Illustration of the evolution of development by octocats"
width="2900"
height="1494"
class="home-footer-illustration height-auto position-relative z-1 width-full d-block events-none" loading="lazy" decoding="async">
</picture>
<div class="d-flex flex-items-center flex-column flex-lg-row gutter gutter-spacious">
<div class="col-12 col-md-10 col-lg-6 mx-auto mx-lg-0 text-center text-lg-left mb-5 mb-md-6">
<h2 class="h1-mktg color-fg-default mb-2 mb-sm-3">Make your contribution</h2>
<p class="f2-mktg text-gray-light-mktg mr-lg-n4 mb-4 text-normal">Small experiments, inspired inventions, and the software everyone depends on—the code you write on GitHub can reach one codebase or millions.</p>
<a class="btn-mktg mr-2 mb-2 width-full width-sm-auto btn-signup-mktg" data-analytics-event="{"category":"Sign up","action":"click to sign up for account","label":"ref_page:/;ref_cta:Sign up for GitHub;ref_loc:footer launchpad;"}" href="/signup?ref_cta=Sign+up+for+GitHub&ref_loc=footer+launchpad&ref_page=%2F">
Sign up for GitHub
</a>
<a class="btn-mktg mr-2 mb-2 width-full width-sm-auto btn-muted-mktg" data-analytics-event="{"category":"Contact Sales","action":"click to Contact Sales","label":"ref_page:/;ref_cta:Contact Sales;ref_loc:footer launchpad"}" href="https://github.com/enterprise/contact?ref_page=/&ref_cta=Contact%20Sales&ref_loc=footer%20launchpad">
Contact Sales
</a>
</div>
<div class="col-12 col-lg-6 offset-lg-n2">
<div class="offset-n1 ml-lg-0 home-featured-repos position-relative">
<div class="width-full flex-shrink-0 offset-1 offset-lg-3 d-flex flex-justify-center gutter-condensed gutter-lg py-2 py-lg-3">
<div class="col-3">
<a href="/tensorflow/tensorflow"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:tensorflow/tensorflow;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/tensorflow?s=64&v=4" alt="Tensorflow" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">tensorflow/<span class="color-fg-default">tensorflow</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">An Open Source Machine Learning Framework for Everyone</p>
</a>
</div>
<div class="col-3">
<a href="gatsbyjs/gatsby"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:gatsbyjs/gatsby;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/gatsbyjs?s=64&v=4" alt="Gatsby" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">gatsbyjs/<span class="color-fg-default">gatsby</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">Build blazing fast, modern apps and websites with React</p>
</a>
</div>
<div class="col-3">
<a href="home-assistant/core"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:home-assistant/core;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/home-assistant?s=64&v=4" alt="Home Assistant" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">home-assistant/<span class="color-fg-default">core</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">🏡 Open source home automation that puts local control and privacy first</p>
</a>
</div>
</div>
<div class="width-full offset-lg-2 d-flex flex-justify-center gutter-condensed gutter-lg py-2 py-lg-3">
<div class="col-3">
<a href="/rust-lang/rust"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:rust-lang/rust;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/rust-lang?s=64&v=4" alt="The Rust Programming Language" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">rust-lang/<span class="color-fg-default">rust</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">Empowering everyone to build reliable and efficient software.</p>
</a>
</div>
<div class="col-3">
<a href="/flutter/flutter"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:flutter/flutter;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/flutter?s=64&v=4" alt="Flutter" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">flutter/<span class="color-fg-default">flutter</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">Flutter makes it easy and fast to build beautiful apps for mobile and beyond.</p>
</a>
</div>
<div class="col-3">
<a href="/kubernetes/kubernetes"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:kubernetes/kubernetes;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/kubernetes?s=64&v=4" alt="Kubernetes" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">kubernetes/<span class="color-fg-default">kubernetes</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">Production-Grade Container Scheduling and Management</p>
</a>
</div>
</div>
<div class="width-full offset-1 d-flex flex-justify-center gutter-condensed gutter-lg py-2 py-lg-3">
<div class="col-3">
<a href="/apple/swift"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:apple/swift;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/apple?s=64&v=4" alt="Kubernetes" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">apple/<span class="color-fg-default">swift</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">The Swift Programming Language</p>
</a>
</div>
<div class="col-3">
<a href="/ansible/ansible"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:ansible/ansible;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/ansible?s=64&v=4" alt="Ansible" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">ansible/<span class="color-fg-default">ansible</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">Ansible is a radically simple IT automation platform.</p>
</a>
</div>
<div class="col-3">
<a href="/hashicorp/terraform"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:hashicorp/terraform;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/hashicorp?s=64&v=4" alt="Hashicorp" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">hashicorp/<span class="color-fg-default">terraform</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">Terraform enables you to safely and predictably create, change, and improve infrastructure. </p>
</a>
</div>
</div>
<div class="width-full offset-lg-n1 d-flex flex-justify-center gutter-condensed gutter-lg py-2 py-lg-3">
<div class="col-3">
<a href="/ohmyzsh/ohmyzsh"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:ohmyzsh/ohmyzsh;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/ohmyzsh?s=64&v=4" alt="Oh my zsh" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">ohmyzsh/<span class="color-fg-default">ohmyzsh</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">🙃 A delightful community-driven framework for managing your zsh configuration.</p>
</a>
</div>
<div class="col-3">
<a href="/facebook/react"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:facebook/react;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/facebook?s=64&v=4" alt="Facebook" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">facebook/<span class="color-fg-default">react</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">A declarative, efficient, and flexible JavaScript library for building user interfaces.</p>
</a>
</div>
<div class="col-3">
<a href="/npm/cli"
class="home-repo-card js-home-repo-card d-block p-3 rounded-2 box-shadow-card-border-light-mktg text-gray-light-mktg no-underline"
data-analytics-event="{"category":"Home","action":"click to go to repository","label":"ref_page:/;ref_cta:npm/cli;ref_loc:footer launchpad;"}"
>
<div class="d-flex flex-items-center mb-2">
<img src="https://avatars.githubusercontent.com/npm?s=64&v=4" alt="npm" class="color-bg-default avatar avatar-5 rounded-2 mr-2" loading="lazy" decoding="async">
<p class="f5-mktg text-semibold">npm/<span class="color-fg-default">cli</span></p>
</div>
<p class="f6-mktg mb-0 line-clamp-2" style="-webkit-box-orient: vertical; min-height: 3em;">The package manager for JavaScript</p>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<footer class="footer pt-6 position-relative" >
<div class="container-xl p-responsive">
<div class="d-flex flex-wrap py-5 mb-5">
<div class="col-12 col-lg-4 mb-5">
<a href="/" data-analytics-event="{"category":"Footer","action":"go to home","label":"text:home"}" class="color-fg-default" aria-label="Go to GitHub homepage">
<img class="footer-logo-mktg" src="https://github.githubassets.com/images/modules/site/icons/footer/github-logo.svg" width="84" height="30" loading="lazy" decoding="async" alt="GitHub">
</a>
</div>
<div class="col-6 col-sm-3 col-lg-2 mb-6 mb-md-2 pr-3 pr-lg-0 pl-lg-4">
<h2 class="h5 mb-3 text-mono color-fg-muted text-normal">
Product
</h2>
<ul class="list-style-none color-fg-muted f5">
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to features","label":"text:features"}" href="/features">Features</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to security","label":"text:security"}" href="/security">Security</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to team","label":"text:team"}" href="/team">Team</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to enterprise","label":"text:enterprise"}" href="/enterprise">Enterprise</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to customer stories","label":"text:customer stories"}" href="/customer-stories?type=enterprise">Customer stories</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to the readme project","label":"text:the readme project"}" href="/readme">The ReadME Project</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to pricing","label":"text:pricing"}" href="/pricing">Pricing</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to resources","label":"text:resources"}" href="https://resources.github.com">Resources</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to roadmap","label":"text:roadmap"}" href="https://github.com/github/roadmap">Roadmap</a>
</li>
</ul>
</div>
<div class="col-6 col-sm-3 col-lg-2 mb-6 mb-md-2 pr-3 pr-md-0 pl-md-4">
<h2 class="h5 mb-3 text-mono color-fg-muted text-normal">
Platform
</h2>
<ul class="list-style-none f5">
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to api","label":"text:api"}" href="https://docs.github.com">Developer API</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to partner","label":"text:partner"}" href="https://partner.github.com">Partners</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to atom","label":"text:atom"}" href="https://atom.io">Atom</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to electron","label":"text:electron"}" href="https://www.electronjs.org">Electron</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to desktop","label":"text:desktop"}" href="https://desktop.github.com/">GitHub Desktop</a>
</li>
</ul>
</div>
<div class="col-6 col-sm-3 col-lg-2 mb-6 mb-md-2 pr-3 pr-md-0 pl-md-4">
<h2 class="h5 mb-3 text-mono color-fg-muted text-normal">
Support
</h2>
<ul class="list-style-none f5">
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to help","label":"text:Docs"}" href="https://docs.github.com">Docs</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to community","label":"text:community"}" href="https://github.community">Community Forum</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to professional services","label":"text:professional services"}" href="https://services.github.com/">Professional Services</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to learning lab","label":"text:learning lab"}" href="https://lab.github.com/">Learning Lab</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to status","label":"text:status"}" href="https://www.githubstatus.com/">Status</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to contact","label":"text:contact"}" href="https://support.github.com?tags=dotcom-footer">Contact GitHub</a>
</li>
</ul>
</div>
<div class="col-6 col-sm-3 col-lg-2 mb-6 mb-md-2 pr-3 pr-md-0 pl-md-4">
<h2 class="h5 mb-3 text-mono color-fg-muted text-normal">
Company
</h2>
<ul class="list-style-none f5">
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to about","label":"text:about"}" href="https://github.com/about">About</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to blog","label":"text:blog"}" href="https://github.blog">Blog</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to careers","label":"text:careers"}" href="/about/careers">Careers</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to press","label":"text:press"}" href="/about/press">Press</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to diversity","label":"text:Inclusion"}" href="/about/diversity">Inclusion</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to social impact","label":"text:social impact"}" href="https://socialimpact.github.com/">Social Impact</a>
</li>
<li class="lh-condensed mb-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to shop","label":"text:shop"}" href="https://shop.github.com">Shop</a>
</li>
</ul>
</div>
</div>
</div>
<div class="color-bg-subtle">
<div class="container-xl p-responsive f6 py-4 d-sm-flex flex-justify-between flex-row-reverse flex-items-center">
<ul class="list-style-none d-flex flex-items-center mb-3 mb-sm-0 lh-condensed-ultra">
<li class="mr-3">
<a href="https://twitter.com/github" data-analytics-event="{"category":"Footer","action":"go to Twitter","label":"text:twitter"}" class="color-fg-subtle">
<img src="https://github.githubassets.com/images/modules/site/icons/footer/twitter.svg" height="18" width="22" class="d-block" loading="lazy" decoding="async" alt="Twitter icon">
<span class="sr-only">GitHub on Twitter</span>
</a>
</li>
<li class="mr-3">
<a href="https://www.facebook.com/GitHub" data-analytics-event="{"category":"Footer","action":"go to Facebook","label":"text:facebook"}" class="color-fg-subtle">
<img src="https://github.githubassets.com/images/modules/site/icons/footer/facebook.svg" width="18" height="18" class="d-block" loading="lazy" decoding="async" alt="Facebook icon">
<span class="sr-only">GitHub on Facebook</span>
</a>
</li>
<li class="mr-3">
<a href="https://www.youtube.com/github" data-analytics-event="{"category":"Footer","action":"go to YouTube","label":"text:youtube"}" class="color-fg-subtle">
<img src="https://github.githubassets.com/images/modules/site/icons/footer/youtube.svg" width="23" height="16" class="d-block" loading="lazy" decoding="async" alt="YouTube icon">
<span class="sr-only">GitHub on YouTube</span>
</a>
</li>
<li class="mr-3 flex-self-start">
<a href="https://www.linkedin.com/company/github" data-analytics-event="{"category":"Footer","action":"go to Linkedin","label":"text:linkedin"}" class="color-fg-subtle">
<img src="https://github.githubassets.com/images/modules/site/icons/footer/linkedin.svg" width="19" height="18" class="d-block" loading="lazy" decoding="async" alt="Linkedin icon">
<span class="sr-only">GitHub on LinkedIn</span>
</a>
</li>
<li>
<a href="https://github.com/github" data-analytics-event="{"category":"Footer","action":"go to github's org","label":"text:github"}" class="color-fg-subtle">
<img src="https://github.githubassets.com/images/modules/site/icons/footer/github-mark.svg" width="20" height="20" class="d-block" loading="lazy" decoding="async" alt="GitHub mark">
<span class="sr-only">GitHub’s organization on GitHub</span>
</a>
</li>
</ul>
<ul class="list-style-none d-flex flex-wrap color-fg-muted">
<li class="mr-3">
© 2022 GitHub, Inc.
</li>
<li class="mr-3">
<a href="https://docs.github.com/en/github/site-policy/github-terms-of-service" data-analytics-event="{"category":"Footer","action":"go to terms","label":"text:terms"}" class="Link--secondary">Terms</a>
</li>
<li class="mr-3">
<a href="https://docs.github.com/en/github/site-policy/github-privacy-statement" data-analytics-event="{"category":"Footer","action":"go to privacy","label":"text:privacy"}" class="Link--secondary">Privacy</a>
</li>
<li class="mr-3">
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to site map","label":"text:site map"}" href="/site-map">Site Map</a>
</li>
<li>
<a class="Link--secondary" data-analytics-event="{"category":"Footer","action":"go to Git Guides","label":"text:What is Git?"}" href="/git-guides">What is Git?</a>
</li>
</ul>
</div>
</div>
</footer>
<div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
<button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
<path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path>
</svg>
</button>
You can’t perform that action at this time.
</div>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden
>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
<span class="js-stale-session-flash-signed-in" hidden>You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="js-stale-session-flash-signed-out" hidden>You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>
<template id="site-details-dialog">
<details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open>
<summary role="button" aria-label="Close dialog"></summary>
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal">
<button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
<path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path>
</svg>
</button>
<div class="octocat-spinner my-6 js-details-dialog-spinner"></div>
</details-dialog>
</details>
</template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0">
<div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;">
</div>
</div>
<template id="snippet-clipboard-copy-button">
<div class="zeroclipboard-container position-absolute right-0 top-0">
<clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0 tooltipped-no-delay" data-copy-feedback="Copied!" data-tooltip-direction="w">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2">
<path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path>
</svg>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2">
<path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path>
</svg>
</clipboard-copy>
</div>
</template>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/benches/files/stackoverflow_com_17_05_2022.html | HTML |
<!DOCTYPE html>
<html class="html__responsive html__unpinned-leftnav" lang="en">
<head>
<title>Stack Overflow - Where Developers Learn, Share, & Build Careers</title>
<link rel="shortcut icon" href="https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196">
<link rel="apple-touch-icon" href="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a">
<link rel="image_src" href="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a">
<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">
<meta name="description" content="Stack Overflow is the largest, most trusted online community for developers to learn, share​ ​their programming ​knowledge, and build their careers."/>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0">
<meta property="og:type" content= "website" />
<meta property="og:url" content="https://stackoverflow.com/"/>
<meta property="og:site_name" content="Stack Overflow" />
<meta property="og:image" itemprop="image primaryImageOfPage" content="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon@2.png?v=73d79a89bded" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:domain" content="stackoverflow.com"/>
<meta name="twitter:title" property="og:title" itemprop="name" content="Stack Overflow - Where Developers Learn, Share, & Build Careers" />
<meta name="twitter:description" property="og:description" itemprop="description" content="Stack Overflow | The World’s Largest Online Community for Developers" />
<script id="webpack-public-path" type="text/uri-list">https://cdn.sstatic.net/</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script async src="https://cdn.sstatic.net/Js/third-party/npm/@stackoverflow/stacks/dist/js/stacks.min.js?v=6cc27826a5fd"></script>
<script src="https://cdn.sstatic.net/Js/stub.en.js?v=e700279bb0cc"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Shared/stacks.css?v=047e88ccaeee">
<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=ed88821491ef">
<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Shared/Product/product.css?v=f5d2db9a2252">
<script defer src="https://cdn.sstatic.net/Js/product/animations.en.js?v=660a00b4b4f3"></script>
<script defer src="https://cdn.sstatic.net/Js/product/lazy-load-images.en.js?v=767e999ba5d5"></script>
<link rel="alternate" type="application/atom+xml" title="Feed of recent questions" href="/feeds">
<style>
.p-wrapper-home {
max-width: 1950px;
margin-left: auto;
margin-right: auto;
}
.js-user-slider {
transition: width 0.2s, height 0.2s;
}
.js-user-slider span {
display: none;
opacity: 0;
}
.js-user-slider span:first-of-type {
display: block;
opacity: 1;
}
.js-user-slide-init {
transform: translate3d(0, -100%, 0);
}
.js-user-slider.js-loaded span {
display: block;
position: absolute;
top: 100%;
left: auto;
right: auto;
}
.js-user-slide-in {
animation: slideIn 1s forwards;
}
@keyframes slideIn {
0% {
opacity: 0;
transform: translate3d(0, -150%, 0);
}
100% {
opacity: 1;
transform: translate3d(0, -100%, 0);
}
}
.js-user-slide-out {
animation: slideOut 1s forwards;
}
@keyframes slideOut {
0% {
opacity: 1;
transform: translate3d(0, -100%, 0);
}
30% {
opacity: 0;
}
100% {
opacity: 0;
transform: translate3d(0, -50%, 0);
}
}
.js-use-case p {
display: none;
}
.js-use-case.js-use-case--is-active p {
display: block;
}
.js-use-case.js-use-case--is-active h3 {
border-top-color: var(--black-500) !important;
}
.js-use-case.js-use-case--is-active svg {
color: var(--blue-500) !important;
}
</style>
<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Shared/Channels/channels.css?v=f039f0b977b7">
<script type="application/json" data-role="module-args" data-module-name="Shared/options.mod">{"options":{"locale":"en","serverTime":1652738914,"routeName":"Home/Index","stackAuthUrl":"https://stackauth.com","networkMetaHostname":"meta.stackexchange.com","site":{"name":"Stack Overflow","description":"Q\u0026A for professional and enthusiast programmers","isNoticesTabEnabled":true,"enableNewTagCreationWarning":true,"insertSpaceAfterNameTabCompletion":false,"id":1,"cookieDomain":".stackoverflow.com","childUrl":"https://meta.stackoverflow.com","negativeVoteScoreFloor":null,"enableSocialMediaInSharePopup":true,"protocol":"https"},"user":{"fkey":"6e9ad77e87015cb55df7c11fc5532cc338bf59ac7d3455d0b400e99959e9cd40","tid":"e21446ca-a653-3e75-1008-a9cf24e6199a","rep":0,"isAnonymous":true,"isAnonymousNetworkWide":true,"ab":{"hot_questions_sidebar":{"v":"signupoptincopy","g":3}}},"events":{"postType":{"question":1},"postEditionSection":{"title":1,"body":2,"tags":3}},"story":{"minCompleteBodyLength":75,"likedTagsMaxLength":300,"dislikedTagsMaxLength":300},"jobPreferences":{"maxNumDeveloperRoles":2,"maxNumIndustries":4},"svgIconPath":"https://cdn.sstatic.net/Img/stacks-icons","svgIconHash":"8667b5d4a480"}}</script>
<script type="application/json" data-role="module-args" data-module-name="Shared/settings.mod">{"settings":{"userProfile":{"openGraphAPIKey":"4a307e43-b625-49bb-af15-ffadf2bda017"},"userMessaging":{"showNewFeatureNotice":true},"tags":{},"subscriptions":{"defaultBasicMaxTrueUpSeats":250,"defaultFreemiumMaxTrueUpSeats":50,"defaultMaxTrueUpSeats":1000},"snippets":{"renderDomain":"stacksnippets.net","snippetsEnabled":true},"site":{"allowImageUploads":true,"enableImgurHttps":true,"enableUserHovercards":true,"forceHttpsImages":true,"styleCode":true},"questions":{"enableQuestionTitleLengthLiveWarning":true,"maxTitleSize":150,"questionTitleLengthStartLiveWarningChars":50},"intercom":{"appId":"inf0secd","hostBaseUrl":"https://stacksnippets.net"},"paths":{},"monitoring":{"clientTimingsAbsoluteTimeout":30000,"clientTimingsDebounceTimeout":1000},"mentions":{"maxNumUsersInDropdown":50},"markdown":{"enableTables":true},"legal":{"oneTrustConfigId":"c3d9f1e3-55f3-4eba-b268-46cee4c6789c"},"flags":{"allowRetractingCommentFlags":true,"allowRetractingFlags":true},"elections":{"opaVoteResultsBaseUrl":"https://www.opavote.com/results/"},"comments":{},"accounts":{"currentPasswordRequiredForChangingStackIdPassword":true}}}</script>
<script>StackExchange.init();</script>
<script>
StackExchange.using.setCacheBreakers({"Js/adops.en.js":"6da43f5e0a84","Js/ask.en.js":"7ff9a9068fd6","Js/begin-edit-event.en.js":"dd955babf04d","Js/copy-transpiled.en.js":"977ec0a0b497","Js/events.en.js":"","Js/explore-qlist.en.js":"2b1f34938b8b","Js/full-anon.en.js":"7d3538982122","Js/full.en.js":"bc4b7d4ec0cd","Js/highlightjs-loader.en.js":"3c37abf5cb6d","Js/inline-tag-editing.en.js":"77f922e6e562","Js/keyboard-shortcuts.en.js":"fa78d9020f1f","Js/markdown-it-loader.en.js":"5818ef89ff9d","Js/moderator.en.js":"df5a2eb14f4c","Js/postCollections-transpiled.en.js":"529276cfb7ae","Js/post-validation.en.js":"5dfbf70d3623","Js/question-editor.en.js":"","Js/review-v2-transpiled.en.js":"b588001d0a66","Js/revisions.en.js":"a86490719687","Js/stacks-editor.en.js":"209d11c01c46","Js/tageditor.en.js":"825c9597ce2d","Js/tageditornew.en.js":"857acd8b77e4","Js/tagsuggestions.en.js":"1bcff7d98f97","Js/unlimited-transpiled.en.js":"7ed67670b600","Js/wmd.en.js":"7014572a759f","Js/snippet-javascript-codemirror.en.js":"73fce5cc7219"});
StackExchange.using("gps", function() {
StackExchange.gps.init(false);
});
</script>
<noscript id="noscript-css"><style>body,.s-topbar{margin-top:1.9em}</style></noscript>
</head>
<body class="home-page unified-theme">
<div id="notify-container"></div>
<div id="custom-header"></div>
<header class="s-topbar ps-fixed t0 l0 js-top-bar">
<div class="s-topbar--container">
<a href="#" class="s-topbar--menu-btn js-left-sidebar-toggle" role="menuitem" aria-haspopup="true" aria-controls="left-sidebar" aria-expanded="false"><span></span></a>
<div class="topbar-dialog leftnav-dialog js-leftnav-dialog dno">
<div class="left-sidebar js-unpinned-left-sidebar" data-can-be="left-sidebar" data-is-here-when="sm md lg"></div>
</div>
<a href="https://stackoverflow.com" class="s-topbar--logo js-gps-track"
data-gps-track="top_nav.click({is_current:true, location:1, destination:8})">
<span class="-img _glyph">Stack Overflow</span>
</a>
<ol class="s-navigation" role="presentation">
<li class="md:d-none">
<a href="https://stackoverflow.co/" class="s-navigation--item js-gps-track"
data-gps-track="top_nav.products.click({location:1, destination:7})"
data-ga="["top navigation","about menu click",null,null,null]">About</a>
</li>
<li>
<a href="#"
class="s-navigation--item js-gps-track js-products-menu"
aria-controls="products-popover"
data-controller="s-popover"
data-action="s-popover#toggle"
data-s-popover-placement="bottom"
data-s-popover-toggle-class="is-selected"
data-gps-track="top_nav.products.click({location:1, destination:1})"
data-ga="["top navigation","products menu click",null,null,null]">
Products
</a>
</li>
<li class="md:d-none">
<a href="/teams" class="s-navigation--item js-gps-track"
data-gps-track="top_nav.products.click({location:1, destination:7})"
data-ga="["top navigation","learn more - teams",null,null,null]">For Teams</a>
</li>
</ol>
<div class="s-popover ws2 mtn2 p0"
id="products-popover"
role="menu"
aria-hidden="true">
<div class="s-popover--arrow"></div>
<ol class="list-reset s-anchors s-anchors__inherit">
<li class="m6">
<a href="/questions" class="bar-sm p6 d-block h:bg-black-100 js-gps-track"
data-gps-track="top_nav.products.click({location:1, destination:2})"
data-ga="["top navigation","public qa submenu click",null,null,null]">
<span class="fs-body1 d-block">Stack Overflow</span>
<span class="fs-caption d-block fc-light">Public questions & answers</span>
</a>
</li>
<li class="m6">
<a href="/teams" class="bar-sm p6 d-block h:bg-black-100 js-gps-track"
data-gps-track="top_nav.products.click({location:1, destination:3})"
data-ga="["top navigation","teams submenu click",null,null,null]">
<span class="fs-body1 d-block">Stack Overflow for Teams</span>
<span class="fs-caption d-block fc-light">Where developers & technologists share private knowledge with coworkers</span>
</a>
</li>
<li class="m6">
<a href="https://stackoverflow.co/talent" class="bar-sm p6 d-block h:bg-black-100 js-gps-track"
data-gps-track="top_nav.products.click({location:1, destination:5})"
data-ga="["top navigation","talent submenu click",null,null,null]">
<span class="fs-body1 d-block">Talent</span>
<span class="fs-caption d-block fc-light">
Build your employer brand </span>
</a>
</li>
<li class="m6">
<a href="https://stackoverflow.co/advertising" class="bar-sm p6 d-block h:bg-black-100 js-gps-track"
data-gps-track="top_nav.products.click({location:1, destination:6})"
data-ga="["top navigation","advertising submenu click",null,null,null]">
<span class="fs-body1 d-block">Advertising</span>
<span class="fs-caption d-block fc-light">Reach developers & technologists worldwide</span>
</a>
</li>
<li class="bg-black-025 bt bc-black-075 py6 px6 bbr-md">
<a href="https://stackoverflow.co/" class="fc-light d-block py6 px6 h:fc-black-800 js-gps-track"
data-gps-track="top_nav.products.click({location:1, destination:7})"
data-ga="["top navigation","about submenu click",null,null,null]">About the company</a>
</li>
</ol>
</div>
<form id="search" role="search" action=/search class="s-topbar--searchbar js-searchbar " autocomplete="off">
<div class="s-topbar--searchbar--input-group">
<input name="q"
type="text"
placeholder="Search…"
value=""
autocomplete="off"
maxlength="240"
class="s-input s-input__search js-search-field "
aria-label="Search"
aria-controls="top-search"
data-controller="s-popover"
data-action="focus->s-popover#show"
data-s-popover-placement="bottom-start"/>
<svg aria-hidden="true" class="s-input-icon s-input-icon__search svg-icon iconSearch" width="18" height="18" viewBox="0 0 18 18"><path d="m18 16.5-5.14-5.18h-.35a7 7 0 1 0-1.19 1.19v.35L16.5 18l1.5-1.5ZM12 7A5 5 0 1 1 2 7a5 5 0 0 1 10 0Z"/></svg>
<div class="s-popover p0 wmx100 wmn4 sm:wmn-initial js-top-search-popover" id="top-search" role="menu">
<div class="s-popover--arrow"></div>
<div class="js-spinner p24 d-flex ai-center jc-center d-none">
<div class="s-spinner s-spinner__sm fc-orange-400">
<div class="v-visible-sr">Loading…</div>
</div>
</div>
<span class="v-visible-sr js-screen-reader-info"></span>
<div class="js-ac-results overflow-y-auto hmx3 d-none"></div>
<div class="js-search-hints" aria-describedby="Tips for searching"></div>
</div>
</div>
</form>
<ol class="s-topbar--content" role="presentation">
<li class="js-topbar-dialog-corral" role="presentation">
<div class="topbar-dialog siteSwitcher-dialog dno" role="menu">
<div class="header fw-wrap">
<h3 class="flex--item">
<a href="https://stackoverflow.com">current community</a>
</h3>
<div class="flex--item fl1">
<div class="ai-center d-flex jc-end">
<button
class="js-close-button s-btn s-btn__muted p0 ml8 d-none sm:d-block"
type="button"
aria-label="Close"
>
<svg aria-hidden="true" class="svg-icon iconClear" width="18" height="18" viewBox="0 0 18 18"><path d="M15 4.41 13.59 3 9 7.59 4.41 3 3 4.41 7.59 9 3 13.59 4.41 15 9 10.41 13.59 15 15 13.59 10.41 9 15 4.41Z"/></svg>
</button>
</div>
</div>
</div>
<div class="modal-content bg-powder-050 current-site-container">
<ul class="current-site ">
<li class="d-flex">
<div class="fl1">
<a href="https://stackoverflow.com"
class="current-site-link site-link js-gps-track d-flex gs8 gsx"
data-id="1"
data-gps-track="site_switcher.click({ item_type:3 })">
<div class="favicon favicon-stackoverflow site-icon flex--item" title="Stack Overflow"></div>
<span class="flex--item fl1">
Stack Overflow
</span>
</a>
</div>
<div class="related-links">
<a href="https://stackoverflow.com/help" class="js-gps-track" data-gps-track="site_switcher.click({ item_type:14 })">help</a>
<a href="https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com" class="js-gps-track" data-gps-track="site_switcher.click({ item_type:6 })">chat</a>
</div>
</li>
<li class="related-site d-flex">
<div class="L-shaped-icon-container">
<span class="L-shaped-icon"></span>
</div>
<a href="https://meta.stackoverflow.com"
class=" site-link js-gps-track d-flex gs8 gsx"
data-id="552"
data-gps-track="site.switch({ target_site:552, item_type:3 }),site_switcher.click({ item_type:4 })">
<div class="favicon favicon-stackoverflowmeta site-icon flex--item" title="Meta Stack Overflow"></div>
<span class="flex--item fl1">
Meta Stack Overflow
</span>
</a>
</li>
</ul>
</div>
<div class="header" id="your-communities-header">
<h3>
your communities </h3>
</div>
<div class="modal-content" id="your-communities-section">
<div class="call-to-login">
<a href="https://stackoverflow.com/users/signup?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2f" class="login-link js-gps-track" data-gps-track="site_switcher.click({ item_type:10 })">Sign up</a> or <a href="https://stackoverflow.com/users/login?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2f" class="login-link js-gps-track" data-gps-track="site_switcher.click({ item_type:11 })">log in</a> to customize your list. </div>
</div>
<div class="header">
<h3><a href="https://stackexchange.com/sites">more stack exchange communities</a>
</h3>
<a href="https://stackoverflow.blog" class="float-right">company blog</a>
</div>
<div class="modal-content">
<div class="child-content"></div>
</div>
</div>
</li>
<li><a href="#" class="s-topbar--item s-btn s-btn__icon s-btn__muted d-none sm:d-inline-flex js-searchbar-trigger" role="button" aria-label="Search" aria-haspopup="true" aria-controls="search" title="Click to show search"><svg aria-hidden="true" class="svg-icon iconSearch" width="18" height="18" viewBox="0 0 18 18"><path d="m18 16.5-5.14-5.18h-.35a7 7 0 1 0-1.19 1.19v.35L16.5 18l1.5-1.5ZM12 7A5 5 0 1 1 2 7a5 5 0 0 1 10 0Z"/></svg></a></li>
<li>
<a href="https://stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2f" class="s-topbar--item s-topbar--item__unset s-btn s-btn__filled ws-nowrap js-gps-track" rel="nofollow"
data-gps-track="login.click" data-ga="["top navigation","login button click",null,null,null]">Log in</a>
</li>
<li><a href="https://stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2f" class="s-topbar--item s-topbar--item__unset ml4 s-btn s-btn__primary ws-nowrap" rel="nofollow" data-ga="["sign up","Sign Up Navigation","Header",null,null]">Sign up</a></li>
</ol>
</div>
</header>
<script>
StackExchange.ready(function () { StackExchange.topbar.init(); });
StackExchange.scrollPadding.setPaddingTop(50, 10);
</script>
<div id="announcement-banner" class="js-announcement-banner bg-black-700 fc-white ff-sans fs-body2 py2"
data-campaign="2022-05-12.2022-dev-survey" data-cookie="notice-dsv" data-expire-date="1654660800000">
<div class="d-flex jc-space-between wmx12 mx-auto px16 py8">
<div class="flex--item mr12">
2022 Developer Survey is open! <a target="_blank"
class="s-link js-link js-gps-track fw-bold fc-blue-300" href="https://stackoverflow.az1.qualtrics.com/jfe/form/SV_5jeoE1pq9sFcwIe?utm_source=so-owned&utm_medium=announcement-banner&utm_campaign=dev-survey-2022" data-ga="["2022-dev-survey","Announcement Banner","https://stackoverflow.az1.qualtrics.com/jfe/form/SV_5jeoE1pq9sFcwIe?utm_source=so-owned&utm_medium=announcement-banner&utm_campaign=dev-survey-2022",null,{"dimension4":"2022-dev-survey"}]"
data-gps-track="announcement_banner.click({campaign: '2022-05-12.2022-dev-survey', location: 1, action: 2})">Take survey</a>.
</div>
<a class="flex--item fc-white js-dismiss js-gps-track" href="#" title="dismiss"
data-gps-track="announcement_banner.click({campaign: '2022-05-12.2022-dev-survey', location: 1, action: 1})"><svg aria-hidden="true" class="m0 svg-icon iconClear" width="18" height="18" viewBox="0 0 18 18"><path d="M15 4.41 13.59 3 9 7.59 4.41 3 3 4.41 7.59 9 3 13.59 4.41 15 9 10.41 13.59 15 15 13.59 10.41 9 15 4.41Z"/></svg></a>
</div>
</div>
<script>
StackExchange.ready(function () {
StackExchange.Notice.announcementBannerInit();
});
</script>
<div class="container wmx100 w100 p-ff-source">
<div id="left-sidebar" data-is-here-when="" class="left-sidebar js-pinned-left-sidebar ps-relative">
<div class="left-sidebar--sticky-container js-sticky-leftnav">
<nav role="navigation">
<ol class="nav-links">
<li class="ps-relative youarehere" >
<a
href="/"
class="pl8 js-gps-track nav-links--link"
data-gps-track="top_nav.click({is_current:true, location:1, destination:8})"
aria-controls="" data-controller="" data-s-popover-placement="right"
data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never">
<div class="d-flex ai-center">
<div class="flex--item truncate">
Home
</div>
</div>
</a>
</li>
<li>
<ol class="nav-links">
<li class="fs-fine tt-uppercase ml8 mt16 mb4 fc-light">Public</li>
<li class="ps-relative" >
<a id="nav-questions"
href="/questions"
class="pl8 js-gps-track nav-links--link -link__with-icon"
data-gps-track="top_nav.click({is_current:false, location:1, destination:1})"
aria-controls="" data-controller="" data-s-popover-placement="right"
data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never">
<svg aria-hidden="true" class="svg-icon iconGlobe" width="18" height="18" viewBox="0 0 18 18"><path d="M9 1C4.64 1 1 4.64 1 9c0 4.36 3.64 8 8 8 4.36 0 8-3.64 8-8 0-4.36-3.64-8-8-8ZM8 15.32a6.46 6.46 0 0 1-4.3-2.74 6.46 6.46 0 0 1-.93-5.01L7 11.68v.8c0 .88.12 1.32 1 1.32v1.52Zm5.72-2c-.2-.66-1-1.32-1.72-1.32h-1v-2c0-.44-.56-1-1-1H6V7h1c.44 0 1-.56 1-1V5h2c.88 0 1.4-.72 1.4-1.6v-.33a6.45 6.45 0 0 1 3.83 4.51 6.45 6.45 0 0 1-1.51 5.73v.01Z"/></svg> <span class="-link--channel-name">Questions</span>
</a>
</li>
<li class="ps-relative" >
<a id="nav-tags"
href="/tags"
class=" js-gps-track nav-links--link"
data-gps-track="top_nav.click({is_current:false, location:1, destination:2})"
aria-controls="" data-controller="" data-s-popover-placement="right"
data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never">
<div class="d-flex ai-center">
<div class="flex--item truncate">
Tags
</div>
</div>
</a>
</li>
<li class="ps-relative" >
<a id="nav-users"
href="/users"
class=" js-gps-track nav-links--link"
data-gps-track="top_nav.click({is_current:false, location:1, destination:3})"
aria-controls="" data-controller="" data-s-popover-placement="right"
data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never">
<div class="d-flex ai-center">
<div class="flex--item truncate">
Users
</div>
</div>
</a>
</li>
<li class="ps-relative" >
<a id="nav-companies"
href="https://stackoverflow.com/jobs/companies?so_medium=stackoverflow&so_source=SiteNav"
class=" js-gps-track nav-links--link"
data-gps-track="top_nav.click({is_current:false, location:1, destination:12})"
aria-controls="" data-controller="" data-s-popover-placement="right"
data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never">
<div class="d-flex ai-center">
<div class="flex--item truncate">
Companies
</div>
</div>
</a>
</li>
<li class="d-flex ml8 mt16 jc-space-between">
<div class="flex--item tt-uppercase tt-uppercase fs-fine fc-light">Collectives</div>
<div class="flex--item fs-fine fc-light">
<a href="javascript:void(0)" class="s-link s-link__inherit mr8 js-gps-track js-collectives-navcta-toggle"
role="button"
aria-controls="popover-discover-collectives"
data-controller="s-popover"
data-action="s-popover#toggle"
data-s-popover-placement="top"
data-s-popover-toggle-class="is-selected"
data-gps-track="top_nav.click({is_current:false, location:1, destination:17})">
<svg aria-hidden="true" class="svg-icon iconInfoSm" width="14" height="14" viewBox="0 0 14 14"><path d="M7 1a6 6 0 1 1 0 12A6 6 0 0 1 7 1Zm1 10V6H6v5h2Zm0-6V3H6v2h2Z"/></svg>
</a>
</div>
</li>
<li class="ps-relative" >
<a id="nav-collective-discover"
href="/collectives"
class="pl8 ai-center js-collectives-navcta-toggle js-gps-track nav-links--link -link__with-icon"
data-gps-track="top_nav.click({is_current:false, location:1, destination:18})"
aria-controls="" data-controller="" data-s-popover-placement="right"
data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never">
<svg aria-hidden="true" class="mt-auto fc-orange-400 svg-icon iconStarVerified" width="18" height="18" viewBox="0 0 18 18"><path d="M9.86.89a1.14 1.14 0 0 0-1.72 0l-.5.58c-.3.35-.79.48-1.23.33l-.72-.25a1.14 1.14 0 0 0-1.49.85l-.14.76c-.1.45-.45.8-.9.9l-.76.14c-.67.14-1.08.83-.85 1.49l.25.72c.15.44.02.92-.33 1.23l-.58.5a1.14 1.14 0 0 0 0 1.72l.58.5c.35.3.48.79.33 1.23l-.25.72c-.23.66.18 1.35.85 1.49l.76.14c.45.1.8.45.9.9l.14.76c.14.67.83 1.08 1.49.85l.72-.25c.44-.15.92-.02 1.23.33l.5.58c.46.52 1.26.52 1.72 0l.5-.58c.3-.35.79-.48 1.23-.33l.72.25c.66.23 1.35-.18 1.49-.85l.14-.76c.1-.45.45-.8.9-.9l.76-.14c.67-.14 1.08-.83.85-1.49l-.25-.72c-.15-.44-.02-.92.33-1.23l.58-.5c.52-.46.52-1.26 0-1.72l-.58-.5c-.35-.3-.48-.79-.33-1.23l.25-.72a1.14 1.14 0 0 0-.85-1.49l-.76-.14c-.45-.1-.8-.45-.9-.9l-.14-.76a1.14 1.14 0 0 0-1.49-.85l-.72.25c-.44.15-.92.02-1.23-.33l-.5-.58Zm-.49 2.67L10.6 6.6c.05.15.19.24.34.25l3.26.22c.36.03.5.48.23.71l-2.5 2.1a.4.4 0 0 0-.14.4l.8 3.16a.4.4 0 0 1-.6.44L9.2 12.13a.4.4 0 0 0-.42 0l-2.77 1.74a.4.4 0 0 1-.6-.44l.8-3.16a.4.4 0 0 0-.13-.4l-2.5-2.1a.4.4 0 0 1 .22-.7l3.26-.23a.4.4 0 0 0 .34-.25l1.22-3.03a.4.4 0 0 1 .74 0Z"/></svg> <span class="-link--channel-name">Explore Collectives</span>
</a>
</li>
</ol>
</li>
<li>
<ol class="nav-links">
<div class="js-freemium-cta ps-relative">
<div class="fs-fine tt-uppercase ml8 mt16 mb8 fc-light">Teams</div>
<div class="px32 pt16 pb0 fc-black-600 blr-sm overflow-hidden">
<strong class="fc-black-750 mb6">Stack Overflow for Teams</strong>
– Start collaborating and sharing organizational knowledge.
<img class="wmx100 mx-auto my8 h-auto d-block" width="139" height="114" src="https://cdn.sstatic.net/Img/teams/teams-illo-free-sidebar-promo.svg?v=47faa659a05e" alt="">
<a href="https://try.stackoverflow.co/why-teams/?utm_source=so-owned&utm_medium=side-bar&utm_campaign=campaign-38&utm_content=cta"
class="w100 s-btn s-btn__primary s-btn__xs bg-orange-400 js-gps-track"
data-gps-track="teams.create.left-sidenav.click({ Action: 6 })"
data-ga="["teams left navigation - anonymous","left nav free cta","stackoverflow.com/teams/create/free",null,null]">Create a free Team</a>
<a href="https://stackoverflow.co/teams"
class="w100 s-btn s-btn__muted s-btn__xs js-gps-track"
data-gps-track="teams.create.left-sidenav.click({ Action: 5 })"
data-ga="["teams left navigation - anonymous","left nav free cta","stackoverflow.com/teams",null,null]">Why Teams?</a>
</div>
</div>
<li class="d-flex ai-center jc-space-between ml8 mt24 mb4 js-create-team-cta d-none">
<div class="flex--item tt-uppercase fs-fine fc-light">Teams</div>
<div class="flex--item">
<a href="javascript:void(0)" class="s-link p12 fc-black-500 h:fc-black-800 js-gps-track"
role="button"
aria-controls="popover-teams-create-cta"
data-controller="s-popover"
data-action="s-popover#toggle"
data-s-popover-placement="bottom-start"
data-s-popover-toggle-class="is-selected"
data-gps-track="teams.create.left-sidenav.click({ Action: ShowInfo })"
data-ga="["teams left navigation - anonymous","left nav show teams info",null,null,null]">
<svg aria-hidden="true" class="svg-icon iconInfoSm" width="14" height="14" viewBox="0 0 14 14"><path d="M7 1a6 6 0 1 1 0 12A6 6 0 0 1 7 1Zm1 10V6H6v5h2Zm0-6V3H6v2h2Z"/></svg>
</a>
</div>
</li>
<li class="ps-relative js-create-team-cta d-none">
<a href="https://stackoverflow.com/teams/create/free?utm_source=so-owned&utm_medium=side-bar&utm_campaign=campaign-38&utm_content=cta"
class="pl8 js-gps-track nav-links--link"
title="Stack Overflow for Teams is a private, secure spot for your organization's questions and answers."
data-gps-track="teams.create.left-sidenav.click({ Action: FreemiumTeamsCreateClick })"
data-ga="["teams left navigation - anonymous","left nav team click","stackoverflow.com/teams/create/free",null,null]">
<div class="d-flex ai-center">
<div class="flex--item s-avatar va-middle bg-orange-400">
<div class="s-avatar--letter mtn1">
<svg aria-hidden="true" class="svg-icon iconBriefcaseSm" width="14" height="14" viewBox="0 0 14 14"><path d="M4 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1h.5c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5h-7A1.5 1.5 0 0 1 2 10.5v-5C2 4.67 2.67 4 3.5 4H4V3Zm5 1V3H5v1h4Z"/></svg>
</div>
<svg aria-hidden="true" class="native s-avatar--badge svg-icon iconShieldXSm" width="9" height="10" viewBox="0 0 9 10"><path d="M0 1.84 4.5 0 9 1.84v3.17C9 7.53 6.3 10 4.5 10 2.7 10 0 7.53 0 5.01V1.84Z" fill="var(--white)"/><path d="M1 2.5 4.5 1 8 2.5v2.51C8 7.34 5.34 9 4.5 9 3.65 9 1 7.34 1 5.01V2.5Zm2.98 3.02L3.2 7h2.6l-.78-1.48a.4.4 0 0 1 .15-.38c.34-.24.73-.7.73-1.14 0-.71-.5-1.23-1.41-1.23-.92 0-1.39.52-1.39 1.23 0 .44.4.9.73 1.14.12.08.18.23.15.38Z" fill="var(--black-500)"/></svg>
</div>
<div class="flex--item pl6">
Create free Team
</div>
</div>
</a>
</li>
</ol>
</li>
</ol>
</nav>
</div>
<div class="s-popover ws2" id="popover-discover-collectives" role="menu">
<div class="s-popover--arrow"></div>
<div>
<svg aria-hidden="true" class="fc-orange-500 float-right ml24 svg-spot spotCollective" width="48" height="48" viewBox="0 0 48 48"><path d="M25.5 7a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM14 18.25c0-.69.56-1.25 1.25-1.25h22.5c.69 0 1.25.56 1.25 1.25V37.5a1 1 0 0 1-1.6.8l-4.07-3.05a1.25 1.25 0 0 0-.75-.25H15.25c-.69 0-1.25-.56-1.25-1.25v-15.5ZM7 24.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM25.5 48a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM48 24.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z" opacity=".2"/><path d="M21 3.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0ZM24.5 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3ZM0 23.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0ZM3.5 22a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3ZM21 44.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0Zm3.5-1.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm20-23a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7ZM43 23.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm-23.23-3.14a1 1 0 0 1-.13 1.4l-2.08 1.74 2.08 1.73a1 1 0 1 1-1.28 1.54l-2.42-2.02a1.63 1.63 0 0 1 0-2.5l2.42-2.02a1 1 0 0 1 1.4.13Zm7.59 1.41a1 1 0 1 1 1.28-1.54l2.42 2.02c.78.65.78 1.85 0 2.5l-2.42 2.02a1 1 0 1 1-1.28-1.54l2.08-1.73-2.08-1.73ZM24.12 18a1 1 0 0 1 .87 1.12l-1 8a1 1 0 1 1-1.98-.24l1-8a1 1 0 0 1 1.11-.87Zm-11.87-5C11.01 13 10 14 10 15.25v15.5c0 1.24 1 2.25 2.25 2.25h17.33c.06 0 .11.02.15.05l4.07 3.05a2 2 0 0 0 3.2-1.6V15.25c0-1.24-1-2.25-2.25-2.25h-22.5ZM12 15.25c0-.14.11-.25.25-.25h22.5c.14 0 .25.11.25.25V34.5l-4.07-3.05a2.2 2.2 0 0 0-1.35-.45H12.25a.25.25 0 0 1-.25-.25v-15.5Zm7.24-10.68a1 1 0 1 0-.48-1.94A22.04 22.04 0 0 0 2.91 17.7a1 1 0 1 0 1.92.58 20.04 20.04 0 0 1 14.4-13.72Zm11.05-1.66a1 1 0 0 0-.58 1.92c6.45 1.92 11.54 7 13.46 13.46a1 1 0 1 0 1.92-.58 22.05 22.05 0 0 0-14.8-14.8ZM4.57 28.76a1 1 0 0 0-1.94.48 22.03 22.03 0 0 0 16.13 16.13 1 1 0 1 0 .48-1.94A20.03 20.03 0 0 1 4.57 28.76Zm40.8.48a1 1 0 1 0-1.94-.48 20.04 20.04 0 0 1-13.72 14.41 1 1 0 0 0 .58 1.92 22.04 22.04 0 0 0 15.08-15.85Z"/></svg>
<div class="pt4 fw-bold">Collectives™ on Stack Overflow</div>
<p class="my16 fs-caption fc-medium">Find centralized, trusted content and collaborate around the technologies you use most.</p>
<a href="/collectives"
class="js-gps-track s-btn s-btn__primary s-btn__xs"
data-gps-track="top_nav.click({is_current:false, location:1, destination:18})">
Learn more
</a>
</div>
</div>
<div class="s-popover"
id="popover-teams-create-cta"
role="menu"
aria-hidden="true">
<div class="s-popover--arrow"></div>
<div class="ps-relative overflow-hidden">
<p class="mb2"><strong>Teams</strong></p>
<p class="mb12 fs-caption fc-black-400">Q&A for work</p>
<p class="mb12 fs-caption fc-medium">Connect and share knowledge within a single location that is structured and easy to search.</p>
<a href="https://stackoverflow.co/teams"
class="js-gps-track s-btn s-btn__primary s-btn__xs"
data-gps-track="teams.create.left-sidenav.click({ Action: CtaClick })"
data-ga="["teams left navigation - anonymous","left nav cta","stackoverflow.com/teams",null,null]">
Learn more
</a>
</div>
<div class="ps-absolute t8 r8">
<svg aria-hidden="true" class="fc-orange-500 svg-spot spotPeople" width="48" height="48" viewBox="0 0 48 48"><path d="M13.5 28a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9ZM7 30a1 1 0 0 1 1-1h11a1 1 0 0 1 1 1v5h11v-5a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v10a2 2 0 0 1-2 2H33v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5H8a1 1 0 0 1-1-1V30Zm25-6.5a4.5 4.5 0 1 0 9 0 4.5 4.5 0 0 0-9 0ZM24.5 34a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z" opacity=".2"/><path d="M16.4 26.08A6 6 0 1 0 7.53 26C5.64 26.06 4 27.52 4 29.45V40a1 1 0 0 0 1 1h9a1 1 0 1 0 0-2h-4v-7a1 1 0 1 0-2 0v7H6v-9.55c0-.73.67-1.45 1.64-1.45H16a1 1 0 0 0 .4-1.92ZM12 18a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm16.47 14a6 6 0 1 0-8.94 0A3.6 3.6 0 0 0 16 35.5V46a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V35.5c0-1.94-1.64-3.42-3.53-3.5ZM20 28a4 4 0 1 1 8 0 4 4 0 0 1-8 0Zm-.3 6h8.6c1 0 1.7.75 1.7 1.5V45h-2v-7a1 1 0 1 0-2 0v7h-4v-7a1 1 0 1 0-2 0v7h-2v-9.5c0-.75.7-1.5 1.7-1.5ZM42 22c0 1.54-.58 2.94-1.53 4A3.5 3.5 0 0 1 44 29.45V40a1 1 0 0 1-1 1h-9a1 1 0 1 1 0-2h4v-7a1 1 0 1 1 2 0v7h2v-9.55A1.5 1.5 0 0 0 40.48 28H32a1 1 0 0 1-.4-1.92A6 6 0 1 1 42 22Zm-2 0a4 4 0 1 0-8 0 4 4 0 0 0 8 0Z"/><g opacity=".35"><path d="M17 10a1 1 0 011-1h12a1 1 0 110 2H18a1 1 0 01-1-1Zm1-5a1 1 0 100 2h12a1 1 0 100-2H18ZM14 1a1 1 0 00-1 1v12a1 1 0 001 1h5.09l4.2 4.2a1 1 0 001.46-.04l3.7-4.16H34a1 1 0 001-1V2a1 1 0 00-1-1H14Zm1 12V3h18v10h-5a1 1 0 00-.75.34l-3.3 3.7-3.74-3.75a1 1 0 00-.71-.29H15Z"/></g></svg>
</div>
</div>
</div>
<div id="content" class="w100 wmx100 p0 snippet-hidden bg-black-025 snippet-hidden">
<header class="p-wrapper-home btr-lg p48 md:p32 sm:p12 ta-center ps-relative">
<div style="clip-path:url(#curve)" class="p32 sm:p12 bar-lg p-bg-dark-gradient d:fc-black-750 ps-relative z-selected fc-black-025 p-font-smooth mbn128 pb128">
<div class="wmx9 mx-auto d-flex flex__allitems6 sm:fd-column">
<img src="https://cdn.sstatic.net/Img/home/illo-code.svg?v=b7ee00fff9d8" class="uc-none ps-absolute t128 mt128" style="left:8%" alt="">
<img src="https://cdn.sstatic.net/Img/home/illo-code.svg?v=b7ee00fff9d8" class="uc-none ps-absolute tn128 mt128" style="right:8%" alt="">
<div class="flex--item p16 sm:p12 sm:mb12">
<div class="ps-relative p-speech-bubble--right h100 p24 bblr-lg btlr-lg btrr-lg bg-orange-100 fc-black-800">
<svg aria-hidden="true" class="fc-orange-500 mb16 svg-spot spotSearch" width="48" height="48" viewBox="0 0 48 48"><path opacity=".2" d="M29.22 38.1a3.4 3.4 0 0 1 4.81-4.82l8.81 8.81a3.4 3.4 0 0 1-4.81 4.81l-8.81-8.8Z"/><path d="M18.5 5a1 1 0 1 0 0 2c.63 0 1.24.05 1.84.15a1 1 0 0 0 .32-1.98A13.6 13.6 0 0 0 18.5 5Zm7.02 1.97a1 1 0 1 0-1.04 1.7 11.5 11.5 0 0 1 5.44 8.45 1 1 0 0 0 1.98-.24 13.5 13.5 0 0 0-6.38-9.91ZM18.5 0a18.5 18.5 0 1 0 10.76 33.55c.16.57.46 1.12.9 1.57L40 44.94A3.5 3.5 0 1 0 44.94 40l-9.82-9.82c-.45-.45-1-.75-1.57-.9A18.5 18.5 0 0 0 18.5 0ZM2 18.5a16.5 16.5 0 1 1 33 0 16.5 16.5 0 0 1-33 0Zm29.58 15.2a1.5 1.5 0 1 1 2.12-2.12l9.83 9.83a1.5 1.5 0 1 1-2.12 2.12l-9.83-9.83Z"/></svg>
<h2 class="fs-subheading wmx3 mx-auto">Find the best answer to your technical question, help others answer theirs</h2>
<a href="/users/signup" class="s-btn w100 wmx2 fs-body2 px32 bar-md bg-orange-500 h:bg-orange-600 fc-white d:fc-black-900 p-ff-source-bold mt-auto" data-ga="["home page","header cta","join community",null,null]">Join the community</a>
<p class="mb0 mt12 fc-black-600">or <a class="s-link s-link__underlined fc-black-700 h:fc-orange-600" href="/questions">search content</a></p>
</div>
</div>
<div class="flex--item p16 sm:p12">
<div class="ps-relative p-speech-bubble--left h100 p24 bbrr-lg btlr-lg btrr-lg bg-blue-100 fc-black-800">
<svg aria-hidden="true" class="fc-blue-500 mb16 svg-spot spotLock" width="48" height="48" viewBox="0 0 48 48"><path opacity=".2" d="M12 22a2 2 0 0 0-2 2v19a4 4 0 0 0 4 4h24a4 4 0 0 0 4-4V26a4 4 0 0 0-4-4H12Zm6 7a5 5 0 1 1 7.67 4.23l.05.35c.15.84.36 1.8.61 2.86A2.06 2.06 0 0 1 24.35 39h-2.7a2.06 2.06 0 0 1-1.98-2.56c.29-1.2.52-2.3.66-3.2l-.19-.14A5 5 0 0 1 18 29Z"/><path d="M23 24a5 5 0 0 0-2.86 9.1l.2.13c-.15.91-.38 2-.67 3.21A2.06 2.06 0 0 0 21.65 39h2.7c1.32 0 2.3-1.26 1.98-2.56a46.74 46.74 0 0 1-.6-2.86l-.06-.35A5 5 0 0 0 23 24Zm0 2a3 3 0 0 1 1.76 5.43l-.16.11a2 2 0 0 0-.91 2c.16.98.4 2.12.7 3.37.01.05-.02.09-.04.09h-2.7c-.02 0-.05-.04-.04-.09.3-1.25.54-2.4.7-3.36a2 2 0 0 0-.78-1.92l-.13-.09A3 3 0 0 1 23 26ZM12 12.44V18H9a3 3 0 0 0-3 3v21a3 3 0 0 0 3 3h28a3 3 0 0 0 3-3V21a3 3 0 0 0-3-3h-3v-5.56C34 6.2 29.36 1 23 1S12 6.19 12 12.44ZM23 3c5.14 0 9 4.18 9 9.44V18H14v-5.56C14 7.18 17.86 3 23 3ZM9 20h28a1 1 0 0 1 1 1v21a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V21a1 1 0 0 1 1-1Z"/></svg>
<h2 class="fs-subheading wmx3 mx-auto">Want a secure, private space for your technical knowledge?</h2>
<div class="d-flex ai-center jc-center wmx2 mx-auto mb12">
<span class="flex--item4 bt bc-blue-300"></span>
<span class="flex--item fl-shrink0 fs-body1 z-active px12">
Get started
</span>
<span class="flex--item4 bt bc-blue-300"></span>
</div>
<div class="d-flex jc-center sm:fd-column">
<a href="https://stackoverflow.co/explore-teams" class="s-btn fs-body2 bar-md bg-blue-500 h:bg-blue-600 fc-white d:fc-black-900 p-ff-source-bold" data-ga="["home page","header cta","Request a demo",null,null]">For large organizations <svg aria-hidden="true" class="svg-icon iconIndustry" width="18" height="18" viewBox="0 0 18 18"><path d="M10 16v-4H8v4H2V4c0-1.1.9-2 2-2h6c1.09 0 2 .91 2 2v2h2c1.09 0 2 .91 2 2v8h-6ZM4 4v2h2V4H4Zm0 4v2h2V8H4Zm4-4v2h2V4H8Zm0 4v2h2V8H8Zm-4 4v2h2v-2H4Zm8 0v2h2v-2h-2Zm0-4v2h2V8h-2Z"/></svg></a>
<a href="https://stackoverflow.co/teams" class="s-btn ml8 sm:ml0 sm:mt8 fs-body2 bar-md bg-blue-500 h:bg-blue-600 fc-white d:fc-black-900 p-ff-source-bold" data-ga="["home page","header cta","create a team",null,null]">For small teams <svg aria-hidden="true" class="svg-icon iconPeople" width="18" height="18" viewBox="0 0 18 18"><path d="M17 14c0 .44-.45 1-1 1H9a1 1 0 0 1-1-1H2c-.54 0-1-.56-1-1 0-2.63 3-4 3-4s.23-.4 0-1c-.84-.62-1.06-.59-1-3 .06-2.42 1.37-3 2.5-3s2.44.58 2.5 3c.06 2.41-.16 2.38-1 3-.23.59 0 1 0 1s1.55.71 2.42 2.09c.78-.72 1.58-1.1 1.58-1.1s.23-.4 0-1c-.84-.61-1.06-.58-1-3 .06-2.41 1.37-3 2.5-3s2.44.59 2.5 3c.05 2.42-.16 2.39-1 3-.23.6 0 1 0 1s3 1.38 3 4Z"/></svg></a>
</div>
</div>
</div>
</div>
<h1 class="p-ff-roboto-slab-bold fs-display2 mb0 pt64 pb64 ps-relative z-active overflow-hidden">
Every <span class="js-user-slider p-home-tagline va-bottom ps-relative ws-nowrap d-inline-flex fd-column ai-center fc-orange-500 lg:d-block mx-auto ta-center" data-words="developer, data scientist, system admin, mobile developer, game developer">developer</span> has a<br class="lg:d-none"> tab open to<br class="d-none lg:d-block"> Stack Overflow
</h1>
<span class="w64 h8 bar-pill d-block bg-black-500 mx-auto"></span>
<div class="d-flex flex__allitems3 jc-center px12 md:fd-column pt32 pb64 sm:pb128 wmx9 mx-auto">
<div class="flex--item py32 md:pt16 md:pb16">
<div class="fs-title p-ff-roboto-slab-bold mb4">100+ million</div>
<div class="fc-black-300 fs-body2 px24">monthly visitors to Stack Overflow & Stack Exchange</div>
</div>
<div class="flex--item py32 md:pt16 md:pb16">
<div class="fs-title p-ff-roboto-slab-bold mb4">45.1+ billion</div>
<div class="fc-black-300 fs-body2 px24">Times a developer got help since 2008</div>
</div>
<div class="flex--item py32 md:pt16 md:pb16">
<div class="fs-title p-ff-roboto-slab-bold mb4">179% ROI</div>
<div class="fc-black-300 fs-body2 px24">from companies using Stack Overflow for Teams</div>
</div>
<div class="flex--item py32 md:pt16 md:pb16">
<div class="fs-title p-ff-roboto-slab-bold mb4">5,000+</div>
<div class="fc-black-300 fs-body2 px24">Stack Overflow for Teams instances active every day</div>
</div>
</div>
</div>
<span aria-hidden="true" class="p-bits fc-blue-800 tn8 l16 w128 h128 z-base"></span>
<span aria-hidden="true" class="p-bits fc-gold sm:d-none t128 l128 w64 h64"></span>
<span aria-hidden="true" class="p-bits fc-green-500 t50 ln16 w64 h64"></span>
<span aria-hidden="true" class="p-bits fc-blue-200 b0 l128 w24 h24"></span>
<span aria-hidden="true" class="p-bits fc-blue-300 tn12 r128 w128 h128 z-base"></span>
<span aria-hidden="true" class="p-bits p-fc-purple sm:d-none t64 r128 w32 h32"></span>
<span aria-hidden="true" class="p-bits fc-orange-500 sm:d-none t50 r0 w128 h128"></span>
<span aria-hidden="true" class="p-bits fc-yellow-400 b32 r128 w24 h24"></span>
</header>
<section class="wmx12 mx-auto ps-relative z-active mtn128 sm:mt0 p32 sm:pl12 sm:pr12 sm:pt48">
<div class="d-flex flex__allitems6 md:fd-column ta-center mx48 sm:ml0 sm:mr0">
<div class="flex--item p16">
<div style="background: linear-gradient(0deg, var(--orange-100) 30%, var(--white))" class="h100 py48 sm:py32 bg-orange-050 bar-lg p-bs-wrapper">
<a href="/questions" class="h48 d-block"><svg aria-hidden="true" class="native svg-icon iconLogoMd" width="187" height="37" viewBox="0 0 187 37"><path d="m42 23-2.2-.2c-1.7-.1-2.3-.8-2.3-2 0-1.4 1-2.2 3-2.2 1.3-.1 2.6.3 3.6 1.1l1.3-1.3c-1.4-1-3.1-1.5-4.8-1.4-2.9 0-4.9 1.5-4.9 3.9 0 2.2 1.4 3.4 4 3.6l2.2.2c1.6.1 2.2.8 2.2 2 0 1.6-1.4 2.4-3.6 2.4-1.6.1-3.1-.5-4.2-1.6L35 28.8c1.5 1.4 3.5 2 5.5 1.9 3.2 0 5.5-1.5 5.5-4.1 0-2.6-1.6-3.4-4-3.6Zm15.8-6.1c-2.2 0-3.5.4-4.7 1.9l1.3 1.3c.8-1.1 2.1-1.7 3.4-1.5 2.5 0 3.4 1 3.4 2.9v1.3h-4c-3 0-4.6 1.5-4.6 3.9 0 1 .3 2 1 2.7.8.9 1.9 1.2 3.8 1.2 1.4.1 2.9-.4 3.9-1.4v1.3h2v-9.1c-.1-2.9-1.9-4.5-5.5-4.5Zm3.4 8.9c.1.8-.1 1.7-.7 2.3a4 4 0 0 1-3 .9c-2.1 0-3.1-.7-3.1-2.3 0-1.6 1-2.4 3-2.4h3.8v1.5Zm9.7-7.1c1.2 0 2.4.5 3.1 1.5l1.3-1.3a5.4 5.4 0 0 0-4.4-2c-3.4 0-5.9 2.3-5.9 6.9 0 4.6 2.6 6.9 5.9 6.9 1.7.1 3.3-.7 4.4-2L74 27.4c-.7 1-1.9 1.5-3.1 1.5-1.2.1-2.4-.5-3.1-1.5-.7-1.1-1-2.3-.9-3.6-.1-1.3.2-2.5.9-3.6.7-1 1.9-1.6 3.1-1.5Zm16.8-1.6h-2.4L79.2 23V11.1h-2v19.4h2v-4.9l2.4-2.4 4.5 7.3h2.4l-5.6-8.6 4.8-4.8Zm9.2-.16c-1.6-.1-3.2.5-4.3 1.7-1.3 1.3-1.6 2.9-1.6 5.4 0 2.5.3 4.1 1.6 5.4 1.1 1.1 2.7 1.7 4.3 1.7 1.6.1 3.2-.5 4.3-1.7 1.3-1.3 1.6-2.9 1.6-5.4 0-2.5-.3-4.1-1.6-5.4a5.38 5.38 0 0 0-4.3-1.7Zm1.7 10.5c-.9.8-2.3.8-3.2 0-.7-.7-.8-2-.8-3.4s.1-2.7.8-3.4c.9-.8 2.3-.8 3.2 0 .7.7.8 1.9.8 3.4s-.1 2.7-.8 3.4Zm13.6-10.4-2.8 8.6-2.8-8.6h-3.7l5.2 14h2.7l5.1-14h-3.7Zm9.6-.1c-3.6 0-6.1 2.6-6.1 7.1 0 5.7 3.2 7.2 6.5 7.2 2 .1 4-.7 5.3-2.2l-2.1-2.1c-.8.9-2 1.4-3.2 1.3-1.6.1-3-1.1-3.1-2.7v-.4h8.7v-1.6c.1-3.8-2.1-6.6-6-6.6Zm-2.7 5.8c0-.5.1-1 .3-1.5.4-.9 1.3-1.4 2.3-1.4 1-.1 1.9.5 2.3 1.4.2.5.3 1 .3 1.5h-5.2Zm13.33-4.3v-1.3h-3.4v14h3.5v-8.4c-.1-1.3.8-2.4 2.1-2.6h.2c.7 0 1.4.3 1.8.8l2.6-2.6a4.1 4.1 0 0 0-3.3-1.3c-1.3-.1-2.6.4-3.5 1.4Zm7.6-2.8v15.4h3.5v-11h2.6v-2.7h-2.6v-1.5c-.1-.6.3-1.2.9-1.3h1.6v-3h-2a3.9 3.9 0 0 0-4 3.8v.3Zm20.27 1.3c-1.6-.1-3.2.5-4.3 1.7-1.3 1.3-1.6 2.9-1.6 5.4 0 2.5.3 4.1 1.6 5.4 1.1 1.1 2.7 1.7 4.3 1.7 1.6.1 3.2-.5 4.3-1.7 1.3-1.3 1.6-2.9 1.6-5.4 0-2.5-.3-4.1-1.6-5.4a5.38 5.38 0 0 0-4.3-1.7Zm1.7 10.5c-.9.8-2.3.8-3.2 0-.7-.7-.8-2-.8-3.4s.1-2.7.8-3.4c.9-.8 2.3-.8 3.2 0 .7.7.8 1.9.8 3.4s-.1 2.7-.8 3.4Zm20.7-10.4-2.3 8.6-2.9-8.6H175l-2.8 8.7-2.3-8.6h-3.7l4.3 14h2.9l2.9-8.8 2.9 8.8h3l4.3-14-3.8-.1Zm-31.22 9.8v-15.2h-3.5v15.4a3.8 3.8 0 0 0 3.6 4h2.5v-3h-1.3c-.6.1-1.1-.2-1.3-.8v-.4ZM52.7 17.4H49V13h-2v13.9c0 2 1.1 3.6 3.4 3.6h1.4v-1.7h-1c-1.3 0-1.8-.7-1.8-2v-7.7h1.9l1.8-1.7Z" fill="var(--black-800)"/><path d="M26 33v-9h4v13H0V24h4v9h22Z" fill="#BCBBBB"/><path d="m23.1 25.99.68-2.95-16.1-3.35L7 23l16.1 2.99ZM9.1 15.2l15 7 1.4-3-15-7-1.4 3Zm4.2-7.4L26 18.4l2.1-2.5L15.4 5.3l-2.1 2.5ZM21.5 0l-2.7 2 9.9 13.3 2.7-2L21.5 0ZM7 30h16v-3H7v3Z" fill="#F48024"/></svg></a>
<img width="520" height="346" src="https://cdn.sstatic.net/Img/home/illo-public.svg?v=14bd5a506009" class="d-block my32 w100 h-auto" alt="Illustration of Stack Overflow">
<h2 class="mx48 sm:ml32 sm:mr32 mb12 p-ff-roboto-slab-bold fs-headline1">
A public platform building the definitive collection of coding questions & answers
</h2>
<p class="mx48 sm:ml32 sm:mr32 mb32 fc-black-600 fs-subheading">A community-based space to find and contribute answers to technical challenges, and one of the most popular websites in the world.</p>
<a href="/users/signup" class="s-btn w100 ws-nowrap wmx2 fs-body2 px32 bar-md bg-orange-500 h:bg-orange-600 fc-white d:fc-black-900 p-ff-source-bold mt-auto" data-ga="["home page","body cta","join community",null,null]">Join the community</a>
<p class="mb0 mt12 fc-black-400">or <a class="s-link s-link__underlined fc-black-400 h:fc-orange-500" href="/questions">search content</a></p>
</div>
</div>
<div class="flex--item p16">
<div style="background: linear-gradient(0deg, var(--blue-100) 30%, var(--white))" class="h100 py48 sm:py32 bg-blue-050 bar-lg p-bs-wrapper">
<a href="https://stackoverflow.co/teams" class="h48 d-block"><svg aria-hidden="true" class="native svg-icon iconLogoTeamsAltMd" width="185" height="37" viewBox="0 0 185 37"><path d="M26 33v-9h4v13H0V24h4v9h22Z" fill="#BCBBBB"/><path d="m23.1 25.99.68-2.95-16.1-3.35L7 23l16.1 2.99ZM9.1 15.2l15 7 1.4-3-15-7-1.4 3Zm4.2-7.4L26 18.4l2.1-2.5L15.4 5.3l-2.1 2.5ZM21.5 0l-2.7 2 9.9 13.3 2.7-2L21.5 0ZM7 30h16v-3H7v3Z" fill="#F48024"/><path d="M75.51 13.2h-10c-.3 0-.5.2-.5.5v15.67c0 .3.2.5.5.5h2.4c.3 0 .5-.2.5-.5v-6.11h6c.3 0 .5-.2.5-.5V20.6c0-.3-.2-.5-.5-.5h-6v-3.75h7.15c.3 0 .5-.2.5-.5v-2.16c-.05-.25-.3-.5-.55-.5Zm14.09 3.5a5.02 5.02 0 0 0-1.15-1.8 6.18 6.18 0 0 0-4.5-1.8 6.07 6.07 0 0 0-5.4 3.1c-.2.45-.4.95-.5 1.45-.1.5-.15 1.05-.2 1.6-.05.55-.05 1.35-.05 2.3 0 1.26.05 2.2.1 2.9.05.71.2 1.36.45 2.01.25.65.65 1.2 1.15 1.8 1.2 1.2 2.7 1.8 4.45 1.8a5.8 5.8 0 0 0 5.65-3.66c.25-.59.35-1.29.4-2 .05-.64.05-1.64.05-2.9 0-1.25 0-2.2-.05-2.9a5 5 0 0 0-.4-1.9Zm-8.25 1.65c.1-.55.3-1 .6-1.35.2-.25.5-.45.85-.6.35-.15.75-.2 1.1-.2.4 0 .75.1 1.1.2.35.15.65.35.85.6.3.35.5.75.6 1.3.1.6.15 1.7.15 3.2 0 1 0 1.8-.05 2.4a4 4 0 0 1-.25 1.31c-.1.3-.25.55-.5.8-.5.55-1.15.8-1.95.8a2.69 2.69 0 0 1-1.95-.75c-.2-.2-.35-.4-.4-.6-.05-.1-.15-.35-.2-.75l-.15-1.25c0-.5-.05-1.15-.05-1.96.1-1.45.15-2.55.25-3.15Zm20.72 4.41a4.6 4.6 0 0 0 2.9-4.46 4.71 4.71 0 0 0-2.55-4.4 5.64 5.64 0 0 0-2.8-.66h-6.1c-.3 0-.5.2-.5.5v15.68c0 .3.2.5.5.5h2.4c.3 0 .5-.2.5-.5V23.3h2.15l3.15 6.3c.1.16.25.3.45.3h2.75a.6.6 0 0 0 .45-.24c.1-.15.1-.35 0-.5l-3.3-6.41Zm-5.65-6.41h3c.7 0 1.2.15 1.6.55.4.35.55.8.55 1.45 0 .6-.2 1.05-.55 1.4-.4.35-.9.55-1.6.55h-3v-3.95Zm27.62-3.15h-11c-.3 0-.5.2-.5.5v2.15c0 .3.2.5.5.5h3.8v13.02c0 .3.2.5.5.5h2.35c.3 0 .5-.2.5-.5V16.35h3.8c.3 0 .5-.2.5-.5v-2.16c.05-.25-.2-.5-.45-.5Zm13.48 0h-10c-.3 0-.5.2-.5.5v15.67c0 .3.2.5.5.5h10c.3 0 .5-.2.5-.5V27.2c0-.3-.2-.5-.5-.5h-7.15V23h6c.3 0 .5-.2.5-.5v-2.1c0-.3-.2-.5-.5-.5h-6v-3.56h7.15c.3 0 .5-.2.5-.5v-2.16c0-.25-.25-.5-.5-.5Zm10.42.34a.48.48 0 0 0-.45-.35h-1.9c-.2 0-.4.15-.45.35l-5.75 15.68c-.05.15-.05.3.05.45.1.15.25.2.4.2h2.55c.2 0 .4-.15.45-.35l.95-2.8h5.45l.95 2.8c.05.2.25.35.45.35h2.55c.15 0 .3-.1.4-.2.1-.15.1-.3.05-.45l-5.7-15.68Zm.3 10.17h-3.4l1.75-4.9 1.65 4.9Zm21.75-10.51h-2.4c-.2 0-.35.1-.45.3l-4 8.76-4.1-8.77c-.1-.2-.25-.3-.45-.3h-2.4c-.3 0-.5.2-.5.5v15.68c0 .3.2.5.5.5h2.4c.3 0 .5-.2.5-.5V21.1l2.75 5.66c.1.15.25.3.45.3h1.75c.2 0 .35-.1.45-.3l2.65-5.6v8.26c0 .3.2.5.5.5h2.4c.3 0 .5-.2.5-.5V13.74c-.05-.3-.25-.55-.55-.55Zm13.45 8.15a3.8 3.8 0 0 0-1.3-.8 7.7 7.7 0 0 0-1.85-.45l-1.8-.25c-.3-.05-.6-.1-.9-.25a2.1 2.1 0 0 1-.6-.35c-.3-.25-.4-.6-.4-1.1 0-.4.1-.7.25-1 .2-.3.45-.5.75-.65.35-.15.8-.25 1.3-.25.45 0 .85.05 1.2.1s.7.2 1 .35c.3.15.6.35.9.65.2.2.5.2.7 0l1.55-1.5c.1-.1.15-.25.15-.35a.45.45 0 0 0-.15-.35 7.11 7.11 0 0 0-2.3-1.46 8.4 8.4 0 0 0-2.9-.45c-1.15 0-2.15.2-3 .6a4.67 4.67 0 0 0-2 1.8c-.45.76-.7 1.66-.7 2.66 0 1.4.45 2.55 1.3 3.36.8.75 1.85 1.2 3.25 1.4l1.85.25c.4.05.75.15.95.2.2.05.35.15.5.35.3.25.45.7.45 1.25 0 .6-.2 1.05-.65 1.35-.5.35-1.2.55-2.1.55-.5 0-1-.05-1.4-.15-.4-.1-.8-.25-1.2-.45-.35-.2-.7-.45-1.05-.8a.45.45 0 0 0-.35-.15.45.45 0 0 0-.35.15l-1.6 1.55c-.1.1-.15.2-.15.35 0 .15.05.25.15.35a7.1 7.1 0 0 0 2.6 1.7c.95.36 2.05.5 3.3.5.85 0 1.7-.1 2.4-.34a5.16 5.16 0 0 0 3.25-2.66c.3-.65.45-1.35.45-2.1-.05-1.6-.55-2.8-1.5-3.6Z" fill="var(--black-800)"/><path fill="#D6D9DC" d="M47 13h1v17h-1z"/></svg></a>
<img width="520" height="346" src="https://cdn.sstatic.net/Img/home/illo-teams.svg?v=7e543f14fcc0" class="d-block my32 w100 h-auto" alt="Illustration of Stack Overflow for Teams">
<h2 class="mx48 sm:ml32 sm:mr32 mb12 p-ff-roboto-slab-bold fs-headline1">
A private collaboration & knowledge sharing SaaS platform for companies
</h2>
<p class="mx48 sm:ml32 sm:mr32 mb32 fc-black-600 fs-subheading">A web-based platform to increase productivity, decrease cycle times, accelerate time to market, and protect institutional knowledge.</p>
<div class="d-flex ai-center jc-center wmx2 mx-auto mb12">
<span class="flex--item4 bt bc-blue-300"></span>
<span class="flex--item fc-black-600 fl-shrink0 fs-body1 z-active px12">
Get started
</span>
<span class="flex--item4 bt bc-blue-300"></span>
</div>
<div class="d-flex jc-center sm:fd-column">
<a href="https://stackoverflow.co/explore-teams" class="s-btn fs-body2 bar-md bg-blue-500 h:bg-blue-600 fc-white d:fc-black-900 p-ff-source-bold" data-ga="["home page","body cta","Request a demo",null,null]">For large organizations <svg aria-hidden="true" class="svg-icon iconIndustry" width="18" height="18" viewBox="0 0 18 18"><path d="M10 16v-4H8v4H2V4c0-1.1.9-2 2-2h6c1.09 0 2 .91 2 2v2h2c1.09 0 2 .91 2 2v8h-6ZM4 4v2h2V4H4Zm0 4v2h2V8H4Zm4-4v2h2V4H8Zm0 4v2h2V8H8Zm-4 4v2h2v-2H4Zm8 0v2h2v-2h-2Zm0-4v2h2V8h-2Z"/></svg></a>
<a href="https://stackoverflow.co/teams" class="s-btn ml8 sm:ml0 sm:mt8 fs-body2 bar-md bg-blue-500 h:bg-blue-600 fc-white d:fc-black-900 p-ff-source-bold" data-ga="["home page","body cta","create a team",null,null]">For small teams <svg aria-hidden="true" class="svg-icon iconPeople" width="18" height="18" viewBox="0 0 18 18"><path d="M17 14c0 .44-.45 1-1 1H9a1 1 0 0 1-1-1H2c-.54 0-1-.56-1-1 0-2.63 3-4 3-4s.23-.4 0-1c-.84-.62-1.06-.59-1-3 .06-2.42 1.37-3 2.5-3s2.44.58 2.5 3c.06 2.41-.16 2.38-1 3-.23.59 0 1 0 1s1.55.71 2.42 2.09c.78-.72 1.58-1.1 1.58-1.1s.23-.4 0-1c-.84-.61-1.06-.58-1-3 .06-2.41 1.37-3 2.5-3s2.44.59 2.5 3c.05 2.42-.16 2.39-1 3-.23.6 0 1 0 1s3 1.38 3 4Z"/></svg></a>
</div>
</div>
</div>
</div>
</section>
<section class="ta-center pb64 pt96 sm:pt32">
<p class="fc-black-500 fs-subheading pb0 sm:pl24 sm:pr24">Thousands of organizations around the globe use Stack Overflow for Teams</p>
<div class="js-carousel-logos t-opacity t-slow o100 mx-auto d-flex ai-center jc-center sm:jc-start bar-pill px64 md:pl0 md:pr0 hs1 overflow-x-auto w100">
<div class="flex--item px16 mx12">
<img class="p-logo d-block mtn6" width="65" height="35" src="https://cdn.sstatic.net/Img/product/teams/logos/box-alt.svg?v=eb76fd9d884f" alt="Box">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo d-block mt2" width="165" height="37" src="https://cdn.sstatic.net/Img/product/teams/logos/expensify-alt.svg?v=375099b85ce5" alt="Expensify">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo d-block" width="140" height="35" src="https://cdn.sstatic.net/Img/product/teams/logos/intercom-alt.svg?v=3eda71aed47c" alt="Intercom">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo d-block mtn2" width="165" height="41" src="https://cdn.sstatic.net/Img/product/teams/logos/microsoft-alt.svg?v=e57319450314" alt="Microsoft">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo d-block mt8" width="175" height="32" src="https://cdn.sstatic.net/Img/product/teams/logos/bloomberg-alt.svg?v=9fc4f6650377" alt="Bloomberg">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block mt2" width="185" height="37" data-src="https://cdn.sstatic.net/Img/product/teams/logos/instacart-alt.svg?v=15bd0b39b197" alt="Instacart">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block mt4" width="120" height="27" data-src="https://cdn.sstatic.net/Img/product/teams/logos/barkbox-alt.svg?v=419890745024" alt="BarkBox">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block mt12" width="139" height="42" data-src="https://cdn.sstatic.net/Img/product/teams/logos/logitech-alt.svg?v=a99c74b88566" alt="Logitech">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block mt4" width="181" height="32" data-src="https://cdn.sstatic.net/Img/product/teams/logos/overstock-alt.svg?v=ed38ea932870" alt="Overstock">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block mt4" width="49" height="55" data-src="https://cdn.sstatic.net/Img/product/teams/logos/chevron-alt.svg?v=3bfd2c06a64b" alt="Chevron">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block mt8" width="187" height="36" data-src="https://cdn.sstatic.net/Img/product/teams/logos/dialpad-alt.svg?v=4e63facf7f79" alt="Dialpad">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block mt4" width="136" height="25" data-src="https://cdn.sstatic.net/Img/product/teams/logos/philips-alt.svg?v=7fc60c993103" alt="Philips">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block mt4" width="158" height="25" data-src="https://cdn.sstatic.net/Img/product/teams/logos/siemens-alt.svg?v=cf0f5266d96b" alt="Siemens">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block mtn8" width="103" height="45" data-src="https://cdn.sstatic.net/Img/product/teams/logos/verizon-media-alt.svg?v=f335b20096b2" alt="Verizon Digital Media">
</div>
<div class="flex--item px16 mx12">
<img class="p-logo js-lazy-load d-block" width="139" height="43" data-src="https://cdn.sstatic.net/Img/product/teams/logos/wisetech-global-alt.svg?v=3b6b11e76536" alt="WiseTech Global">
</div>
</div>
<script>
(function () {
var logos = document.querySelector('.js-carousel-logos');
var logosShown = 4;
var logosTotalPages = Math.ceil(logos.children.length / logosShown) - 1;
var logosCurrentPage = 0;
var logosCarouselTime = 4000;
var logosCarouselPlayer;
logos.classList.remove('o100');
for (var i = 0; i < logos.children.length; ++i) {
logos.appendChild(logos.children[Math.random() * i | 0]);
logos.children[i].classList.add('d-none');
}
var logosCarouselNav = document.createElement('div');
logosCarouselNav.className = 'ta-center py12';
logos.parentNode.insertBefore(logosCarouselNav, logos.nextSibling);
for (var i = 0; i <= logosTotalPages; ++i) {
var navEl = document.createElement('span');
navEl.className = 'js-carousel-logos-nav c-pointer w24 h6 bg-black-200 h:bg-black-400 d-inline-block bar-pill my6 mx4';
navEl.setAttribute('data-page', i);
navEl.addEventListener('click', showLogos);
logosCarouselNav.appendChild(navEl);
}
function updateNav() {
var navItems = document.querySelectorAll('.js-carousel-logos-nav');
for (var i = 0; i < navItems.length; ++i) {
if (i === logosCurrentPage) {
navItems[i].classList.remove('bg-black-200');
navItems[i].classList.add('bg-black-800');
} else {
navItems[i].classList.add('bg-black-200');
navItems[i].classList.remove('bg-black-800');
}
}
}
function showLogos(evt) {
logos.classList.add('o0');
if (evt) {
clearInterval(logosCarouselPlayer);
logosCurrentPage = parseInt(evt.currentTarget.getAttribute('data-page') || 0);
}
setTimeout(function() {
for (var i = 0; i < logos.children.length; ++i) {
if (
(i >= logosShown * logosCurrentPage) &&
(i < (logosShown * logosCurrentPage) + logosShown)
) {
logos.children[i].classList.remove('d-none');
} else {
logos.children[i].classList.add('d-none');
}
}
logos.classList.remove('o0');
updateNav();
if (logosCurrentPage >= logosTotalPages) {
logosCurrentPage = 0;
} else {
logosCurrentPage++;
}
}, 300);
}
showLogos();
logosCarouselPlayer = setInterval(function() { showLogos(); }, logosCarouselTime);
})();
</script>
</section>
<section class="p-wrapper-home p48 pb0 sm:p12 ps-relative overflow-hidden">
<div class="d-flex ai-center py32 jc-center wmx11 mx-auto px32 mbn128 sm:fd-column">
<div class="flex--item4 sm:d-none">
<img width="1270" height="892" class="js-lazy-load wmx100 w100 h-auto d-block btr-sm bt bc-orange-500 bs-lg" data-src="https://cdn.sstatic.net/Img/product/teams/screens/illo-question.png?v=14c5863a5550" alt="" />
<noscript>
<img width="1270" height="892" class="wmx100 w100 h-auto d-block btr-sm bt bc-orange-500 bs-lg" src="https://cdn.sstatic.net/Img/product/teams/screens/illo-question.png?v=14c5863a5550" alt="">
</noscript>
</div>
<div class="flex--item6 ps-relative z-active mln12 mrn12 sm:ml0 sm:mr0">
<img width="1270" height="892" class="js-lazy-load wmx100 w100 h-auto d-block btr-sm bbr-lg bt bc-orange-500 bs-lg" data-src="https://cdn.sstatic.net/Img/product/teams/screens/illo-for-you.png?v=ab49238abe04" alt="" />
<noscript>
<img width="1270" height="892" class="wmx100 w100 h-auto d-block btr-sm bbr-lg bt bc-orange-500 bs-lg" src="https://cdn.sstatic.net/Img/product/teams/screens/illo-for-you.png?v=ab49238abe04" alt="">
</noscript>
</div>
<div class="flex--item4 sm:d-none">
<img width="1270" height="892" class="js-lazy-load wmx100 w100 h-auto d-block btr-sm bt bc-orange-500 bs-lg" data-src="https://cdn.sstatic.net/Img/product/teams/screens/illo-home-search.png?v=1ccd850cd929" alt="" />
<noscript>
<img width="1270" height="892" class="wmx100 w100 h-auto d-block btr-sm bt bc-orange-500 bs-lg" src="https://cdn.sstatic.net/Img/product/teams/screens/illo-home-search.png?v=1ccd850cd929" alt="">
</noscript>
</div>
</div>
<div class="p-bg-dark-gradient bar-lg pt128 pb96 lg:pl24 lg:pr24 sm:pl0 sm:pr0 ps-relative z-selected ta-center">
<div class="wmx10 mx-auto fc-white d:fc-black p-font-smooth pt24">
<svg aria-hidden="true" class="svg-icon iconLogoTeams native mb32" width="186" viewBox="0 0 146 36"><path d="M33.9 18.9l-1.62-.2c-1.25-.09-1.82-.57-1.82-1.53 0-1.05.76-1.73 2.3-1.73 1.05 0 2.01.3 2.68.77l.96-.96a5.67 5.67 0 00-3.64-1.05c-2.2 0-3.74 1.15-3.74 2.97 0 1.73 1.05 2.6 3.07 2.78l1.72.2c1.15.09 1.73.57 1.73 1.53 0 1.25-1.06 1.82-2.69 1.82-1.24 0-2.4-.29-3.16-1.15l-.96.96c1.15 1.06 2.5 1.44 4.22 1.44 2.5 0 4.12-1.15 4.12-3.07-.19-1.92-1.43-2.6-3.16-2.78h-.01zm12.77-4.6c-1.63 0-2.69.28-3.55 1.43l.96.96c.57-.86 1.24-1.15 2.59-1.15 1.82 0 2.59.77 2.59 2.2v.97h-3.07c-2.3 0-3.55 1.15-3.55 2.97 0 .77.29 1.53.77 2.11.67.67 1.44.96 2.87.96 1.35 0 2.11-.29 2.98-1.06v.96h1.53v-6.9c-.1-2.3-1.44-3.46-4.12-3.46v.01zm2.59 6.7c0 .87-.2 1.45-.48 1.73-.67.58-1.44.68-2.3.68-1.63 0-2.3-.58-2.3-1.73s.76-1.82 2.3-1.82h2.87l-.1 1.15.01-.01zm7.29-5.36c.96 0 1.53.28 2.3 1.15l.96-.96c-1.06-1.15-1.92-1.54-3.36-1.54-2.59 0-4.5 1.73-4.5 5.28 0 3.45 1.91 5.28 4.5 5.28 1.44 0 2.3-.39 3.36-1.54l-1.06-.96c-.76.86-1.34 1.15-2.3 1.15-.96 0-1.82-.38-2.4-1.15-.48-.67-.67-1.44-.67-2.78 0-1.25.2-2.11.67-2.78a3.23 3.23 0 012.5-1.15zm12.85-1.25h-1.82l-4.6 4.5V9.8h-1.54v14.77h1.54v-3.74L64.8 19l3.45 5.57h1.82l-4.22-6.62 3.55-3.55v-.01zm7-.29c-1.53 0-2.58.58-3.26 1.34-.96.96-1.24 2.21-1.24 4.13s.28 3.16 1.24 4.12a4.5 4.5 0 003.27 1.35c1.53 0 2.68-.58 3.26-1.35.96-.96 1.24-2.2 1.24-4.12s-.28-3.17-1.24-4.13c-.58-.76-1.63-1.34-3.26-1.34h-.01zm1.25 7.96c-.29.3-.67.48-1.24.48-.58 0-.96-.19-1.25-.48-.58-.57-.58-1.53-.58-2.59 0-1.15.1-2.01.58-2.59a1.7 1.7 0 011.25-.48c.57 0 .95.2 1.24.48.58.58.58 1.44.58 2.6.1 1.14 0 2.1-.58 2.58zm10.36-7.86l-2.1 6.62-2.21-6.62h-2.8l3.94 10.65h2.1L90.9 14.2h-2.89zm7.3-.1c-2.79 0-4.61 1.92-4.61 5.47 0 4.32 2.4 5.47 4.9 5.47 1.91 0 2.96-.58 4.02-1.63l-1.63-1.54c-.67.67-1.25.96-2.4.96-1.53 0-2.3-.96-2.3-2.4h6.62v-1.15c0-3.07-1.63-5.18-4.6-5.18zm-2.02 4.41c0-.48.1-.76.29-1.15.28-.67.86-1.15 1.82-1.15.86 0 1.53.48 1.82 1.15.2.39.2.67.29 1.15h-4.22zm10.55-3.26V14.2h-2.59v10.65h2.69v-6.43c0-1.35.86-1.92 1.72-1.92.68 0 .96.2 1.44.67l2.02-2.01c-.77-.77-1.44-.96-2.5-.96-1.24-.1-2.2.38-2.78 1.05zm5.39-2.2v11.8h2.69V16.4h1.92v-2h-1.92v-1.15c0-.58.28-.96.96-.96h1.05v-2.2h-1.53c-2.21 0-3.17 1.53-3.17 2.97v-.01zm16.2 1.05c-1.54 0-2.6.58-3.27 1.34-.96.96-1.24 2.21-1.24 4.13s.28 3.16 1.24 4.12a4.5 4.5 0 003.26 1.35c1.54 0 2.7-.58 3.27-1.35.96-.96 1.24-2.2 1.24-4.12s-.28-3.17-1.24-4.13c-.58-.76-1.73-1.34-3.27-1.34h.01zm1.24 7.96c-.29.3-.67.48-1.25.48-.57 0-.95-.19-1.24-.48-.58-.57-.58-1.53-.58-2.59 0-1.15.1-2.01.58-2.59.29-.28.67-.48 1.24-.48.58 0 .96.2 1.25.48.58.58.58 1.44.58 2.6 0 1.14 0 2.1-.58 2.58zm15.83-7.86l-1.73 6.62-2.2-6.62h-1.92l-2.2 6.62-1.73-6.62h-2.79l3.26 10.65h2.21l2.2-6.72 2.21 6.72h2.21l3.26-10.65h-2.78zm-24.57 7.38V9.98h-2.68v11.8c0 1.53.96 3.07 3.07 3.07h1.53v-2.21h-.96c-.67 0-.96-.39-.96-1.06zm-76.92-5.56l1.34-1.34h-2.88v-3.36h-1.53v10.65c0 1.53.86 2.78 2.59 2.78h1.05V23.5h-.76c-.96 0-1.44-.57-1.44-1.53v-5.85l1.63-.1z" fill="#fff"/><path d="M21 27v-8h3v11H0V19h3v8h18z" fill="#BCBBBB"/><path d="M5.4 19.1l13.6 2 .2-2.4-13.3-2.6-.5 3zm1.8-6.8l12 5.6 1.1-2.4-12-5.6-1.1 2.4zm3.4-5.9l10.2 8.5 1.7-2-10.2-8.5-1.7 2zM17.1.2L15 1.8l7.9 10.6 2.1-1.6L17.1.2zM5 25h14v-3H5v3zm24 10.86V28h5v1.58h-3.03v1.57h2.52v1.59h-2.52v3.1H29v.02zm6.02-3.03v-1.8c0-1.21.18-1.85.66-2.36.54-.57 1.23-.8 2.4-.8 1.23 0 1.97.28 2.5.94.38.48.54 1.1.54 2.22v1.8c0 1.21-.18 1.85-.66 2.37-.54.56-1.22.8-2.39.8-1.24 0-1.98-.28-2.5-.94-.4-.49-.55-1.1-.55-2.23zm4.14-.15v-1.5c0-1.36-.23-1.73-1.09-1.73-.86 0-1.09.37-1.09 1.73v1.5c0 1.36.23 1.74 1.1 1.74.85 0 1.08-.38 1.08-1.74zm4.88.14v3.04h-1.96V28h3.08c1.1 0 1.67.15 2.09.57.4.4.57.93.57 1.8 0 1.35-.37 2-1.35 2.29l1.7 3.19h-2.18l-1.43-3.04h-.52v.01zM44 31.34h.96c.7 0 .92-.22.92-.9 0-.66-.23-.88-.92-.88H44v1.78zm9.05 4.52v-6.27h-2.02V28h6v1.58h-2.02v6.27h-1.96v.01zm4.98 0V28h5.08v1.58h-3.14v1.52h2.65v1.58h-2.65v1.59h3.2v1.58h-5.14v.01zm10.21-1.39h-2.5l-.42 1.39H63.2L66.03 28h1.9l2.84 7.85h-2.1l-.43-1.39v.01zm-.46-1.55L67 30.27l-.8 2.65h1.58zm3.46 2.94V28h1.81l1.88 3.9 1.88-3.9h1.82v7.85h-1.87v-4.24l-1.2 2.48H74.3l-1.2-2.48v4.24h-1.87l.01.01zm8.17-1.32l1.48-.95c.36.6.82.84 1.65.84.7 0 1.03-.25 1.03-.78 0-.42-.22-.64-.8-.78-1.37-.34-1.66-.44-2.07-.7-.63-.41-.92-1-.92-1.89 0-1.57.96-2.4 2.75-2.4 1.36 0 2.21.43 2.75 1.38l-1.44.91c-.38-.54-.75-.73-1.34-.73-.55 0-.85.25-.85.71 0 .53.3.75 1.36 1.01 1 .26 1.24.34 1.64.6.53.35.79.92.79 1.8 0 .86-.21 1.42-.66 1.8-.5.42-1.28.64-2.26.64-.9 0-1.74-.2-2.29-.56a2.2 2.2 0 01-.82-.9z" fill="#F48024"/></svg>
<p class="p-ff-roboto-slab-bold fs-headline1 mb32 wmx7 mx-auto sm:pl24 sm:pr24">Capture your company’s knowledge and context in a discoverable format to <span class="fc-orange-500">unblock your team</span></p>
<a href="/teams/tour" class="s-btn ws-nowrap fs-body2 px32 bar-md bg-blue-500 h:bg-blue-600 fc-white d:fc-black-900 p-ff-source-bold mt-auto" data-ga="["home page","body cta","teams tour",null,null]">Take a tour of Teams</a>
<div class="js-io-animation p-io-animation d-flex flex__allitems4 sm:fd-column gs48 pt64 jc-center mb64 sm:mb24 sm:pl12 sm:pr12">
<div class="flex--item" data-animation-type="show">
<svg aria-hidden="true" class="mb12 fc-green-500 svg-icon iconApprove" width="18" height="18" viewBox="0 0 18 18"><path d="M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16Zm.25-3.45a1 1 0 0 1-.73.5c-.32 0-.62-.06-.85-.29l-3-3a1 1 0 0 1 1.44-1.38l2.05 2 3.56-6.28c.27-.47.89-.65 1.36-.38.47.27.65.89.38 1.36l-4.21 7.47Z" fill="#5EBA7D"/></svg>
<h3 class="p-ff-roboto-slab-bold fs-title mb12 fc-white d:fc-black">Increase productivity</h3>
<p class="fs-body3 fc-black-300">If somebody somewhere has the right answer, suddenly you have it too. Collaborate better in a remote-first world.</p>
</div>
<div class="flex--item" data-animation-type="show">
<svg aria-hidden="true" class="mb12 fc-green-500 svg-icon iconApprove" width="18" height="18" viewBox="0 0 18 18"><path d="M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16Zm.25-3.45a1 1 0 0 1-.73.5c-.32 0-.62-.06-.85-.29l-3-3a1 1 0 0 1 1.44-1.38l2.05 2 3.56-6.28c.27-.47.89-.65 1.36-.38.47.27.65.89.38 1.36l-4.21 7.47Z" fill="#5EBA7D"/></svg>
<h3 class="p-ff-roboto-slab-bold fs-title mb12 fc-white d:fc-black">Accelerate time to market</h3>
<p class="fs-body3 fc-black-300">Shorten the time between initial idea and complete product. Take delays and misinformation out of the equation.</p>
</div>
<div class="flex--item" data-animation-type="show">
<svg aria-hidden="true" class="mb12 fc-green-500 svg-icon iconApprove" width="18" height="18" viewBox="0 0 18 18"><path d="M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16Zm.25-3.45a1 1 0 0 1-.73.5c-.32 0-.62-.06-.85-.29l-3-3a1 1 0 0 1 1.44-1.38l2.05 2 3.56-6.28c.27-.47.89-.65 1.36-.38.47.27.65.89.38 1.36l-4.21 7.47Z" fill="#5EBA7D"/></svg>
<h3 class="p-ff-roboto-slab-bold fs-title mb12 fc-white d:fc-black">Protect institutional knowledge</h3>
<p class="fs-body3 fc-black-300">People come and people go, but if you capture their contributions in one central place, that expertise sticks around.</p>
</div>
</div>
<h2 class="p-ff-roboto-slab-bold fs-headline2 mb12 bt p-bc-black pt64">Ensure your company stays on course</h2>
<p class="fs-subheading">Here are just a few types of technologists that we help.</p>
</div>
<div class="overflow-x-auto">
<div class="d-flex pt32 mb128 ai-center gs12 mx-auto d:fc-black wmx10 p-font-smooth ta-center">
<div class="js-use-case c-pointer fc-black-025 h:bg-black-800 bar-lg flex--item py32">
<svg aria-hidden="true" class="fc-black-300 mb0 mx32 svg-spot spotRocketLg" width="96" height="96" viewBox="0 0 96 96"><path d="M78.2 14.36a1.73 1.73 0 0 1 1.27-1.85 37.5 37.5 0 0 1 7.66-1.5c1.09-.09 1.98.8 1.9 1.89-.21 2.6-.79 5.19-1.56 7.8a1.71 1.71 0 0 1-1.66 1.28c-4.27-.16-7.08-3.56-7.62-7.62ZM34.55 77.77l3.55-2.84-10-11-3.36 2.69c-.89.7-1 2.02-.23 2.86l7.34 8.08c.7.77 1.88.86 2.7.21ZM70.1 37.93a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm-7 7a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z" opacity=".2"/><path d="M75.5 27a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-7 4a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-14 17a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm4-7a4 4 0 1 1-8 0 4 4 0 0 1 8 0ZM27.21 70.41l2.93 3.23a3.47 3.47 0 0 0 4.74.37l2.82-2.25c.95.34 2.03.25 2.95-.33.8-.51 1.95-1.26 3.35-2.2v8.29c0 3.02 3.6 4.6 5.82 2.56l8.25-7.56a3.5 3.5 0 0 0 1.03-1.77l3.84-16.33c1.7-1.53 3.4-3.13 5.08-4.8 11.26-11.2 22.04-25.83 22.92-41.56a3.32 3.32 0 0 0-3.5-3.5c-15.71.86-30.38 11.47-41.59 22.54a161.7 161.7 0 0 0-5.19 5.4 1.5 1.5 0 0 0-.54.05l-18.35 4.83c-.74.2-1.4.63-1.87 1.25l-5.18 6.8A3.47 3.47 0 0 0 17.48 51H26c-.83 1.21-1.5 2.2-1.95 2.92a3.42 3.42 0 0 0 .38 4.2l.4.43-2.06 2.06a3.47 3.47 0 0 0-.11 4.79l2.53 2.79-.75.75a1.5 1.5 0 0 0 2.12 2.12l.65-.65ZM87.95 7.9c-.17 2.9-.7 5.78-1.53 8.61a9.21 9.21 0 0 1-5.8-2.27 7.13 7.13 0 0 1-2.6-4.88 39.23 39.23 0 0 1 9.59-1.8c.2 0 .35.15.34.34ZM47.96 29.24c7.87-7.77 17.2-15.02 27.15-18.87a10.32 10.32 0 0 0 3.54 6.13 12.33 12.33 0 0 0 6.8 2.95c-3.8 10.29-11.39 19.93-19.54 28.03A169.1 169.1 0 0 1 39.04 68.9c-.15.1-.37.08-.53-.09l-4.68-5.02 10.73-10.73a1.5 1.5 0 0 0-2.12-2.12L31.78 61.6l-5.16-5.53a.42.42 0 0 1-.06-.52 167.03 167.03 0 0 1 21.4-26.31Zm-18.3 34.48-2.35 2.35-2.43-2.69a.47.47 0 0 1 .01-.65l1.99-1.99 2.78 2.98Zm-.33 4.57 2.37-2.37 3.64 3.89L33 71.67a.47.47 0 0 1-.65-.05l-3.03-3.33ZM47 67.15c3.38-2.4 7.6-5.56 12.06-9.34l-2.88 12.25a.47.47 0 0 1-.14.24l-8.25 7.56a.47.47 0 0 1-.79-.34V67.15Zm-9.8-30.73A177.28 177.28 0 0 0 28.11 48H17.48a.47.47 0 0 1-.37-.76l5.17-6.8a.47.47 0 0 1 .26-.16l14.67-3.86ZM14.06 81.44a1.5 1.5 0 0 1 0 2.12l-7 7a1.5 1.5 0 0 1-2.12-2.12l7-7a1.5 1.5 0 0 1 2.12 0Zm9-6.88a1.5 1.5 0 0 0-2.12-2.12l-5 5a1.5 1.5 0 0 0 2.12 2.12l5-5Zm-7-4.12a1.5 1.5 0 0 1 0 2.12l-7 7a1.5 1.5 0 0 1-2.12-2.12l7-7a1.5 1.5 0 0 1 2.12 0Zm9 12.12a1.5 1.5 0 0 0-2.12-2.12l-5 5a1.5 1.5 0 0 0 2.12 2.12l5-5Z"/></svg>
<h3 class="ps-relative px32 d:fc-black pt24 p-ff-roboto-slab-bold fs-title mb12">DevOps engineers</h3>
<p class="fs-body3 px32 hmn1">Shipping new products and features requires teamwork and coordination. Forget checklists and long docs no one ever reads.</p>
</div>
<div class="js-use-case c-pointer fc-black-025 h:bg-black-800 bar-lg flex--item py32">
<svg aria-hidden="true" class="fc-black-300 mb0 mx32 svg-spot spotMetricsLg" width="96" height="96" viewBox="0 0 96 96"><path d="M86 26.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Zm-52 25a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Zm-15 40a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13ZM72.5 60a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0Z" opacity=".2"/><path d="M75 17a8 8 0 1 1 6.49 7.86L68.04 50.79A7.98 7.98 0 0 1 63 65a8 8 0 0 1-7.85-9.55l-17-9.84a8 8 0 0 1-8.56 4.27L20.21 75.2a8 8 0 1 1-2.8-1.08l9.38-25.32a8 8 0 1 1 12.19-6.18l17.3 10.02a8 8 0 0 1 9.12-3.27l13.29-25.63A8 8 0 0 1 75 17Zm8-5a5 5 0 1 0 0 10 5 5 0 0 0 0-10ZM31 37a5 5 0 1 0 0 10 5 5 0 0 0 0-10ZM16 77a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm42-20a5 5 0 1 0 10 0 5 5 0 0 0-10 0Z"/></svg>
<h3 class="ps-relative px32 d:fc-black pt24 p-ff-roboto-slab-bold fs-title mb12">Data scientists</h3>
<p class="fs-body3 px32 hmn1">Business decisions are better when backed by data. Give visibility to the data that support your strategies.</p>
</div>
<div class="js-use-case wmn3 fc-white d:fc-black js-use-case--is-active c-pointer flex--item bg-black-700 d:bg-black-100 py32 bar-lg bs-md">
<svg aria-hidden="true" class="fc-black-300 mb0 mx32 svg-spot spotTechnicalWritingLg" width="96" height="96" viewBox="0 0 96 96"><path d="M33.3 60.21a1 1 0 0 1-.04-1.46l41.1-40.1a1 1 0 0 1 .33-.22l10.83-4.17a1 1 0 0 1 1.31 1.25l-3.26 9.78a1 1 0 0 1-.22.37L43.17 67.8a1 1 0 0 1-1.4.05l-8.48-7.64Zm-9.19 19.02a1 1 0 0 0 .38.98l2.12 1.61a1 1 0 0 1 .11 1.49l-9.1 9.48a3 3 0 0 1-4.29.04l-5.1-5.1a3 3 0 0 1 .11-4.35l12.5-11.28a1 1 0 0 1 1.33-.01l2.38 2.08a1 1 0 0 1 .33.94l-.77 4.12Z" opacity=".2"/><path d="M91.4 5.56a1.5 1.5 0 0 0-1.87-1.98l-15 5c-.24.07-.44.2-.61.38l-9.2 9.6.26-1.85a1.5 1.5 0 0 0-.86-1.58l-11-5a1.5 1.5 0 0 0-1.93.64l-4.51 8.12c-2.16-.21-4.27-.2-6.35 0l-4.52-8.12a1.5 1.5 0 0 0-1.93-.64l-11 5a1.5 1.5 0 0 0-.84 1.73l1.77 7.06c-.9.76-1.6 1.62-2.22 2.46-.32.44-.63.9-.93 1.33v.01a245.75 245.75 0 0 1-.71 1.01l-7.98-2.65a1.5 1.5 0 0 0-1.85.84l-5 12a1.5 1.5 0 0 0 .77 1.95l8 3.56c-.2 2.27-.2 4.93 0 7.14l-8 3.56a1.5 1.5 0 0 0-.77 1.95l5 12a1.5 1.5 0 0 0 1.85.84l2.58-.86-9.57 8.84a1.5 1.5 0 0 0-.04 2.16l9 9a1.5 1.5 0 0 0 2.12 0l7.77-7.76 10.05 4.57c.73.33 1.6.02 1.96-.7l3.53-7.06c2.19.22 4.34.2 6.45-.02l5.48 7.31c.4.54 1.13.74 1.76.5l10-4c.62-.26 1-.9.93-1.57l-.9-8.13a21 21 0 0 0 3.99-4.01l7.06 1.77a1.5 1.5 0 0 0 1.73-.84l5-11a1.5 1.5 0 0 0-.5-1.84L74.1 51.8c.24-2.24.22-4.44 0-6.6l6.28-4.48c.57-.4.78-1.15.52-1.8l-3.59-8.64a1.5 1.5 0 0 0-.58-.7l8.35-8.53c.14-.14.25-.3.32-.5l6-15ZM20.01 68.1c.1-.09.18-.19.25-.3 1 1.46 2.1 2.94 3.55 4.24l-1.67 6.7-.65.64-5.94-5.94a1.5 1.5 0 0 0-.86-.43l5.32-4.9ZM13 74.58c.02.36.17.7.44.98l5.94 5.94L15 85.88l-6.84-6.84L13 74.58Zm12.34 3.74 1.62-6.46a1.5 1.5 0 0 0-.53-1.54c-1.7-1.33-2.8-2.93-4.13-4.86l-.57-.82a1.5 1.5 0 0 0-1.7-.56l-7.68 2.56-3.9-9.36 7.66-3.4c.6-.28.96-.91.88-1.57a37.6 37.6 0 0 1 0-8.61 1.5 1.5 0 0 0-.88-1.57l-7.66-3.4 3.9-9.37 7.68 2.56c.6.2 1.26 0 1.65-.5.45-.57.86-1.15 1.24-1.7l.22-.32.87-1.24a10.1 10.1 0 0 1 2.35-2.43c.5-.36.75-.99.6-1.6l-1.7-6.78 8.6-3.91 4.33 7.79c.3.53.89.84 1.5.76a29.4 29.4 0 0 1 7.61 0 1.5 1.5 0 0 0 1.51-.76l4.33-7.8 8.72 3.97-.7 4.87-6.23 6.5a14.06 14.06 0 0 0-4.86-2.61A21.77 21.77 0 0 0 43.5 25C31.49 25 23 34.69 23 46.5c0 11.76 8.53 22.1 20.6 22.1C55.47 68.6 66 58.44 66 46.5a10.2 10.2 0 0 0-1.14-4.65l-.02-.02a4.72 4.72 0 0 0-.03-.06l9.84-10.06 3 7.26-6.02 4.3A1.5 1.5 0 0 0 71 44.7c.32 2.5.35 5.04 0 7.61-.07.55.17 1.1.62 1.42l6 4.28-3.98 8.74-6.79-1.7a1.5 1.5 0 0 0-1.54.53c-1.66 2.12-2.65 3.29-4.68 4.7-.45.31-.7.85-.63 1.4l.87 7.86L53 82.69l-5.31-7.08a1.5 1.5 0 0 0-1.39-.59c-2.5.32-5.04.35-7.61 0a1.5 1.5 0 0 0-1.54.82l-3.36 6.7-8.32-3.78a1.5 1.5 0 0 0-.14-.43Zm37.38-53.34a1.5 1.5 0 0 0 1.26-1.27l.01-.06 10.54-11 7.36 7.36-43.73 44.7a17.18 17.18 0 0 1-8-5.76l32.56-33.97ZM49.1 29c1.62.55 2.93 1.23 3.74 1.94L28.47 56.38A20.59 20.59 0 0 1 26 46.5C26 36.14 33.34 28 43.5 28c1.58 0 3.68.35 5.61 1Zm-5.52 36.6c-.67 0-1.34-.04-1.99-.11l20.96-21.43.02.04v.02c.21.59.42 1.42.42 2.38 0 10.23-9.12 19.1-19.4 19.1Zm39.86-48.27-6.42-6.42L87.4 7.45l-3.96 9.88Z"/></svg>
<h3 class="ps-relative px32 d:fc-black pt24 p-ff-roboto-slab-bold fs-title mb12">Software engineers</h3>
<p class="fs-body3 px24 hmn1">Help engineers be more efficient and streamline knowledge sharing using a tool they already love and trust.</p>
</div>
<div class="js-use-case c-pointer fc-black-025 h:bg-black-800 bar-lg flex--item py32">
<svg aria-hidden="true" class="fc-black-300 mb0 mx32 svg-spot spotHeadsetLg" width="96" height="96" viewBox="0 0 96 96"><path d="M67.37 12.9A38.67 38.67 0 0 0 50.8 9a38.02 38.02 0 0 0-16.47 3.9c-.38.3-.44.74-.19 1.2l4.74 7.49c.24.35.79.61 1.29.6.1-.01.21-.04.32-.07 1.01-.29 6.76-1.88 10.4-1.88 3.7 0 9.6 1.65 10.45 1.9.07.02.14.04.22.04.44.05 1-.15 1.25-.6l4.73-7.49c.26-.44.2-.9-.18-1.18ZM19 77.5a7.84 7.84 0 0 0 7.79 7.88 3.98 3.98 0 0 0 3.93-3.9v-18.5A4 4 0 0 0 26.8 59a7.84 7.84 0 0 0-7.8 7.89v10.6Zm57.94 6.88c4.3 0 7.78-3.54 7.78-7.89V65.9a7.84 7.84 0 0 0-7.78-7.9A4 4 0 0 0 73 61.99v18.5a3.98 3.98 0 0 0 3.94 3.89ZM49 92h6a3 3 0 0 0 0-6h-6a3 3 0 0 0 0 6Z" opacity=".2"/><path d="M54.5 12a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM50 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM42.5 12a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM11 43.69a37.1 37.1 0 0 1 19.3-32.54l1.99 2.93C20.7 19.81 13.95 30.6 13.95 44.57a1.5 1.5 0 0 0 3 0c0-13 6.27-22.8 17-27.96l.05-.02 1.66 2.44c.38.57 1.1.8 1.74.57a34.63 34.63 0 0 1 11.47-1.97c4.03 0 7.94.63 11.45 1.96.66.25 1.4 0 1.79-.58l1.33-2.06c10.35 5.35 16.59 14.92 16.59 27.62a1.5 1.5 0 0 0 3 0c0-13.74-6.78-24.26-17.95-30.14l1.99-3.06A37.8 37.8 0 0 1 75 17.41a36.77 36.77 0 0 1 11 26.28V64h-3v-1.23c0-5.26-4.7-9.27-10.13-9.27-3.06 0-5.87 2.31-5.87 5.43v18.23c0 3.05 2.83 5.34 5.87 5.34.2 0 .4 0 .59-.02-.07.39-.21.77-.4 1.06-.28.43-.5.46-.56.46H54.74a4.5 4.5 0 0 0-4.24-3h-6a4.5 4.5 0 0 0 0 9h6a4.5 4.5 0 0 0 4.24-3H72.5a3.7 3.7 0 0 0 3.07-1.83c.6-.92.93-2.08.93-3.17v-.03a1.78 1.78 0 0 0 0-.09c3.74-1.32 6.5-4.62 6.5-8.65V73h4.33c2.46 0 4.17-2.19 4.17-4.5 0-1.74-.97-3.41-2.5-4.13V43.69c0-11.12-4.5-21.1-11.88-28.41A40.39 40.39 0 0 0 48.5 3.5C26.1 3.5 8 21.45 8 43.69v20.48a4.5 4.5 0 0 0-3 4.33C5 70.81 6.7 73 9.17 73H13v.23c0 5.26 4.7 9.27 10.13 9.27 3.04 0 5.87-2.3 5.87-5.34V58.93c0-3.12-2.8-5.43-5.87-5.43C17.7 53.5 13 57.51 13 62.77V64h-2V43.69ZM37.5 16.4 33 9.8a37.72 37.72 0 0 1 15.5-3.3 37.5 37.5 0 0 1 15.89 3.49l-4.16 6.39a37.63 37.63 0 0 0-22.73.03Zm14.25 68.26a1.5 1.5 0 0 0 0 1.66c-.27.4-.73.67-1.25.67h-6a1.5 1.5 0 0 1 0-3h6c.52 0 .98.27 1.25.67ZM23.13 56.5c1.7 0 2.87 1.26 2.87 2.43v18.23c0 1.06-1.14 2.34-2.87 2.34-4.08 0-7.13-2.96-7.13-6.27V62.77c0-3.31 3.05-6.27 7.13-6.27ZM9.17 67H13v3H9.17C8.69 70 8 69.5 8 68.5S8.69 67 9.17 67ZM70 58.93c0-1.17 1.16-2.43 2.87-2.43 4.08 0 7.13 2.96 7.13 6.27v10.46c0 3.31-3.05 6.27-7.13 6.27-1.73 0-2.87-1.28-2.87-2.34V58.93ZM83.5 70v-3h3.83c.48 0 1.17.5 1.17 1.5s-.69 1.5-1.17 1.5H83.5Z"/></svg>
<h3 class="ps-relative px32 d:fc-black pt24 p-ff-roboto-slab-bold fs-title mb12">Support teams</h3>
<p class="fs-body3 px32 hmn1">Level up your support by providing information to your customers using a natural interface: questions and answers.</p>
</div>
<div class="js-use-case c-pointer fc-black-025 h:bg-black-800 bar-lg flex--item py32">
<svg aria-hidden="true" class="fc-black-300 mb0 mx32 svg-spot spotPeopleLg" width="96" height="96" viewBox="0 0 96 96"><path opacity=".2" d="M36 47.5a9.48 9.48 0 0 1-3.67 7.5h5.76a1 1 0 0 1 .7.29l1.39 1.36A9.5 9.5 0 0 1 57.87 54h7.7a9.5 9.5 0 1 1 13.86 0H83a4 4 0 0 1 4 4v23a2 2 0 0 1-2 2H64v10a1 1 0 0 1-1 1H36a1 1 0 0 1-1-1V83H16a1 1 0 0 1-1-1V59a4 4 0 0 1 4-4h1.67a9.48 9.48 0 0 1 5.83-17 9.5 9.5 0 0 1 9.5 9.5Z"/><path d="M13 44.5A11 11 0 1 1 30.98 53h.52a1.5 1.5 0 0 1 0 3H15.54C13.5 56 12 57.54 12 59.21V78h4.38a1.5 1.5 0 0 1-.38-1V63a1.5 1.5 0 0 1 3 0v14c0 .38-.14.73-.38 1h9.06a1.5 1.5 0 0 1 0 3H10.5A1.5 1.5 0 0 1 9 79.5V59.21c0-3.5 3.03-6.21 6.54-6.21h1.48A10.98 10.98 0 0 1 13 44.5Zm11-8a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm23 8A11 11 0 0 0 40.02 64h-1.33C35.12 64 32 66.73 32 70.3v20.2c0 .83.67 1.5 1.5 1.5h27c.83 0 1.5-.67 1.5-1.5V70.3c0-3.57-3.12-6.3-6.7-6.3h-1.32A11 11 0 0 0 47 44.5Zm-8 11a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm-4 14.8c0-1.7 1.55-3.3 3.7-3.3h16.6c2.15 0 3.7 1.6 3.7 3.3V89h-4V75a1.5 1.5 0 0 0-3 0v14H42V75a1.5 1.5 0 0 0-3 0v14h-4V70.3Zm35-36.8A11 11 0 0 1 76.98 53h1.7A6.28 6.28 0 0 1 85 59.21V79.5c0 .83-.67 1.5-1.5 1.5H66.32a1.5 1.5 0 0 1 0-3h8.06a1.5 1.5 0 0 1-.38-1V63a1.5 1.5 0 0 1 3 0v14c0 .38-.14.73-.38 1H82V59.21A3.28 3.28 0 0 0 78.68 56H62.5a1.5 1.5 0 0 1 0-3h.52A11 11 0 0 1 70 33.5Zm8 11a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/><path d="M12.5 11a1.5 1.5 0 0 0 0 3h13a1.5 1.5 0 0 0 0-3h-13ZM11 17.5c0-.83.67-1.5 1.5-1.5h9a1.5 1.5 0 0 1 0 3h-9a1.5 1.5 0 0 1-1.5-1.5Zm-5-10C6 6.67 6.67 6 7.5 6h25c.83 0 1.5.67 1.5 1.5v15c0 .83-.67 1.5-1.5 1.5H29v6a1.5 1.5 0 0 1-2.4 1.2L17 24H7.5A1.5 1.5 0 0 1 6 22.5v-15ZM9 9v12h8.5c.32 0 .64.1.9.3L26 27v-6h5V9H9Zm60.5 3a1.5 1.5 0 0 0 0 3h13a1.5 1.5 0 0 0 0-3h-13ZM68 18.5c0-.83.67-1.5 1.5-1.5h8a1.5 1.5 0 0 1 0 3h-8a1.5 1.5 0 0 1-1.5-1.5ZM87.5 7c.83 0 1.5.67 1.5 1.5v16c0 .83-.67 1.5-1.5 1.5H76.42l-7.15 4.29A1.5 1.5 0 0 1 67 29v-3h-2.5a1.5 1.5 0 0 1-1.5-1.5v-16c0-.83.67-1.5 1.5-1.5h23ZM86 23V10H66v13h4v3.35l5.23-3.14c.23-.14.5-.21.77-.21h10Zm-42.5 4a1.5 1.5 0 0 0 0 3h9a1.5 1.5 0 0 0 0-3h-9ZM59 22.5c0-.83-.67-1.5-1.5-1.5h-19c-.83 0-1.5.67-1.5 1.5v12c0 .83.67 1.5 1.5 1.5H41v4.5a1.5 1.5 0 0 0 2.56 1.06L49.12 36h8.38c.83 0 1.5-.67 1.5-1.5v-12ZM40 24h16v9h-8.12L44 36.88V33h-4v-9Z" opacity=".35"/></svg>
<h3 class="ps-relative px32 d:fc-black pt24 p-ff-roboto-slab-bold fs-title mb12">Engineering leaders</h3>
<p class="fs-body3 px32 hmn1">Help your team get the information they need to do their job - reduce burnout and help engineers grow and learn together.</p>
</div>
</div>
</div>
<div class="p-wrapper pl24 pr24 sm:pl0 sm:pr0 mx-auto ta-left mb32 fc-white d:fc-black">
<div class="bg-contain bg-no-repeat bg-center pb32 md:p-bg-none">
<div class="d-flex ai-center mb24 lg:ml4">
<label class="flex--item s-label fw-normal mr8 us-none" for="billing-period" style="color:inherit">Annual billing discount</label>
<div class="flex--item s-toggle-switch">
<input id="billing-period" name="billing-period" type="checkbox" checked>
<div class="s-toggle-switch--indicator"></div>
</div>
</div>
<div class="d-flex flex__allitems3 gs24 mln32 mrn32 sm:ml0 sm:mr0 ff-row-wrap sm:fd-column jc-center fc-black-750">
<div id="p-pricing-grid-free" class="flex--item d-flex fd-column wmn3">
<div class="bg-white bar-lg ba bc-black-075 h100 p24 fs-body2 d-flex fd-column">
<h2 class="px8 py4 as-start bar-sm bg-orange-500 fc-white fs-body3">
Free
</h2>
<div class="bb bc-orange-500 pb24 mb24">
<div class="p-ff-roboto-slab-bold fw-bold fs-headline1 p-font-smooth lh-xs pt12 mb6">
Free
</div>
<div class="fc-black-350 fs-body2">No credit card required</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconBullhorn" width="18" height="18" viewBox="0 0 18 18"><path d="M16 1a1 1 0 0 0-1 1v.38L5.3 6A2 2 0 0 0 4 7.9v2.22a2 2 0 0 0 1 1.74v1.65a3.5 3.5 0 0 0 6.87.95L15 15.63V16a1 1 0 1 0 2 0V2a1 1 0 0 0-1-1ZM6.6 12.47l3.76 1.42a1.9 1.9 0 0 1-3.76-.39v-1.03ZM2 6a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V7a1 1 0 0 0-1-1Z"/></svg></div>
<div>ChatOps integrations - Slack & Microsoft Teams</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconShield" width="18" height="18" viewBox="0 0 18 18"><path d="m2 4 7-3 7 3v5.02C16 13.69 10.69 17 9 17c-1.69 0-7-3.31-7-7.98V4Zm6.14 5.2L7 12h4L9.86 9.2a.58.58 0 0 1 .25-.59c.56-.36.89-.95.89-1.61 0-1.09-.94-2-2.02-2A2 2 0 0 0 7 7c0 .66.33 1.25.89 1.61.2.13.3.36.25.59Z"/></svg></div>
<div>Your own private space hosted on stackoverflow.com</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconArchive" width="18" height="18" viewBox="0 0 18 18"><path d="M3 1a2 2 0 0 0-2 2v1h16V3a2 2 0 0 0-2-2H3ZM2 5h14v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5Zm4 3a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H7a1 1 0 0 0-1 1Z"/></svg></div>
<div>Structured and searchable knowledge base</div>
</div>
<div class="mt-auto">
<a
href="https://stackoverflow.com/teams/create/free"
class="s-btn mt24 d-block as-stretch fs-body2 px32 bar-md p-ff-source-bold bg-orange-500 h:bg-orange-600 fc-white"
data-ga="["teams landing","plans menu click","stackoverflow.com/teams/create/free",null,null]"
Basic
>
Create a free Team
</a>
</div>
<p class="fc-black-300 mb0 ta-center pt12">Always free up to 50 teammates</p>
</div>
</div>
<div id="p-pricing-grid-basic" class="flex--item d-flex fd-column wmn3">
<div class="bg-white bar-lg ba bc-black-075 h100 p24 fs-body2 d-flex fd-column">
<h2 class="px8 py4 as-start bar-sm bg-black-150 fc-black-750 fs-body3">
Basic
</h2>
<div class="bb bc-black-075 pb24 mb24">
<div class="p-ff-roboto-slab-bold fw-bold fs-headline1 p-font-smooth lh-xs pt12 mb6">
<span class="js-billed-annually">$6 USD</span>
<span class="js-billed-monthly d-none">$7 USD</span>
</div>
<div class="fc-black-350 fs-body2">per teammate / month</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconKey" width="18" height="18" viewBox="0 0 18 18"><path d="M17 5.5a4.5 4.5 0 0 1-5.8 4.3L10 11H8v2H6v2H4v2H1v-3.5l7.1-7.1A4.52 4.52 0 0 1 12.5 1 4.5 4.5 0 0 1 17 5.5Zm-4 1a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/></svg></div>
<div>Single sign-on (SSO) with SAML + Okta integration</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconBullhorn" width="18" height="18" viewBox="0 0 18 18"><path d="M16 1a1 1 0 0 0-1 1v.38L5.3 6A2 2 0 0 0 4 7.9v2.22a2 2 0 0 0 1 1.74v1.65a3.5 3.5 0 0 0 6.87.95L15 15.63V16a1 1 0 1 0 2 0V2a1 1 0 0 0-1-1ZM6.6 12.47l3.76 1.42a1.9 1.9 0 0 1-3.76-.39v-1.03ZM2 6a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V7a1 1 0 0 0-1-1Z"/></svg></div>
<div>ChatOps integrations - Slack & Microsoft Teams</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconShield" width="18" height="18" viewBox="0 0 18 18"><path d="m2 4 7-3 7 3v5.02C16 13.69 10.69 17 9 17c-1.69 0-7-3.31-7-7.98V4Zm6.14 5.2L7 12h4L9.86 9.2a.58.58 0 0 1 .25-.59c.56-.36.89-.95.89-1.61 0-1.09-.94-2-2.02-2A2 2 0 0 0 7 7c0 .66.33 1.25.89 1.61.2.13.3.36.25.59Z"/></svg></div>
<div>Your own private space hosted on stackoverflow.com</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconArchive" width="18" height="18" viewBox="0 0 18 18"><path d="M3 1a2 2 0 0 0-2 2v1h16V3a2 2 0 0 0-2-2H3ZM2 5h14v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5Zm4 3a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H7a1 1 0 0 0-1 1Z"/></svg></div>
<div>Structured and searchable knowledge base</div>
</div>
<div class="mt-auto">
<a
href="https://stackoverflow.com/teams/create/basic"
class="s-btn mt24 d-block as-stretch fs-body2 px32 bar-md p-ff-source-bold bg-black-075 h:bg-black-150 fc-powder-900"
data-ga="["teams landing","plans menu click","stackoverflow.com/teams/create/basic",null,null]"
Basic
>
Get started
</a>
</div>
<p class="fc-black-300 mb0 ta-center pt12">Up to 250 teammates</p>
</div>
</div>
<div id="p-pricing-grid-business" class="flex--item d-flex fd-column wmn3 bg-bottom bg-no-repeat bg-contain ps-relative z-active fc-black-750" style="background-image:url(https://cdn.sstatic.net/Img/product/teams/illo-teams-pricing-shadow.svg)">
<div class="px16 py8 bg-black-050 d:bg-black-025 bl bt br bc-black-100 btr-lg fs-body2 p-ff-source-bold fs-body1 ps-absolute lg:ps-static b100 l0 r0 tt-uppercase">
<svg aria-hidden="true" class="float-right svg-icon iconIndustry" width="18" height="18" viewBox="0 0 18 18"><path d="M10 16v-4H8v4H2V4c0-1.1.9-2 2-2h6c1.09 0 2 .91 2 2v2h2c1.09 0 2 .91 2 2v8h-6ZM4 4v2h2V4H4Zm0 4v2h2V8H4Zm4-4v2h2V4H8Zm0 4v2h2V8H8Zm-4 4v2h2v-2H4Zm8 0v2h2v-2h-2Zm0-4v2h2V8h-2Z"/></svg>
Recommended
</div>
<div class="p24 h100 bg-black-025 bl br bb bbr-lg bc-black-100 p-bs-wrapper fs-body2 d-flex fd-column">
<h2 class="px8 py4 as-start bar-sm bg-black-700 fc-white fs-body3">
Business
</h2>
<div class="bb bc-black-075 pb24 mb24">
<div class="p-ff-roboto-slab-bold fw-bold fs-headline1 p-font-smooth lh-xs pt12 mb6">
<span class="js-billed-annually">$12 USD</span>
<span class="js-billed-monthly d-none">$14 USD</span>
</div>
<div class="fc-black-350 fs-body2">per teammate / month</div>
</div>
<div class="d-flex mb12 fc-black-400 mb24">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconPlus" width="18" height="18" viewBox="0 0 18 18"><path d="M10 2H8v6H2v2h6v6h2v-6h6V8h-6V2Z"/></svg></div>
<div>All the features of Basic plus…</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconDocumentAlt" width="18" height="18" viewBox="0 0 18 18"><path d="M5 3a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h7a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H5Zm2 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm-2 4.5c0-.28.22-.5.5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5Zm.5 1.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1 0-1ZM5 14.5c0-.28.22-.5.5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5Z"/><path opacity=".4" d="M5.9 2h6.35A2.75 2.75 0 0 1 15 4.75v9.35c.62-.6 1-1.43 1-2.35v-7.5C16 2.45 14.54 1 12.75 1h-4.5c-.92 0-1.75.38-2.35 1Z"/></svg></div>
<div>Long-form knowledge with Articles</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconLink" width="18" height="18" viewBox="0 0 18 18"><path d="M7.22 11.83a6 6 0 0 0 1.62.85l.61-1.8a4.1 4.1 0 1 1 4.04-.8l1.26 1.42a6 6 0 1 0-7.53.33Zm3.43-5.6a6 6 0 0 0-1.6-.87L8.4 7.15a4.1 4.1 0 1 1-4.05.73L3.12 6.43a6 6 0 1 0 7.53-.2Z"/></svg></div>
<div>Additional integrations — ChatOps, Jira, GitHub & Okta</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconCollection" width="18" height="18" viewBox="0 0 18 18"><path d="M5 3a2 2 0 0 0-2 2v7c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H5Zm0 2.5c0-.28.22-.5.5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5ZM5.5 8h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1 0-1ZM5 11.5c0-.28.22-.5.5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5Z"/><path opacity=".4" d="M15.09 15H4.74A2.75 2.75 0 0 1 2 12.23V4.9c-.61.59-1 1.42-1 2.34v5.5C1 14.54 2.45 16 4.24 16h8.5c.92 0 1.76-.38 2.35-1Z"/></svg></div>
<div>Group content together into Collections</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconGraph" width="18" height="18" viewBox="0 0 18 18"><path d="M3 1h12c1.09 0 2 .91 2 2v12c0 1.09-.91 2-2 2H3c-1.09 0-2-.91-2-2V3c0-1.1.9-2 2-2Zm1 8v5h2V9H4Zm4-5v10h2V4H8Zm4 3v7h2V7h-2Z"/></svg></div>
<div>Usage and adoption metrics</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconHealth" width="18" height="18" viewBox="0 0 18 18"><path d="M9 1 2 4v5.02C2 13.69 7.31 17 9 17c1.69 0 7-3.31 7-7.98V4L9 1Zm1 9v3H8v-3H5V8h3V5h2v3h3v2h-3Z"/></svg></div>
<div>Priority customer support</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconTool" width="18" height="18" viewBox="0 0 18 18"><path d="M4.2 1.33a4.99 4.99 0 0 1 6.47 6.47L17 14.13l-2.88 2.88-6.34-6.34a4.99 4.99 0 0 1-6.45-6.45l3.22 3.2 2.88-2.87L4.2 1.33Z"/></svg></div>
<div>Content Health tools</div>
</div>
<div class="mt-auto">
<a
href="https://stackoverflow.com/teams/create/business"
class="s-btn mt24 d-block as-stretch fs-body2 px32 bar-md p-ff-source-bold bg-black-700 h:bg-black-600 fc-white"
data-ga="["teams landing","plans menu click","stackoverflow.com/teams/create/business",null,null]"
Basic
>
Get started
</a>
</div>
<p class="fc-black-300 mb0 ta-center pt12">Unlimited teammates</p>
</div>
</div>
<div id="p-pricing-grid-enterprise" class="flex--item d-flex fd-column wmn3">
<div class="bg-white bar-lg ba bc-black-075 h100 p24 fs-body2 d-flex fd-column">
<h2 class="px8 py4 as-start bar-sm p-bg-purple d:p-bg-purple-alt fc-white d:fc-black fs-body3">
Enterprise
</h2>
<div class="bb bc-black-100 pb24 mb24">
<div class="p-ff-roboto-slab-bold fw-bold fs-headline1 p-font-smooth lh-xs pt12 mb6">
Custom pricing
</div>
<div class="fc-black-350 fs-body2">Let’s talk about what you need</div>
</div>
<div class="d-flex mb12 fc-black-400 mb24">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconPlus" width="18" height="18" viewBox="0 0 18 18"><path d="M10 2H8v6H2v2h6v6h2v-6h6V8h-6V2Z"/></svg></div>
<div>Premium features of Business plus…</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconPeople" width="18" height="18" viewBox="0 0 18 18"><path d="M17 14c0 .44-.45 1-1 1H9a1 1 0 0 1-1-1H2c-.54 0-1-.56-1-1 0-2.63 3-4 3-4s.23-.4 0-1c-.84-.62-1.06-.59-1-3 .06-2.42 1.37-3 2.5-3s2.44.58 2.5 3c.06 2.41-.16 2.38-1 3-.23.59 0 1 0 1s1.55.71 2.42 2.09c.78-.72 1.58-1.1 1.58-1.1s.23-.4 0-1c-.84-.61-1.06-.58-1-3 .06-2.41 1.37-3 2.5-3s2.44.59 2.5 3c.05 2.42-.16 2.39-1 3-.23.6 0 1 0 1s3 1.38 3 4Z"/></svg></div>
<div>Unlimited Teams within your instance</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconPeak" width="18" height="18" viewBox="0 0 18 18"><path d="M10.5 3.5 8 7.25l2 2.25L8.5 11l-3-3.5L1 14h16L10.5 3.5Z"/></svg></div>
<div>Flexible hosting options — cloud or on-premises</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconCode" width="18" height="18" viewBox="0 0 18 18"><path d="M8 4.41 6.59 3l-6 6 6 6L8 13.59 3.41 9 8 4.41Zm2 0L11.41 3l6 6-6 6L10 13.59 14.59 9 10 4.41Z"/></svg></div>
<div>Robust read and write API</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconSpeechBubbleQuestion" width="18" height="18" viewBox="0 0 18 18"><path d="m1 18 3-3h11c1.09 0 2-.91 2-2V4c0-1.09-.91-2-2-2H3a2 2 0 0 0-2 2v14Zm7.96-4.94c-.57-.02-1.03-.43-1.01-1.06.02-.63.5-1.04 1.08-1.02.6.02 1.05.45 1.03 1.08-.02.63-.48 1.02-1.1 1Zm.92-3.68a3.6 3.6 0 0 0-.08.65c0 .04-.03.14-.16.14h-1.4c-.14 0-.16-.09-.16-.13-.01-.5.11-.99.36-1.42.2-.36.58-.65 1.06-.93.41-.23.78-.71.78-1.2 0-.27-.09-.53-.26-.74-.22-.26-.46-.4-.92-.4-.45 0-.83.23-1.02.52-.17.27-.16.55-.16.83v.11H6.2c0-1.17.31-1.92.98-2.36a3.5 3.5 0 0 1 1.83-.44c.88 0 1.58.16 2.2.62.58.42.88 1.02.88 1.82 0 .5-.17.9-.43 1.24-.15.2-.44.47-.86.8l-.48.3c-.2.14-.36.35-.44.6Z"/></svg></div>
<div>Your own customer success and community building representative</div>
</div>
<div class="d-flex mb12 ">
<div class="mr12"><svg aria-hidden="true" class="svg-icon iconHealth" width="18" height="18" viewBox="0 0 18 18"><path d="M9 1 2 4v5.02C2 13.69 7.31 17 9 17c1.69 0 7-3.31 7-7.98V4L9 1Zm1 9v3H8v-3H5V8h3V5h2v3h3v2h-3Z"/></svg></div>
<div>99.5% uptime SLA and priority support</div>
</div>
<div class="mt-auto">
<a
href="https://stackoverflow.co/explore-teams"
class="s-btn mt24 d-block as-stretch fs-body2 px32 bar-md p-ff-source-bold p-bg-purple d:p-bg-purple-alt h:p-bg-purple-tint fc-white d:fc-black"
data-ga="["teams landing","plans menu click","stackoverflow.com/enterprise/get-started",null,null]"
Basic
>
Request a demo
</a>
</div>
<p class="fc-black-300 mb0 ta-center pt12">Unlimited teammates</p>
</div>
</div>
</div>
</div>
<script>
(function () {
var billingPeriodSwitch = document.querySelectorAll('input[name="billing-period"]');
billingPeriodSwitch.forEach(function(radio) {
radio.addEventListener('change', function(e) {
var cycle = e.target.checked ? 'annually' : 'monthly';
var notCycle = e.target.checked ? 'monthly' : 'annually';
document.querySelectorAll('.js-billed-' + cycle).forEach(function(price) {
price.classList.remove('d-none');
});
document.querySelectorAll('.js-billed-' + notCycle).forEach(function(price) {
price.classList.add('d-none');
});
});
});
})();
</script>
</div>
<div class="d-flex flex__allitems3 wmx12 px24 mx-auto gs24 mb32 sm:fd-column jc-center ff-row-wrap">
<div class="flex--item wmn2">
<div class="fc-blue-500 d-block h100 p24 ba p-bc-black fs-body3 bar-lg"><span class="fc-white d:fc-black">A Forrester Consulting study shows</span> <strong class="p-ff-roboto-slab-bold fs-title px4">179% return on investment</strong> <span class="fc-white d:fc-black">with Stack Overflow for Teams.</span></div>
</div>
<div class="flex--item wmn2">
<div class="fc-blue-500 d-block h100 p24 ba p-bc-black fs-body3 bar-lg">
<span class="fc-white d:fc-black">The world’s largest telecom firm</span> <span class="p-ff-roboto-slab-bold fs-title px4">saved $10M</span> <span class="fc-white d:fc-black">in deflected support cases with our centralized knowledge base.</span>
</div>
</div>
<div class="flex--item wmn2">
<div class="fc-blue-500 d-block h100 p24 ba p-bc-black fs-body3 bar-lg">
<span class="fc-white d:fc-black">Subject-matter experts at software platform Unqork had</span> <span class="p-ff-roboto-slab-bold fs-title px4 lh-xs">27% more time</span> <span class="fc-white d:fc-black">to work on projects after using Teams.</span>
</div>
</div>
<div class="flex--item wmn2">
<a href="/teams/calculate/attract-and-retain-talent" class="fc-blue-500 h:fc-blue-300 d-block h100 p24 ba p-bc-black fs-body3 fc-blue-500 h:fc-blue-400 bar-lg h:bs-md" data-ga="["home page","roi calculator - attract & retain talent","calculate roi",null,null]">
<span class="fc-white d:fc-black d-block">You can save time and money with Stack Overflow for Teams.</span>
<span class="mt16 s-btn fs-body2 px32 bar-md s-btn__outlined fc-blue-400 h:bg-black-700 p-ff-source-bold">Calculate your ROI</span>
</a>
</div>
</div>
<div class="d-flex gs32 jc-center ai-center sm:fd-column sm:pl24 sm:pr24">
<div class="flex--item lg:d-none ta-center">
<a href="https://stackoverflow.co/teams/integrations/microsoft-teams" class="ml-auto wmx4 d-block">
<img width="421" height="465" class="js-lazy-load wmx100 h-auto d-block" data-src="https://cdn.sstatic.net/Img/home/illo-integrations-left.png?v=0a97d470e180" alt="" />
<noscript>
<img width="421" height="465" class="wmx100 h-auto d-block" src="https://cdn.sstatic.net/Img/home/illo-integrations-left.png?v=0a97d470e180" alt="">
</noscript>
<div class="fs-subheading fc-white d-block ta-center ml32">
<svg aria-hidden="true" class="native mr6 w24 h24 svg-icon iconMicrosoftTeams" width="18" height="18" viewBox="0 0 18 18"><path d="M15.25 6.25a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM17.2 7H13v5.5a2.5 2.5 0 0 0 5 0V7.8a.8.8 0 0 0-.8-.8Z" fill="#5158CC"/><path d="M12 3.5a2.5 2.5 0 0 1-2 2.45V5a2 2 0 0 0-2-2h-.95a2.5 2.5 0 0 1 4.95.5ZM9.5 17a4.5 4.5 0 0 1-4.24-3H8a2 2 0 0 0 2-2V7h3a1 1 0 0 1 1 1v4.5A4.5 4.5 0 0 1 9.5 17Z" fill="#7B82EA"/><path d="M1 4a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H1Zm1 2h5v1H5v4H4V7H2V6Z" fill="#4D54BC"/></svg>
Microsoft Teams
</div>
</a>
</div>
<div class="flex--item6">
<h2 class="p-ff-roboto-slab-bold fc-white d:fc-black fs-headline2 mb12">Integrates with and improves other tools</h2>
<p class="fs-subheading wmx7 mx-auto fc-black-200 mb32">All plans come with integrations for ChatOps tools <a class="fc-blue-500 h:fc-blue-300" href="https://stackoverflow.co/teams/integrations/slack">Slack</a> & <a class="fc-blue-500 h:fc-blue-300" href="https://stackoverflow.co/teams/integrations/microsoft-teams">Microsoft Teams</a> in order to cut down on pings, limit distractions and make the tools even more powerful. Business and Enterprise customers get access to Jira, GitHub & Okta integrations.</p>
<div class="d-flex flex__center gs16 ff-row-wrap">
<a href="/teams/integrations/slack" class="flex--item d-flex ai-center jc-center fc-black-900 d:fc-black-900 bg-white d:p-bg-dark-tint bar-md bs-sm h:bs-md w64 h64" title="Slack" data-controller="s-tooltip" data-s-tooltip-placement="top">
<svg aria-hidden="true" class="native w48 h48 wmx75 svg-icon iconSlack" width="18" height="18" viewBox="0 0 18 18"><path d="M6.5 16A1.5 1.5 0 0 1 5 14.5v-4a1.5 1.5 0 1 1 3 0v4c0 .83-.67 1.5-1.5 1.5Zm-4-4a1.5 1.5 0 0 1 0-3H4v1.5c0 .83-.67 1.5-1.5 1.5Z" fill="#E01E5A"/><path d="M2.5 5h4a1.5 1.5 0 1 1 0 3h-4a1.5 1.5 0 1 1 0-3Zm4-4C7.33 1 8 1.67 8 2.5V4H6.5a1.5 1.5 0 1 1 0-3Z" fill="#36C5F0"/><path d="M10.5 9h4a1.5 1.5 0 0 1 0 3h-4a1.5 1.5 0 0 1 0-3Zm0 7A1.5 1.5 0 0 1 9 14.5V13h1.5a1.5 1.5 0 0 1 0 3Z" fill="#ECB22E"/><path d="M10.5 1c.83 0 1.5.67 1.5 1.5v4a1.5 1.5 0 0 1-3 0v-4c0-.83.67-1.5 1.5-1.5Zm4 4a1.5 1.5 0 0 1 0 3H13V6.5c0-.83.67-1.5 1.5-1.5Z" fill="#2EB67D"/></svg> </a>
<a href="/teams/integrations/microsoft-teams" class="flex--item d-flex ai-center jc-center fc-black-900 d:fc-black-900 bg-white d:p-bg-dark-tint bar-md bs-sm h:bs-md w64 h64" title="Microsoft Teams" data-controller="s-tooltip" data-s-tooltip-placement="top">
<img src="https://cdn.sstatic.net/Img/product/teams/microsoft-integration/microsoft-teams-logo.svg?v=00361aadd408" width="48" height="48" class="native w48 h48 wmx75" alt="">
</a>
<a href="/teams/integrations/github" class="flex--item d-flex ai-center jc-center fc-black-900 d:fc-black-900 bg-white d:p-bg-dark-tint bar-md bs-sm h:bs-md w64 h64" title="GitHub" data-controller="s-tooltip" data-s-tooltip-placement="top">
<svg aria-hidden="true" class="w48 h48 wmx75 svg-icon iconGitHub" width="18" height="18" viewBox="0 0 18 18"><path d="M9 1a8 8 0 0 0-2.53 15.59c.4.07.55-.17.55-.38l-.01-1.49c-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.42 7.42 0 0 1 4 0c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48l-.01 2.2c0 .21.15.46.55.38A8.01 8.01 0 0 0 9 1Z" fill="#010101"/></svg> </a>
<a href="/teams/integrations/jira" class="flex--item d-flex ai-center jc-center fc-black-900 d:fc-black-900 bg-white d:p-bg-dark-tint bar-md bs-sm h:bs-md w64 h64" title="Jira" data-controller="s-tooltip" data-s-tooltip-placement="top">
<svg aria-hidden="true" class="native w48 h48 wmx75 svg-icon iconJira" width="18" height="18" viewBox="0 0 18 18"><path d="M16.36 1H8.78a3.42 3.42 0 0 0 3.42 3.42h1.4v1.35A3.42 3.42 0 0 0 17 9.2V1.66a.66.66 0 0 0-.64-.66Z" fill="#2684FF"/><path d="M12.33 5H4.74a3.42 3.42 0 0 0 3.42 3.43h1.4v1.35a3.42 3.42 0 0 0 3.42 3.42V5.66a.66.66 0 0 0-.65-.66Z" fill="url(#Jiraa)"/><path d="M8.36 9H.76a3.42 3.42 0 0 0 3.44 3.42h1.4v1.35a3.42 3.42 0 0 0 3.42 3.43V9.66A.66.66 0 0 0 8.36 9Z" fill="url(#Jirab)"/><defs><linearGradient id="Jiraa" x1="12.82" y1="5.02" x2="9.6" y2="8.34" gradientUnits="userSpaceOnUse"><stop offset=".18" stop-color="#0052CC"/><stop offset="1" stop-color="#2684FF"/></linearGradient><linearGradient id="Jirab" x1="346.65" y1="327.03" x2="210.84" y2="460.17" gradientUnits="userSpaceOnUse"><stop offset=".18" stop-color="#0052CC"/><stop offset="1" stop-color="#2684FF"/></linearGradient></defs></svg> </a>
<a href="/teams/integrations/okta" class="flex--item d-flex ai-center jc-center fc-black-900 d:fc-black-900 bg-white d:p-bg-dark-tint bar-md bs-sm h:bs-md w64 h64" title="Okta" data-controller="s-tooltip" data-s-tooltip-placement="top">
<svg aria-hidden="true" class="native w48 h48 wmx75 svg-icon iconOkta" width="18" height="18" viewBox="0 0 18 18"><path d="M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16Zm0-4a4 4 0 1 1 0-8 4 4 0 0 1 0 8Z" fill="#007DC1"/></svg> </a>
</div>
</div>
<div class="flex--item lg:d-none">
<a href="https://stackoverflow.co/teams/integrations/slack" class="mr-auto wmx4 d-block">
<div class="fs-subheading fc-white d-block ta-center mb8 mr96">
<svg aria-hidden="true" class="native mr6 w24 h24 svg-icon iconSlack" width="18" height="18" viewBox="0 0 18 18"><path d="M6.5 16A1.5 1.5 0 0 1 5 14.5v-4a1.5 1.5 0 1 1 3 0v4c0 .83-.67 1.5-1.5 1.5Zm-4-4a1.5 1.5 0 0 1 0-3H4v1.5c0 .83-.67 1.5-1.5 1.5Z" fill="#E01E5A"/><path d="M2.5 5h4a1.5 1.5 0 1 1 0 3h-4a1.5 1.5 0 1 1 0-3Zm4-4C7.33 1 8 1.67 8 2.5V4H6.5a1.5 1.5 0 1 1 0-3Z" fill="#36C5F0"/><path d="M10.5 9h4a1.5 1.5 0 0 1 0 3h-4a1.5 1.5 0 0 1 0-3Zm0 7A1.5 1.5 0 0 1 9 14.5V13h1.5a1.5 1.5 0 0 1 0 3Z" fill="#ECB22E"/><path d="M10.5 1c.83 0 1.5.67 1.5 1.5v4a1.5 1.5 0 0 1-3 0v-4c0-.83.67-1.5 1.5-1.5Zm4 4a1.5 1.5 0 0 1 0 3H13V6.5c0-.83.67-1.5 1.5-1.5Z" fill="#2EB67D"/></svg>
Slack
</div>
<img width="421" height="465" class="js-lazy-load wmx100 h-auto d-block" data-src="https://cdn.sstatic.net/Img/home/illo-integrations-right.png?v=90c26b9154c7" alt="" />
<noscript>
<img width="421" height="465" class="wmx100 h-auto d-block" src="https://cdn.sstatic.net/Img/home/illo-integrations-right.png?v=90c26b9154c7" alt="">
</noscript>
</a>
</div>
</div>
<div class="fc-black-200 fs-subheading mt32 pb32 ta-center">
Some of the premium features available with paid tiers
</div>
</div>
<span aria-hidden="true" class="p-bits fc-gold t0 l0 w128 h128 z-base"></span>
<span aria-hidden="true" class="p-bits fc-orange-400 t128 r0 w64 h64"></span>
<span aria-hidden="true" class="p-bits sm:d-none fc-green-400 b128 r0 w128 h128"></span>
<span aria-hidden="true" class="p-bits sm:d-none fc-blue-500 b64 l128 w64 h64"></span>
</section>
<section class="js-io-animation p-io-animation d-flex flex__allitems3 ff-row-wrap jc-center ta-center fs-body3 wmx10 mx-auto mtn96 ps-relative z-selected px24 sm:pl0 sm:pr0">
<div data-animation-type="show" class="flex--item mb24 wmn2">
<div class="m12 h100 bs-sm ba bc-black-150 bg-black-100 d:bg-black-075 bar-lg p24 sm:pr6 sm:pl6 pb0">
<svg aria-hidden="true" class="p-fc-purple d:fc-orange-400 d-block mx-auto mb12 svg-spot spotKey" width="48" height="48" viewBox="0 0 48 48"><path opacity=".2" d="m43.05 15.18-22.29 9.35a9.1 9.1 0 0 0-10.87-3 9 9 0 0 0-4.82 11.79 9 9 0 0 0 17.17-5.2l12.28-5.22 1.5 3.57c.2.47.7.68 1.18.48l1.65-.7c.46-.19.67-.7.48-1.16l-1.5-3.58 1.92-.8 2.08 4.94c.2.47.7.68 1.17.48l1.65-.69c.47-.2.68-.7.48-1.17l-2.06-4.9 1.45-.6c.47-.2.67-.7.48-1.18l-.81-1.92a.85.85 0 0 0-1.14-.5ZM15.36 34.86a5.33 5.33 0 1 1-4.14-9.84 5.33 5.33 0 0 1 4.14 9.84Z"/><path d="M6.82 30.54a5.5 5.5 0 1 0 10.14-4.26 5.5 5.5 0 0 0-10.14 4.26Zm3.72-5.36a3.5 3.5 0 1 1 2.7 6.45 3.5 3.5 0 0 1-2.7-6.45Zm8.74-3.38a10.2 10.2 0 0 0-11.26-2.25 10.06 10.06 0 0 0-5.46 13.14 10.06 10.06 0 0 0 13.2 5.3 10.18 10.18 0 0 0 6.04-10.7l9.66-3.99 1.17 2.78a2 2 0 0 0 2.61 1.07l1.85-.78a2 2 0 0 0 1.07-2.62l-1.2-2.86.63-.27L39.01 24a2 2 0 0 0 2.62 1.07l1.85-.78a2 2 0 0 0 1.07-2.61l-1.47-3.5c.9-.74 1.25-2.02.77-3.15l-.19-.46a2.78 2.78 0 0 0-3.63-1.48l-20.75 8.7Zm-1.12 1.74a1 1 0 0 0 1.23.38l21.41-8.99c.4-.16.85.02 1.02.42l.19.45a.73.73 0 0 1-.37.95 1 1 0 0 0-.75 1.37l1.81 4.33-1.84.77L39.08 19a1 1 0 0 0-.49-.52 1 1 0 0 0-.91-.07l-2.41 1.01a1 1 0 0 0-.55 1.28l.05.14 1.54 3.69-1.84.77-1.55-3.69a1 1 0 0 0-1.3-.53h-.01l-11.3 4.65a1 1 0 0 0-.6 1.16l.02.14A8.2 8.2 0 0 1 15 36.14a8.06 8.06 0 0 1-10.58-4.23A8.06 8.06 0 0 1 8.8 21.4a8.18 8.18 0 0 1 9.36 2.15Z"/></svg>
Robust read and write API
</div>
</div>
<div data-animation-type="show" class="flex--item mb24 wmn2">
<div class="m12 h100 bs-sm ba bc-black-150 bg-black-100 d:bg-black-075 bar-lg p24 sm:pr6 sm:pl6 pb0">
<svg aria-hidden="true" class="p-fc-purple d:fc-orange-400 d-block mx-auto mb12 svg-spot spotLock" width="48" height="48" viewBox="0 0 48 48"><path opacity=".2" d="M12 22a2 2 0 0 0-2 2v19a4 4 0 0 0 4 4h24a4 4 0 0 0 4-4V26a4 4 0 0 0-4-4H12Zm6 7a5 5 0 1 1 7.67 4.23l.05.35c.15.84.36 1.8.61 2.86A2.06 2.06 0 0 1 24.35 39h-2.7a2.06 2.06 0 0 1-1.98-2.56c.29-1.2.52-2.3.66-3.2l-.19-.14A5 5 0 0 1 18 29Z"/><path d="M23 24a5 5 0 0 0-2.86 9.1l.2.13c-.15.91-.38 2-.67 3.21A2.06 2.06 0 0 0 21.65 39h2.7c1.32 0 2.3-1.26 1.98-2.56a46.74 46.74 0 0 1-.6-2.86l-.06-.35A5 5 0 0 0 23 24Zm0 2a3 3 0 0 1 1.76 5.43l-.16.11a2 2 0 0 0-.91 2c.16.98.4 2.12.7 3.37.01.05-.02.09-.04.09h-2.7c-.02 0-.05-.04-.04-.09.3-1.25.54-2.4.7-3.36a2 2 0 0 0-.78-1.92l-.13-.09A3 3 0 0 1 23 26ZM12 12.44V18H9a3 3 0 0 0-3 3v21a3 3 0 0 0 3 3h28a3 3 0 0 0 3-3V21a3 3 0 0 0-3-3h-3v-5.56C34 6.2 29.36 1 23 1S12 6.19 12 12.44ZM23 3c5.14 0 9 4.18 9 9.44V18H14v-5.56C14 7.18 17.86 3 23 3ZM9 20h28a1 1 0 0 1 1 1v21a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V21a1 1 0 0 1 1-1Z"/></svg>
Single sign-on with AD or SAML
</div>
</div>
<div data-animation-type="show" class="flex--item mb24 wmn2">
<div class="m12 h100 bs-sm ba bc-black-150 bg-black-100 d:bg-black-075 bar-lg p24 sm:pr6 sm:pl6 pb0">
<svg aria-hidden="true" class="p-fc-purple d:fc-orange-400 d-block mx-auto mb12 svg-spot spotPeople" width="48" height="48" viewBox="0 0 48 48"><path d="M13.5 28a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9ZM7 30a1 1 0 0 1 1-1h11a1 1 0 0 1 1 1v5h11v-5a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v10a2 2 0 0 1-2 2H33v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5H8a1 1 0 0 1-1-1V30Zm25-6.5a4.5 4.5 0 1 0 9 0 4.5 4.5 0 0 0-9 0ZM24.5 34a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z" opacity=".2"/><path d="M16.4 26.08A6 6 0 1 0 7.53 26C5.64 26.06 4 27.52 4 29.45V40a1 1 0 0 0 1 1h9a1 1 0 1 0 0-2h-4v-7a1 1 0 1 0-2 0v7H6v-9.55c0-.73.67-1.45 1.64-1.45H16a1 1 0 0 0 .4-1.92ZM12 18a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm16.47 14a6 6 0 1 0-8.94 0A3.6 3.6 0 0 0 16 35.5V46a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V35.5c0-1.94-1.64-3.42-3.53-3.5ZM20 28a4 4 0 1 1 8 0 4 4 0 0 1-8 0Zm-.3 6h8.6c1 0 1.7.75 1.7 1.5V45h-2v-7a1 1 0 1 0-2 0v7h-4v-7a1 1 0 1 0-2 0v7h-2v-9.5c0-.75.7-1.5 1.7-1.5ZM42 22c0 1.54-.58 2.94-1.53 4A3.5 3.5 0 0 1 44 29.45V40a1 1 0 0 1-1 1h-9a1 1 0 1 1 0-2h4v-7a1 1 0 1 1 2 0v7h2v-9.55A1.5 1.5 0 0 0 40.48 28H32a1 1 0 0 1-.4-1.92A6 6 0 1 1 42 22Zm-2 0a4 4 0 1 0-8 0 4 4 0 0 0 8 0Z"/><g opacity=".35"><path d="M17 10a1 1 0 011-1h12a1 1 0 110 2H18a1 1 0 01-1-1Zm1-5a1 1 0 100 2h12a1 1 0 100-2H18ZM14 1a1 1 0 00-1 1v12a1 1 0 001 1h5.09l4.2 4.2a1 1 0 001.46-.04l3.7-4.16H34a1 1 0 001-1V2a1 1 0 00-1-1H14Zm1 12V3h18v10h-5a1 1 0 00-.75.34l-3.3 3.7-3.74-3.75a1 1 0 00-.71-.29H15Z"/></g></svg>
Your own customer success representative
</div>
</div>
<div data-animation-type="show" class="flex--item mb24 wmn2">
<div class="m12 h100 bs-sm ba bc-black-150 bg-black-100 d:bg-black-075 bar-lg p24 sm:pr6 sm:pl6 pb0">
<svg aria-hidden="true" class="p-fc-purple d:fc-orange-400 d-block mx-auto mb12 svg-spot spotHeadset" width="48" height="48" viewBox="0 0 48 48"><path d="M33.8 7.06a19.9 19.9 0 0 0-8.42-2.4 19.57 19.57 0 0 0-8.57 1.62c-.2.14-.25.37-.12.6l2.25 3.97c.12.19.4.34.65.34a.7.7 0 0 0 .17-.03c.53-.12 3.52-.8 5.4-.72 1.9.09 4.89 1.07 5.32 1.22l.11.03c.23.03.52-.05.66-.28l2.61-3.74c.14-.22.12-.46-.07-.61ZM8 39.52c0 2.24 1.8 4.06 4 4.06 1.11 0 2.04-.93 2.04-2v-9.53c0-1.12-.93-2.05-2.03-2.05A4.04 4.04 0 0 0 8 34.06v5.46Zm32.03 4.06c2.2 0 4-1.82 4-4.06v-5.46c0-2.24-1.8-4.06-4-4.06-1.1 0-2.03.93-2.03 2.05v9.52c0 1.08.92 2 2.03 2ZM23 48h4a2 2 0 0 0 0-4h-4a2 2 0 0 0 0 4Z" opacity=".2"/><path d="M13.66 5.54C8.04 8.6 4 14.24 4 21v12h1v-1.11A4.94 4.94 0 0 1 9.98 27 3 3 0 0 1 13 29.97v9.1A3 3 0 0 1 9.98 42a4.97 4.97 0 0 1-4.9-4H3.33C1.93 38 1 36.77 1 35.5c0-.8.37-1.59 1-2.06V21C2 9.34 12.57 1 23.5 1S45 9.34 45 21v11.44c.63.47 1 1.26 1 2.06 0 1.27-.94 2.5-2.33 2.5H42v.11a4.89 4.89 0 0 1-3.07 4.52A1 1 0 0 1 39 42a2.88 2.88 0 0 1-3 3h-8.17A3 3 0 0 1 25 47h-4a3 3 0 0 1 0-6h4a3 3 0 0 1 2.83 2H36c.46 0 .66-.16.78-.3.14-.2.22-.46.22-.7a3 3 0 0 1-3-2.92v-9.11A3 3 0 0 1 37.02 27 4.94 4.94 0 0 1 42 31.89V32h1V21c0-6.51-3.75-11.97-9.04-15.1a1 1 0 0 1-.03.05l-1.16 1.68c2.42 1.57 4.44 3.1 5.87 5.16C40.22 15.1 41 17.93 41 22a1 1 0 1 1-2 0c0-3.8-.72-6.2-2.01-8.07-1.2-1.74-2.96-3.1-5.36-4.66l-.71 1.04a1 1 0 0 1-1.17.37c-1.83-.68-3.7-.94-5.82-.94-2.1 0-4 .3-5.84.94a1 1 0 0 1-1.15-.38l-.98-1.41c-2.7 1.73-4.65 3.16-5.95 5.04C8.72 15.8 8 18.2 8 22a1 1 0 1 1-2 0c0-4.07.78-6.91 2.36-9.2 1.54-2.23 3.78-3.84 6.47-5.56l-1.15-1.67a1 1 0 0 1-.02-.03Zm1.82-.89 2.68 3.9a19.7 19.7 0 0 1 5.77-.81c2.03 0 3.91.22 5.77.8l2.49-3.59A20.53 20.53 0 0 0 23.5 3c-2.79 0-5.52.59-8.02 1.65ZM25 43h-4a1 1 0 0 0 0 2h4a1 1 0 0 0 0-2ZM7 31.89v5.22A2.94 2.94 0 0 0 9.98 40c.59 0 1.02-.48 1.02-.92v-9.11A1 1 0 0 0 9.98 29 2.94 2.94 0 0 0 7 31.89ZM5 35H3.33c-.05 0-.12.02-.2.1a.6.6 0 0 0-.13.4c0 .17.06.31.14.4.07.08.14.1.2.1H5v-1Zm35-3.11A2.94 2.94 0 0 0 37.02 29a1 1 0 0 0-1.02.97v9.1c0 .45.43.93 1.02.93A2.94 2.94 0 0 0 40 37.11V31.9ZM42 35h1.67c.05 0 .12-.02.2-.1a.6.6 0 0 0 .13-.4.6.6 0 0 0-.14-.4c-.07-.08-.14-.1-.2-.1H42v1Z"/></svg>
99.5% uptime SLA and priority support
</div>
</div>
</section>
<section class="d-flex flex__allitems3 jc-center sm:ta-center ff-row-wrap p-wrapper mx-auto pt64 pb128">
<div class="flex--item wmn3 sm:mb32 p24 sm:p8">
<svg aria-hidden="true" class="fc-blue-500 mb16 svg-spot spotQuote" width="48" height="48" viewBox="0 0 48 48"><path d="M5.01 14.71a5.64 5.64 0 0 1 5.62-5.65h8.75c3.1 0 5.62 2.53 5.62 5.65v19.8l-4.94 8.01a1 1 0 0 1-.85.48h-4.03a1 1 0 0 1-.86-1.5l4.04-6.99h-7.73a5.64 5.64 0 0 1-5.62-5.65V14.7Zm22.99 0a5.61 5.61 0 0 1 5.6-5.65h7.72c3.1 0 5.63 2.53 5.63 5.65v19.8L43 42.45a1 1 0 0 1-.9.55h-4.02a1 1 0 0 1-.88-1.47l3.77-7.02h-7.38A5.61 5.61 0 0 1 28 28.86V14.7Z" opacity=".2"/><path d="M1 11.66A6.64 6.64 0 0 1 7.62 5h8.79a6.64 6.64 0 0 1 6.62 6.66v19.29a2.8 2.8 0 0 1-.42 1.47l-4.47 7.25A2.8 2.8 0 0 1 15.75 41h-2.09a2.8 2.8 0 0 1-2.39-4.27l1.54-2.5a.8.8 0 0 0-.68-1.23h-4.5c-1.9 0-3.57-.94-4.73-2.27A7.59 7.59 0 0 1 1 25.8V11.66ZM7.62 7A4.64 4.64 0 0 0 3 11.66V25.8c0 1.3.53 2.62 1.4 3.61A4.34 4.34 0 0 0 7.62 31h4.5a2.8 2.8 0 0 1 2.4 4.27l-1.54 2.5a.8.8 0 0 0 .68 1.23h2.1a.8.8 0 0 0 .68-.38l4.47-7.25a.8.8 0 0 0 .12-.42v-19.3A4.64 4.64 0 0 0 16.41 7H7.62ZM24 11.66A6.64 6.64 0 0 1 30.63 5h7.75A6.64 6.64 0 0 1 45 11.66V31.5c0 .5-.14 1-.4 1.44l-3.96 6.69A2.8 2.8 0 0 1 38.22 41h-2.07a2.8 2.8 0 0 1-2.39-4.27l1.54-2.5a.8.8 0 0 0-.68-1.23h-4c-1.9 0-3.55-.94-4.72-2.27A7.59 7.59 0 0 1 24 25.8V11.66ZM30.63 7A4.64 4.64 0 0 0 26 11.66V25.8c0 1.3.53 2.62 1.4 3.61A4.34 4.34 0 0 0 30.63 31h3.99A2.8 2.8 0 0 1 37 35.27l-1.54 2.5a.8.8 0 0 0 .68 1.23h2.07a.8.8 0 0 0 .7-.4l3.97-6.68a.8.8 0 0 0 .11-.42V11.66A4.64 4.64 0 0 0 38.38 7h-7.76Z"/></svg>
<p class="fs-body3 lh-md fc-black-600 mb32">Stack Overflow for Teams has been a resource for our entire company. Not only for developers to solve problems, it’s also enabled our sales field to answer technical questions that help them close deals.</p>
<div class="fs-body3 fc-black-700">
<strong class="bt bc-black-075 pt16 d-inline-block p-ff-source-bold">Director of Product Management</strong><br>
Microsoft
</div>
</div>
<div class="flex--item wmn3 sm:mb32 p24 sm:p8">
<svg aria-hidden="true" class="fc-blue-500 mb16 svg-spot spotQuote" width="48" height="48" viewBox="0 0 48 48"><path d="M5.01 14.71a5.64 5.64 0 0 1 5.62-5.65h8.75c3.1 0 5.62 2.53 5.62 5.65v19.8l-4.94 8.01a1 1 0 0 1-.85.48h-4.03a1 1 0 0 1-.86-1.5l4.04-6.99h-7.73a5.64 5.64 0 0 1-5.62-5.65V14.7Zm22.99 0a5.61 5.61 0 0 1 5.6-5.65h7.72c3.1 0 5.63 2.53 5.63 5.65v19.8L43 42.45a1 1 0 0 1-.9.55h-4.02a1 1 0 0 1-.88-1.47l3.77-7.02h-7.38A5.61 5.61 0 0 1 28 28.86V14.7Z" opacity=".2"/><path d="M1 11.66A6.64 6.64 0 0 1 7.62 5h8.79a6.64 6.64 0 0 1 6.62 6.66v19.29a2.8 2.8 0 0 1-.42 1.47l-4.47 7.25A2.8 2.8 0 0 1 15.75 41h-2.09a2.8 2.8 0 0 1-2.39-4.27l1.54-2.5a.8.8 0 0 0-.68-1.23h-4.5c-1.9 0-3.57-.94-4.73-2.27A7.59 7.59 0 0 1 1 25.8V11.66ZM7.62 7A4.64 4.64 0 0 0 3 11.66V25.8c0 1.3.53 2.62 1.4 3.61A4.34 4.34 0 0 0 7.62 31h4.5a2.8 2.8 0 0 1 2.4 4.27l-1.54 2.5a.8.8 0 0 0 .68 1.23h2.1a.8.8 0 0 0 .68-.38l4.47-7.25a.8.8 0 0 0 .12-.42v-19.3A4.64 4.64 0 0 0 16.41 7H7.62ZM24 11.66A6.64 6.64 0 0 1 30.63 5h7.75A6.64 6.64 0 0 1 45 11.66V31.5c0 .5-.14 1-.4 1.44l-3.96 6.69A2.8 2.8 0 0 1 38.22 41h-2.07a2.8 2.8 0 0 1-2.39-4.27l1.54-2.5a.8.8 0 0 0-.68-1.23h-4c-1.9 0-3.55-.94-4.72-2.27A7.59 7.59 0 0 1 24 25.8V11.66ZM30.63 7A4.64 4.64 0 0 0 26 11.66V25.8c0 1.3.53 2.62 1.4 3.61A4.34 4.34 0 0 0 30.63 31h3.99A2.8 2.8 0 0 1 37 35.27l-1.54 2.5a.8.8 0 0 0 .68 1.23h2.07a.8.8 0 0 0 .7-.4l3.97-6.68a.8.8 0 0 0 .11-.42V11.66A4.64 4.64 0 0 0 38.38 7h-7.76Z"/></svg>
<p class="fs-body3 lh-md fc-black-600 mb32">Engineers should help solve the hardest questions, the unknowns, where being familiar with how the product was built is essential. But we don’t want to keep answering solved problems over and over again. That’s where Stack Overflow for Teams really helps.</p>
<div class="fs-body3 fc-black-700">
<strong class="bt bc-black-075 pt16 d-inline-block p-ff-source-bold">Director of Engineering</strong><br>
Elastic Cloud
</div>
</div>
<div class="flex--item wmn3 sm:mb32 p24 sm:p8">
<svg aria-hidden="true" class="fc-blue-500 mb16 svg-spot spotQuote" width="48" height="48" viewBox="0 0 48 48"><path d="M5.01 14.71a5.64 5.64 0 0 1 5.62-5.65h8.75c3.1 0 5.62 2.53 5.62 5.65v19.8l-4.94 8.01a1 1 0 0 1-.85.48h-4.03a1 1 0 0 1-.86-1.5l4.04-6.99h-7.73a5.64 5.64 0 0 1-5.62-5.65V14.7Zm22.99 0a5.61 5.61 0 0 1 5.6-5.65h7.72c3.1 0 5.63 2.53 5.63 5.65v19.8L43 42.45a1 1 0 0 1-.9.55h-4.02a1 1 0 0 1-.88-1.47l3.77-7.02h-7.38A5.61 5.61 0 0 1 28 28.86V14.7Z" opacity=".2"/><path d="M1 11.66A6.64 6.64 0 0 1 7.62 5h8.79a6.64 6.64 0 0 1 6.62 6.66v19.29a2.8 2.8 0 0 1-.42 1.47l-4.47 7.25A2.8 2.8 0 0 1 15.75 41h-2.09a2.8 2.8 0 0 1-2.39-4.27l1.54-2.5a.8.8 0 0 0-.68-1.23h-4.5c-1.9 0-3.57-.94-4.73-2.27A7.59 7.59 0 0 1 1 25.8V11.66ZM7.62 7A4.64 4.64 0 0 0 3 11.66V25.8c0 1.3.53 2.62 1.4 3.61A4.34 4.34 0 0 0 7.62 31h4.5a2.8 2.8 0 0 1 2.4 4.27l-1.54 2.5a.8.8 0 0 0 .68 1.23h2.1a.8.8 0 0 0 .68-.38l4.47-7.25a.8.8 0 0 0 .12-.42v-19.3A4.64 4.64 0 0 0 16.41 7H7.62ZM24 11.66A6.64 6.64 0 0 1 30.63 5h7.75A6.64 6.64 0 0 1 45 11.66V31.5c0 .5-.14 1-.4 1.44l-3.96 6.69A2.8 2.8 0 0 1 38.22 41h-2.07a2.8 2.8 0 0 1-2.39-4.27l1.54-2.5a.8.8 0 0 0-.68-1.23h-4c-1.9 0-3.55-.94-4.72-2.27A7.59 7.59 0 0 1 24 25.8V11.66ZM30.63 7A4.64 4.64 0 0 0 26 11.66V25.8c0 1.3.53 2.62 1.4 3.61A4.34 4.34 0 0 0 30.63 31h3.99A2.8 2.8 0 0 1 37 35.27l-1.54 2.5a.8.8 0 0 0 .68 1.23h2.07a.8.8 0 0 0 .7-.4l3.97-6.68a.8.8 0 0 0 .11-.42V11.66A4.64 4.64 0 0 0 38.38 7h-7.76Z"/></svg>
<p class="fs-body3 lh-md fc-black-600 mb32">As we started to use [Stack Overflow for Teams] and saw how nice it was to have a repository of information, we started to see it spread to other teams. Our customer support team started using it, our people success team started using it, next thing we knew, we had [Slack] integrations all over the place.</p>
<div class="fs-body3 fc-black-700">
<strong class="bt bc-black-075 pt16 d-inline-block p-ff-source-bold">Engineering</strong><br>
Expensify
</div>
</div>
<div class="flex--item wmn3 sm:mb32 p24 sm:p8">
<svg aria-hidden="true" class="fc-blue-500 mb16 svg-spot spotQuote" width="48" height="48" viewBox="0 0 48 48"><path d="M5.01 14.71a5.64 5.64 0 0 1 5.62-5.65h8.75c3.1 0 5.62 2.53 5.62 5.65v19.8l-4.94 8.01a1 1 0 0 1-.85.48h-4.03a1 1 0 0 1-.86-1.5l4.04-6.99h-7.73a5.64 5.64 0 0 1-5.62-5.65V14.7Zm22.99 0a5.61 5.61 0 0 1 5.6-5.65h7.72c3.1 0 5.63 2.53 5.63 5.65v19.8L43 42.45a1 1 0 0 1-.9.55h-4.02a1 1 0 0 1-.88-1.47l3.77-7.02h-7.38A5.61 5.61 0 0 1 28 28.86V14.7Z" opacity=".2"/><path d="M1 11.66A6.64 6.64 0 0 1 7.62 5h8.79a6.64 6.64 0 0 1 6.62 6.66v19.29a2.8 2.8 0 0 1-.42 1.47l-4.47 7.25A2.8 2.8 0 0 1 15.75 41h-2.09a2.8 2.8 0 0 1-2.39-4.27l1.54-2.5a.8.8 0 0 0-.68-1.23h-4.5c-1.9 0-3.57-.94-4.73-2.27A7.59 7.59 0 0 1 1 25.8V11.66ZM7.62 7A4.64 4.64 0 0 0 3 11.66V25.8c0 1.3.53 2.62 1.4 3.61A4.34 4.34 0 0 0 7.62 31h4.5a2.8 2.8 0 0 1 2.4 4.27l-1.54 2.5a.8.8 0 0 0 .68 1.23h2.1a.8.8 0 0 0 .68-.38l4.47-7.25a.8.8 0 0 0 .12-.42v-19.3A4.64 4.64 0 0 0 16.41 7H7.62ZM24 11.66A6.64 6.64 0 0 1 30.63 5h7.75A6.64 6.64 0 0 1 45 11.66V31.5c0 .5-.14 1-.4 1.44l-3.96 6.69A2.8 2.8 0 0 1 38.22 41h-2.07a2.8 2.8 0 0 1-2.39-4.27l1.54-2.5a.8.8 0 0 0-.68-1.23h-4c-1.9 0-3.55-.94-4.72-2.27A7.59 7.59 0 0 1 24 25.8V11.66ZM30.63 7A4.64 4.64 0 0 0 26 11.66V25.8c0 1.3.53 2.62 1.4 3.61A4.34 4.34 0 0 0 30.63 31h3.99A2.8 2.8 0 0 1 37 35.27l-1.54 2.5a.8.8 0 0 0 .68 1.23h2.07a.8.8 0 0 0 .7-.4l3.97-6.68a.8.8 0 0 0 .11-.42V11.66A4.64 4.64 0 0 0 38.38 7h-7.76Z"/></svg>
<p class="fs-subheading lh-md fc-black-600 mb32">What we love about Stack Overflow for Teams is that it’s a very dynamic tool…there’s just so many ways to use this as a liaison between different teams and different knowledge bases.</p>
<div class="fs-body3 fc-black-700">
<strong class="bt bc-black-075 pt16 d-inline-block p-ff-source-bold">Software Engineer</strong><br>
Box
</div>
</div>
</section>
<section class="p-home-company pb128 ta-center">
<div class="bb bc-black-075 pb32 mb12 d-inline-block"><svg aria-hidden="true" class="native svg-icon iconLogoMd" width="187" height="37" viewBox="0 0 187 37"><path d="m42 23-2.2-.2c-1.7-.1-2.3-.8-2.3-2 0-1.4 1-2.2 3-2.2 1.3-.1 2.6.3 3.6 1.1l1.3-1.3c-1.4-1-3.1-1.5-4.8-1.4-2.9 0-4.9 1.5-4.9 3.9 0 2.2 1.4 3.4 4 3.6l2.2.2c1.6.1 2.2.8 2.2 2 0 1.6-1.4 2.4-3.6 2.4-1.6.1-3.1-.5-4.2-1.6L35 28.8c1.5 1.4 3.5 2 5.5 1.9 3.2 0 5.5-1.5 5.5-4.1 0-2.6-1.6-3.4-4-3.6Zm15.8-6.1c-2.2 0-3.5.4-4.7 1.9l1.3 1.3c.8-1.1 2.1-1.7 3.4-1.5 2.5 0 3.4 1 3.4 2.9v1.3h-4c-3 0-4.6 1.5-4.6 3.9 0 1 .3 2 1 2.7.8.9 1.9 1.2 3.8 1.2 1.4.1 2.9-.4 3.9-1.4v1.3h2v-9.1c-.1-2.9-1.9-4.5-5.5-4.5Zm3.4 8.9c.1.8-.1 1.7-.7 2.3a4 4 0 0 1-3 .9c-2.1 0-3.1-.7-3.1-2.3 0-1.6 1-2.4 3-2.4h3.8v1.5Zm9.7-7.1c1.2 0 2.4.5 3.1 1.5l1.3-1.3a5.4 5.4 0 0 0-4.4-2c-3.4 0-5.9 2.3-5.9 6.9 0 4.6 2.6 6.9 5.9 6.9 1.7.1 3.3-.7 4.4-2L74 27.4c-.7 1-1.9 1.5-3.1 1.5-1.2.1-2.4-.5-3.1-1.5-.7-1.1-1-2.3-.9-3.6-.1-1.3.2-2.5.9-3.6.7-1 1.9-1.6 3.1-1.5Zm16.8-1.6h-2.4L79.2 23V11.1h-2v19.4h2v-4.9l2.4-2.4 4.5 7.3h2.4l-5.6-8.6 4.8-4.8Zm9.2-.16c-1.6-.1-3.2.5-4.3 1.7-1.3 1.3-1.6 2.9-1.6 5.4 0 2.5.3 4.1 1.6 5.4 1.1 1.1 2.7 1.7 4.3 1.7 1.6.1 3.2-.5 4.3-1.7 1.3-1.3 1.6-2.9 1.6-5.4 0-2.5-.3-4.1-1.6-5.4a5.38 5.38 0 0 0-4.3-1.7Zm1.7 10.5c-.9.8-2.3.8-3.2 0-.7-.7-.8-2-.8-3.4s.1-2.7.8-3.4c.9-.8 2.3-.8 3.2 0 .7.7.8 1.9.8 3.4s-.1 2.7-.8 3.4Zm13.6-10.4-2.8 8.6-2.8-8.6h-3.7l5.2 14h2.7l5.1-14h-3.7Zm9.6-.1c-3.6 0-6.1 2.6-6.1 7.1 0 5.7 3.2 7.2 6.5 7.2 2 .1 4-.7 5.3-2.2l-2.1-2.1c-.8.9-2 1.4-3.2 1.3-1.6.1-3-1.1-3.1-2.7v-.4h8.7v-1.6c.1-3.8-2.1-6.6-6-6.6Zm-2.7 5.8c0-.5.1-1 .3-1.5.4-.9 1.3-1.4 2.3-1.4 1-.1 1.9.5 2.3 1.4.2.5.3 1 .3 1.5h-5.2Zm13.33-4.3v-1.3h-3.4v14h3.5v-8.4c-.1-1.3.8-2.4 2.1-2.6h.2c.7 0 1.4.3 1.8.8l2.6-2.6a4.1 4.1 0 0 0-3.3-1.3c-1.3-.1-2.6.4-3.5 1.4Zm7.6-2.8v15.4h3.5v-11h2.6v-2.7h-2.6v-1.5c-.1-.6.3-1.2.9-1.3h1.6v-3h-2a3.9 3.9 0 0 0-4 3.8v.3Zm20.27 1.3c-1.6-.1-3.2.5-4.3 1.7-1.3 1.3-1.6 2.9-1.6 5.4 0 2.5.3 4.1 1.6 5.4 1.1 1.1 2.7 1.7 4.3 1.7 1.6.1 3.2-.5 4.3-1.7 1.3-1.3 1.6-2.9 1.6-5.4 0-2.5-.3-4.1-1.6-5.4a5.38 5.38 0 0 0-4.3-1.7Zm1.7 10.5c-.9.8-2.3.8-3.2 0-.7-.7-.8-2-.8-3.4s.1-2.7.8-3.4c.9-.8 2.3-.8 3.2 0 .7.7.8 1.9.8 3.4s-.1 2.7-.8 3.4Zm20.7-10.4-2.3 8.6-2.9-8.6H175l-2.8 8.7-2.3-8.6h-3.7l4.3 14h2.9l2.9-8.8 2.9 8.8h3l4.3-14-3.8-.1Zm-31.22 9.8v-15.2h-3.5v15.4a3.8 3.8 0 0 0 3.6 4h2.5v-3h-1.3c-.6.1-1.1-.2-1.3-.8v-.4ZM52.7 17.4H49V13h-2v13.9c0 2 1.1 3.6 3.4 3.6h1.4v-1.7h-1c-1.3 0-1.8-.7-1.8-2v-7.7h1.9l1.8-1.7Z" fill="var(--black-800)"/><path d="M26 33v-9h4v13H0V24h4v9h22Z" fill="#BCBBBB"/><path d="m23.1 25.99.68-2.95-16.1-3.35L7 23l16.1 2.99ZM9.1 15.2l15 7 1.4-3-15-7-1.4 3Zm4.2-7.4L26 18.4l2.1-2.5L15.4 5.3l-2.1 2.5ZM21.5 0l-2.7 2 9.9 13.3 2.7-2L21.5 0ZM7 30h16v-3H7v3Z" fill="#F48024"/></svg></div>
<h2 class="fs-headline1 pt24 px24 p-ff-roboto-slab mb0 wmx7 mx-auto bar-lg">Additional products that reach and engage developers & technologists…</h2>
<div class="d-flex flex__allitems6 gs32 m32 ff-row-wrap jc-center wmx8 mx-auto">
<a href="https://stackoverflow.co/advertising" class="flex--item wmn3 bg-white bar-lg bs-sm h:bs-md py32 px24 fc-black-500 h:fc-black-750" data-ga="["home page","body cta","learn more - advertising",null,null]">
<svg aria-hidden="true" class="native mx-auto mb24 svg-icon iconLogoAdvertisingAlt" width="158" height="30" viewBox="0 0 158 30"><path d="M21 27v-8h3v11H0V19h3v8h18Z" fill="#BCBBBB"/><path d="m5.4 19.1 13.56 1.96.17-2.38-13.26-2.55-.47 2.97Zm1.8-6.8 12 5.6 1.1-2.4-12-5.6-1.1 2.4Zm3.4-5.9 10.2 8.5 1.7-2-10.2-8.5-1.7 2ZM17.1.2 15 1.8l7.9 10.6 2.1-1.6L17.1.2ZM5 25h14v-3H5v3Z" fill="#F48024"/><path fill="#D6D9DC" d="M38 11h1v13h-1z"/><path d="M57.9 11.31a.37.37 0 0 0-.35-.27h-1.47a.37.37 0 0 0-.35.27l-4.47 12.14a.38.38 0 0 0 .04.35c.07.12.19.15.3.15h1.99c.15 0 .3-.11.35-.27l.74-2.17h4.23l.74 2.17c.04.16.2.27.35.27h1.98c.12 0 .23-.07.31-.15a.38.38 0 0 0 .04-.35L57.9 11.31Zm.23 7.87H55.5l1.36-3.8 1.28 3.8Zm13.83-5.54c-.2-.5-.5-.93-.9-1.36a4.68 4.68 0 0 0-3.41-1.24h-4.28c-.23 0-.38.15-.38.39v12.14c0 .23.15.38.38.38h4.28c1.44 0 2.6-.42 3.42-1.24.39-.38.7-.85.9-1.4.19-.5.3-1 .38-1.54.04-.5.08-1.09.08-1.75v-1.24a7.27 7.27 0 0 0-.47-3.14Zm-2.17 3.8c0 1-.04 1.82-.12 2.33-.08.46-.2.81-.43 1.08-.43.47-1 .7-1.79.7H65.6v-8.07h1.86c.78 0 1.36.24 1.8.7.15.16.26.39.34.66.08.31.16.62.16.97.04.39.04.93.04 1.63Zm13.14-6.4H81c-.15 0-.3.12-.39.27l-2.44 7.68-2.41-7.68c-.04-.15-.2-.27-.4-.27h-1.9c-.11 0-.23.08-.3.15-.09.08-.09.24-.05.35l4 12.14c.04.16.2.27.4.27h1.43c.16 0 .31-.11.35-.27l4.04-12.14c.04-.11 0-.23-.04-.35-.11-.07-.23-.15-.35-.15Zm10.25 0h-7.77c-.23 0-.39.15-.39.39v12.14c0 .23.16.38.39.38h7.77c.23 0 .39-.15.39-.38V21.9a.37.37 0 0 0-.39-.39h-5.56v-2.87h4.67c.23 0 .39-.15.39-.39v-1.63c0-.23-.16-.38-.4-.38h-4.66v-2.76h5.56c.23 0 .39-.15.39-.39v-1.66a.4.4 0 0 0-.39-.4Zm8.84 7.41a3.56 3.56 0 0 0 2.25-3.45 3.66 3.66 0 0 0-1.98-3.41 4.4 4.4 0 0 0-2.18-.51h-4.74c-.23 0-.39.15-.39.39V23.6c0 .23.16.38.4.38h1.86c.23 0 .39-.15.39-.38v-4.74h1.67l2.44 4.9c.08.1.2.22.35.22h2.14c.12 0 .27-.07.35-.19a.35.35 0 0 0 0-.39l-2.56-4.96Zm-.35-3.46c0 .47-.16.82-.43 1.1-.31.26-.7.42-1.24.42h-2.34v-3.03H100c.54 0 .93.12 1.24.43.27.23.43.62.43 1.08Zm12.16-3.95h-8.54c-.24 0-.4.15-.4.39v1.66c0 .24.16.4.4.4h2.95v10.08c0 .23.15.38.39.38h1.82c.24 0 .4-.15.4-.38V13.48h2.95c.23 0 .38-.15.38-.39v-1.66c.04-.2-.15-.4-.35-.4Zm4.47 0h-1.87c-.23 0-.39.15-.39.39v12.14c0 .23.16.38.39.38h1.86c.24 0 .4-.15.4-.38V11.43a.4.4 0 0 0-.4-.4Zm10.3 6.28a2.96 2.96 0 0 0-1.01-.62 6 6 0 0 0-1.44-.35l-1.4-.2a2.36 2.36 0 0 1-.7-.19c-.2-.07-.39-.19-.46-.27-.24-.2-.31-.46-.31-.85 0-.31.07-.54.19-.78.16-.23.35-.38.58-.5.28-.12.63-.2 1.01-.2.35 0 .66.04.94.08.27.04.5.16.77.28.24.11.47.27.7.5.16.15.4.15.55 0l1.2-1.16c.08-.08.12-.2.12-.28a.36.36 0 0 0-.12-.27 5.42 5.42 0 0 0-1.79-1.12 6.54 6.54 0 0 0-2.25-.35c-.9 0-1.67.15-2.33.46a3.63 3.63 0 0 0-2.1 3.46c0 1.08.35 1.97 1.01 2.6.62.58 1.44.93 2.53 1.08l1.43.2c.31.03.59.11.74.15.16.04.27.12.4.27.22.2.34.54.34.97 0 .47-.16.82-.5 1.05-.4.27-.94.43-1.64.43a4.56 4.56 0 0 1-2.02-.47 3.79 3.79 0 0 1-.81-.62.35.35 0 0 0-.28-.12.36.36 0 0 0-.27.12l-1.24 1.2a.35.35 0 0 0-.12.27c0 .12.04.2.12.27a5.52 5.52 0 0 0 2.02 1.32c.74.27 1.6.4 2.56.4a5.7 5.7 0 0 0 3.39-1.06 3.61 3.61 0 0 0 1.35-2.9 3.72 3.72 0 0 0-1.16-2.8Zm5.24-6.28h-1.86c-.23 0-.39.15-.39.39v12.14c0 .23.16.38.39.38h1.86c.24 0 .4-.15.4-.38V11.43a.4.4 0 0 0-.4-.4Zm11.69 0h-1.82c-.24 0-.4.15-.4.39v7.25l-4.89-7.45c-.07-.11-.2-.2-.3-.2h-1.72c-.23 0-.39.16-.39.4v12.14c0 .23.16.38.4.38h1.86c.23 0 .39-.15.39-.38V16.3l4.9 7.45c.07.12.19.2.3.2h1.71c.24 0 .4-.16.4-.4V11.44c-.05-.2-.24-.4-.44-.4Zm11.6 5.58h-4.43c-.23 0-.39.16-.39.4v1.54c0 .24.16.4.39.4h2.21v.3c0 .7-.19 1.24-.5 1.67-.43.5-.97.74-1.67.74a2.1 2.1 0 0 1-1.52-.59 1.37 1.37 0 0 1-.3-.46c-.09-.16-.13-.35-.2-.62l-.12-.97c0-.35-.04-.85-.04-1.51 0-1.17.04-2.02.16-2.49.07-.42.23-.77.5-1.04.2-.2.4-.35.66-.47.28-.12.55-.15.86-.15.39 0 .74.07 1.05.23.3.15.54.35.74.62.19.27.34.62.42 1 .04.2.2.32.4.32h1.86c.11 0 .23-.04.3-.16.09-.07.12-.2.09-.3a4.58 4.58 0 0 0-.82-2.06 4.57 4.57 0 0 0-4-2.02 4.72 4.72 0 0 0-4.2 2.4c-.16.35-.31.74-.39 1.13-.08.39-.11.81-.15 1.24-.04.43-.04 1-.04 1.79 0 .96.04 1.7.08 2.24.03.55.15 1.05.34 1.56.2.5.51.93.9 1.4a5.34 5.34 0 0 0 2.18 1.27c.38.12.85.16 1.28.16a4.7 4.7 0 0 0 3.61-1.52c.43-.46.74-1 .93-1.59.2-.58.28-1.28.28-2.09v-1.86c-.08-.35-.28-.5-.47-.5Z" fill="var(--black-800)"/></svg>
<p class="fs-subheading mb0">Reach the world’s largest audience of developers and technologists</p>
</a>
<a href="https://stackoverflow.co/collectives" class="flex--item wmn3 bg-white bar-lg bs-sm h:bs-md py32 px24 fc-black-500 h:fc-black-750" data-ga="["home page","body cta","learn more - advertising",null,null]">
<svg aria-hidden="true" class="native mx-auto mb24 svg-icon iconLogoCollectives" width="154" height="30" viewBox="0 0 154 30"><path d="M21 27v-8h3v11H0V19h3v8h18Z" fill="#BCBBBB"/><path d="m5.4 19.1 13.56 1.96.17-2.38-13.26-2.55-.47 2.97Zm1.8-6.8 12 5.6 1.1-2.4-12-5.6-1.1 2.4Zm3.4-5.9 10.2 8.5 1.7-2-10.2-8.5-1.7 2ZM17.1.2 15 1.8l7.9 10.6 2.1-1.6L17.1.2ZM5 25h14v-3H5v3Z" fill="#F48024"/><path fill="#D6D9DC" d="M38 11h1v13h-1z"/><path d="M59.58 19.47h-1.75a.36.36 0 0 0-.36.31c-.08.35-.22.7-.4.96a2 2 0 0 1-.66.61 1.8 1.8 0 0 1-.92.23 1.88 1.88 0 0 1-1.42-.57c-.1-.1-.17-.23-.23-.34a1.83 1.83 0 0 0-.06-.12c-.06-.11-.1-.25-.13-.41l-.06-.2-.1-.96-.02-.52-.02-.98c0-.65 0-1.15.03-1.5 0-.34.04-.65.11-.95a2 2 0 0 1 .19-.62 1.61 1.61 0 0 1 .9-.88c.26-.11.52-.15.81-.15.51 0 .95.15 1.28.46.33.3.55.73.7 1.3.03.2.18.3.36.3h1.79c.11 0 .22-.03.3-.14a.3.3 0 0 0 .07-.31 5 5 0 0 0-1.5-2.95A4.35 4.35 0 0 0 55.57 11a4.7 4.7 0 0 0-1.8.35 3.5 3.5 0 0 0-1.56 1 4.58 4.58 0 0 0-1.06 2.1c-.08.38-.11.8-.15 1.23v1.76c0 .96.04 1.69.07 2.23a4.98 4.98 0 0 0 1.17 2.91 5.05 5.05 0 0 0 2.05 1.27c.36.11.8.15 1.2.15.55 0 1.1-.08 1.57-.27a4.13 4.13 0 0 0 2.34-2.03c.26-.5.44-1.07.55-1.73 0-.11 0-.23-.07-.3-.11-.16-.22-.2-.3-.2Zm10.59-5.71c-.18-.5-.44-.96-.85-1.38a4.5 4.5 0 0 0-3.3-1.38 4.37 4.37 0 0 0-3.97 2.38c-.15.34-.3.73-.37 1.11-.07.38-.1.8-.14 1.23-.04.42-.04 1.03-.04 1.76 0 .96.04 1.69.07 2.22a4.97 4.97 0 0 0 1.18 2.91A4.37 4.37 0 0 0 66.02 24a4.4 4.4 0 0 0 4.15-2.8c.18-.46.26-1 .3-1.53.03-.5.03-1.27.03-2.23s0-1.68-.04-2.22c-.03-.5-.14-1-.3-1.46Zm-2.13 3.72c0 .77 0 1.38-.04 1.84-.03.42-.07.77-.18 1-.08.23-.19.42-.37.61a1.8 1.8 0 0 1-1.43.62 1.9 1.9 0 0 1-1.43-.58c-.15-.15-.26-.3-.3-.46a1.91 1.91 0 0 1-.15-.57l-.1-.96-.02-.58a23.74 23.74 0 0 1 .09-3.37c.07-.43.22-.77.44-1.04.15-.2.37-.34.62-.46.26-.11.55-.15.81-.15.3 0 .55.07.81.15.26.12.48.27.62.46.22.27.37.58.45 1 .14.5.18 1.34.18 2.5Zm6.44 4.06h5.15c.22 0 .37.2.37.4v1.67c0 .23-.15.39-.37.39h-7.26c-.22 0-.37-.16-.37-.39V11.39c0-.23.15-.39.37-.39h1.75c.22 0 .36.16.36.39v10.15Zm14.15 0h-5.15V11.4c0-.23-.14-.39-.36-.39h-1.75c-.22 0-.37.16-.37.39v12.22c0 .23.15.39.37.39h7.26c.22 0 .37-.16.37-.39v-1.68c0-.2-.18-.39-.37-.39ZM91.36 11h7.28c.18 0 .36.16.36.39v1.64c0 .23-.15.39-.36.39h-5.2v2.81h4.36c.22 0 .36.16.36.4v1.63c0 .24-.14.4-.36.4h-4.36v2.88h5.2c.21 0 .36.16.36.4v1.67c0 .23-.15.39-.36.39h-7.28c-.21 0-.36-.16-.36-.39V11.39c0-.23.15-.39.36-.39Zm17.22 8.41h-1.76a.36.36 0 0 0-.36.3c-.08.35-.22.7-.4.96-.2.27-.41.46-.67.62-.25.15-.58.22-.92.22a1.9 1.9 0 0 1-1.43-.57c-.1-.1-.17-.23-.22-.34a2.26 2.26 0 0 1-.2-.53l-.05-.2c-.04-.27-.08-.61-.11-.96 0-.14 0-.31-.02-.51l-.02-.98c0-.65 0-1.14.04-1.49a4.13 4.13 0 0 1 .3-1.57c.06-.15.17-.3.28-.42.19-.19.37-.34.63-.42.25-.11.51-.15.8-.15.52 0 .96.15 1.29.46.33.3.55.73.7 1.3.03.2.18.3.36.3h1.8c.1 0 .22-.03.3-.15.07-.07.1-.19.07-.3a4.98 4.98 0 0 0-1.5-2.95 4.39 4.39 0 0 0-2.94-1.03 4.46 4.46 0 0 0-4 2.37 5.6 5.6 0 0 0-.51 2.33c-.04.42-.04 1.04-.04 1.76 0 .96.04 1.68.07 2.22.04.53.15 1.03.33 1.53.19.5.48.92.85 1.38a5.06 5.06 0 0 0 2.05 1.26c.37.11.8.15 1.21.15.55 0 1.1-.08 1.58-.27a4.1 4.1 0 0 0 2.35-2.03c.25-.5.44-1.06.55-1.71 0-.12 0-.23-.08-.31-.1-.23-.22-.27-.33-.27Zm1.8-8.41h8.28c.19 0 .37.16.34.39v1.68c0 .23-.16.39-.38.39h-2.86V23.6c0 .23-.15.39-.38.39h-1.77c-.22 0-.37-.16-.37-.39V13.46h-2.86c-.23 0-.38-.16-.38-.4V11.4c0-.23.15-.39.38-.39Zm12.25 0h-1.76c-.22 0-.37.16-.37.39v12.22c0 .23.15.39.37.39h1.76c.22 0 .37-.16.37-.39V11.39c0-.23-.15-.39-.37-.39Zm9.58 0h1.9c.1 0 .22.04.34.16.03.11.07.23.03.35l-3.93 12.22a.37.37 0 0 1-.34.27h-1.4c-.2 0-.35-.12-.38-.27l-3.9-12.22c-.04-.12-.04-.28.03-.35.08-.08.2-.16.3-.16h1.86c.2 0 .34.12.38.27l2.35 7.73 2.38-7.73c.08-.15.23-.27.38-.27Zm10.93 0h-7.28c-.22 0-.36.16-.36.39v12.22c0 .23.15.39.36.39h7.28c.22 0 .36-.16.36-.39v-1.68c0-.23-.15-.39-.36-.39h-5.2v-2.89h4.36c.22 0 .36-.15.36-.39v-1.64c0-.23-.14-.39-.36-.39h-4.36v-2.81h5.2c.22 0 .36-.16.36-.39v-1.64c0-.23-.15-.39-.36-.39Zm8.29 5.65c.37.15.7.35.96.62a3.8 3.8 0 0 1 1.11 2.78 3.6 3.6 0 0 1-1.3 2.9 5.22 5.22 0 0 1-3.22 1.04 6.8 6.8 0 0 1-2.44-.38c-.7-.27-1.34-.7-1.93-1.31a.36.36 0 0 1-.11-.27c0-.12.04-.2.11-.27l1.19-1.2a.33.33 0 0 1 .26-.12c.1 0 .18.04.25.12.26.27.52.46.78.62a4.28 4.28 0 0 0 1.93.46 2.6 2.6 0 0 0 1.55-.43c.34-.23.49-.58.49-1.04 0-.43-.12-.77-.34-.97a.63.63 0 0 0-.37-.27l-.07-.02c-.16-.04-.38-.1-.63-.13l-1.37-.2a4.16 4.16 0 0 1-2.41-1.08 3.52 3.52 0 0 1-.96-2.6 4 4 0 0 1 .52-2.04c.33-.58.85-1.09 1.48-1.4.63-.3 1.37-.46 2.22-.46a6 6 0 0 1 2.15.35c.59.23 1.18.62 1.7 1.12.08.08.11.15.11.27 0 .08-.03.2-.1.27l-1.16 1.16a.35.35 0 0 1-.52 0 2.52 2.52 0 0 0-.78-.55 2.1 2.1 0 0 0-.62-.22 5.88 5.88 0 0 0-.9-.08c-.36 0-.7.08-.95.2-.23.11-.41.27-.56.5a1.7 1.7 0 0 0-.19.77c0 .39.08.66.3.85.07.08.26.2.45.27.22.12.44.16.66.2l1.34.2c.55.07 1 .18 1.37.34Z" fill="var(--black-800)"/></svg>
<p class="fs-subheading mb0">Connecting communities with the specific technologies they use the most</p>
</a>
<a href="https://stackoverflow.co/talent" class="flex--item wmn3 bg-white bar-lg bs-sm h:bs-md py32 px24 fc-black-500 h:fc-black-750" data-ga="["home page","body cta","learn more - talent",null,null]">
<svg aria-hidden="true" class="native mx-auto mb24 svg-icon iconLogoTalentAlt" width="115" height="30" viewBox="0 0 115 30"><path d="M21 27v-8h3v11H0V19h3v8h18Z" fill="#BCBBBB"/><path d="m5.4 19.1 13.56 1.96.17-2.38-13.26-2.55-.47 2.97Zm1.8-6.8 12 5.6 1.1-2.4-12-5.6-1.1 2.4Zm3.4-5.9 10.2 8.5 1.7-2-10.2-8.5-1.7 2ZM17.1.2 15 1.8l7.9 10.6 2.1-1.6L17.1.2ZM5 25h14v-3H5v3Z" fill="#F48024"/><path fill="#D6D9DC" d="M38 11h1v13h-1z"/><path d="M60.54 13.09v-1.66c0-.27-.2-.47-.48-.47h-8.58c-.28 0-.48.2-.48.47v1.66c0 .27.2.47.48.47h2.87v9.93c0 .27.2.47.48.47h1.84c.28 0 .48-.2.48-.47v-9.93h2.87c.32 0 .52-.2.52-.47Zm5.99-1.78a.46.46 0 0 0-.44-.31H64.6c-.2 0-.36.12-.44.31L59.7 23.37c-.04.16-.04.31.04.43s.24.2.4.2h1.96c.2 0 .4-.12.43-.32l.72-2.08h4.15l.72 2.08c.08.2.24.32.44.32h1.96a.5.5 0 0 0 .4-.2.42.42 0 0 0 .04-.43l-4.43-12.06Zm-2.4 7.76 1.24-3.42 1.2 3.42h-2.44Zm16.44 2.33h-5.42v-9.93c0-.28-.2-.47-.48-.47h-1.84c-.28 0-.48.2-.48.47v12.06c0 .27.2.47.48.47h7.74c.28 0 .48-.2.48-.47v-1.66c0-.23-.2-.47-.48-.47ZM90.34 11h-7.82c-.28 0-.48.2-.48.47v12.06c0 .27.2.47.48.47h7.82c.28 0 .48-.2.48-.47v-1.66c0-.27-.2-.47-.48-.47h-5.47v-2.68h4.6c.27 0 .47-.2.47-.47v-1.62c0-.27-.2-.47-.48-.47h-4.58v-2.6h5.46c.28 0 .48-.2.48-.47v-1.66c0-.24-.2-.43-.48-.43Zm12.25 0h-1.83c-.28 0-.48.2-.48.47v6.9l-4.8-7.18a.5.5 0 0 0-.4-.2h-1.7c-.29 0-.49.2-.49.48v12.06c0 .27.2.47.48.47h1.84c.28 0 .48-.2.48-.47v-6.9l4.79 7.17c.08.12.24.2.4.2h1.71c.28 0 .48-.2.48-.47V11.47c0-.28-.2-.47-.48-.47Zm11.71 0h-8.58c-.28 0-.48.2-.48.47v1.66c0 .27.2.47.48.47h2.87v9.93c0 .27.2.47.48.47h1.84c.28 0 .48-.2.48-.47V13.6h2.87c.28 0 .48-.2.48-.47v-1.66c.04-.28-.16-.47-.44-.47Z" fill="var(--black-800)"/></svg>
<p class="fs-subheading mb0 wmx3 mx-auto">
Build your employer brand </p>
</a>
</div>
<a href="https://stackoverflow.co/" class="s-btn fs-body2 px32 bar-md bg-orange-500 h:bg-orange-600 fc-white d:fc-black-900 p-ff-source-bold mb2 mx-auto" data-ga="["home page","body cta","about the company",null,null]">About the company</a><br/>
<a href="https://stackoverflow.co/company/work-here" class="s-btn fs-body2 px32 bar-md fc-black-400 h:bg-black-050 h:fc-black-750 p-ff-source">Want to work here? <span class=" fc-blue-500">Current job openings</span></a>
</section>
<section class="bar-lg sm:bar0 bg-blue-900 d:bg-blue-100 fc-white d:fc-black m48 mtn96 md:ml32 md:mr32 sm:ml0 sm:mr0 mb0 pt32 pb96 sm:pl24 sm:pr24 overflow-hidden" style="clip-path:url(#curve); transform: rotate(180deg)">
<div class="d-flex flex__fl-grow1 ta-center jc-center sm:fd-column" style="transform: rotate(-180deg)">
<div class="flex--item ps-relative sm:d-none d-flex">
<div class="js-io-animation p-io-animation ps-relative z-active m-auto ws3 z-active d-flex ai-center jc-center ff-row-wrap l0 r0 t0 b0">
<a href="https://apple.stackexchange.com" data-animation-type="show" class="flex--item m24 w128 h128 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Ask Different" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/apple/Img/apple-touch-icon.png?v=daa7ff1d953e" alt="Ask Different icon">
</a>
<a href="https://unix.stackexchange.com" data-animation-type="show" class="flex--item m24 w64 h64 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Unix & Linux" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/unix/Img/apple-touch-icon.png?v=5cf7fe716a89" alt="Unix & Linux icon">
</a>
<a href="https://ai.stackexchange.com" data-animation-type="show" class="flex--item m24 w64 h64 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Artificial Intelligence" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/ai/Img/apple-touch-icon.png?v=f14d741b295c" alt="Artificial Intelligence icon">
</a>
<a href="https://softwareengineering.stackexchange.com" data-animation-type="show" class="flex--item m24 w64 h64 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Software Engineering" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/softwareengineering/Img/apple-touch-icon.png?v=5e581fc45e58" alt="Software Engineering icon">
</a>
<a href="https://askubuntu.com/" data-animation-type="show" class="flex--item m24 w128 h128 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Ask Ubuntu" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/askubuntu/Img/apple-touch-icon.png?v=e16e1315edd6" alt="Ask Ubuntu icon">
</a>
<a href="https://salesforce.stackexchange.com" data-animation-type="show" class="flex--item m24 w64 h64 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Salesforce" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/salesforce/Img/apple-touch-icon.png?v=4c87c90207b3" alt="Salesforce icon">
</a>
</div>
<img class="w100 h100 d-block us-none pe-none ps-absolute t0 r0 l0 b0 z-base" style="transform: scaleX(-1)" src="https://cdn.sstatic.net/Img/home/illo-se.svg?v=f7e844293cc5" alt="">
</div>
<div class="flex--item wmn5 sm:wmn-initial py64 sm:pt0 px32">
<div class="bb bc-blue-800 pb32 mb32 d-inline-block"><svg aria-hidden="true" class="svg-icon iconLogoSE" width="147" height="35" viewBox="0 0 147 35"><path d="m43.46 30.88-2.86-4.85-1.5 1.76v3.09h-2.05V16.12h2.05v9.1l3.96-4.85h2.49L42 24.5l4 6.38h-2.53ZM32.39 31c-2.3 0-4.54-1.45-4.54-5.39 0-3.93 2.25-5.36 4.54-5.36 1.4 0 2.39.41 3.35 1.47l-1.4 1.4c-.65-.72-1.15-.99-1.95-.99-.79 0-1.45.33-1.9.94-.43.57-.6 1.32-.6 2.54 0 1.23.17 2 .6 2.57.45.6 1.11.93 1.9.93.8 0 1.3-.26 1.95-.99l1.4 1.39A4.14 4.14 0 0 1 32.4 31Zm-8.45-4.77h-2.39c-1.2 0-1.83.56-1.83 1.52 0 .95.59 1.49 1.87 1.49.79 0 1.37-.06 1.91-.6.3-.31.44-.81.44-1.56v-.85Zm.04 4.65v-.96c-.74.77-1.44 1.08-2.7 1.08-1.27 0-2.12-.31-2.74-.95a3.28 3.28 0 0 1-.8-2.26c0-1.76 1.18-3.03 3.51-3.03h2.7v-.74c0-1.33-.65-1.97-2.24-1.97-1.12 0-1.66.27-2.23 1.02l-1.34-1.31c.96-1.16 1.97-1.51 3.65-1.51 2.8 0 4.2 1.22 4.2 3.6v7.03h-2Zm-9 0c-1.92 0-2.8-1.41-2.8-2.93v-5.78H11v-1.61h1.17v-3.2h2.05v3.2h1.97v1.61h-1.97v5.68c0 .77.36 1.22 1.12 1.22h.85v1.8h-1.23ZM5.05 31c-2.15 0-3.7-.52-5.06-1.95l1.45-1.47A4.64 4.64 0 0 0 5.1 29c1.87 0 2.96-.83 2.96-2.26 0-.64-.18-1.18-.56-1.53-.37-.35-.73-.5-1.57-.62l-1.69-.25a4.83 4.83 0 0 1-2.71-1.18 3.73 3.73 0 0 1-1.05-2.82C.48 17.76 2.3 16 5.27 16c1.88 0 3.21.5 4.44 1.68l-1.4 1.4a4.12 4.12 0 0 0-3.1-1.13c-1.7 0-2.62 1-2.62 2.3 0 .54.16 1.01.54 1.36.37.34.95.58 1.61.69l1.63.25c1.33.2 2.07.54 2.67 1.1.79.7 1.17 1.76 1.17 3.02 0 2.71-2.15 4.33-5.15 4.33Z" fill="var(--black-800)"/><path d="M129.55 23.38a1.88 1.88 0 0 0-1.8-1.12c-.92 0-1.52.48-1.81 1.12-.17.39-.23.68-.25 1.15h4.1a2.94 2.94 0 0 0-.24-1.15Zm-3.86 3c0 1.37.85 2.39 2.37 2.39a3 3 0 0 0 2.44-1.02l1.65 1.6a5.16 5.16 0 0 1-4.12 1.69c-2.55 0-5-1.16-5-5.52 0-3.5 1.91-5.49 4.71-5.49 3.02 0 4.72 2.2 4.72 5.14v1.2h-6.77Zm-9.17-3.93c-1.6 0-1.76 1.36-1.76 2.79 0 1.42.16 2.8 1.76 2.8s1.79-1.38 1.79-2.8c0-1.43-.19-2.8-1.79-2.8Zm-.27 12.53c-1.66 0-2.8-.33-3.92-1.4l1.68-1.7c.6.58 1.2.83 2.12.83 1.62 0 2.18-1.14 2.18-2.23v-1.1a3.18 3.18 0 0 1-2.58 1.08 3.6 3.6 0 0 1-2.57-.95c-1.02-1.01-1.1-2.4-1.1-4.27 0-1.88.08-3.25 1.1-4.26.6-.6 1.53-.95 2.6-.95 1.13 0 1.88.31 2.63 1.14v-1.01h2.62v10.36c0 2.58-1.85 4.46-4.76 4.46Zm-8.97-4.07v-6.5c0-1.47-.93-1.96-1.78-1.96s-1.8.5-1.8 1.96v6.5H101V20.16h2.63v.99c.7-.75 1.7-1.12 2.7-1.12a3.5 3.5 0 0 1 2.55.95c.87.87 1.1 1.88 1.1 3.06v6.87h-2.7Zm-11.14-4.54H94c-.98 0-1.52.45-1.52 1.22 0 .74.5 1.24 1.56 1.24.75 0 1.22-.06 1.7-.52.3-.27.4-.7.4-1.36v-.58Zm.06 4.54v-.93c-.73.73-1.41 1.04-2.66 1.04-1.22 0-2.12-.31-2.76-.95-.58-.6-.9-1.47-.9-2.42 0-1.71 1.2-3.12 3.7-3.12h2.56V24c0-1.18-.58-1.7-2.02-1.7-1.04 0-1.51.25-2.07.9l-1.73-1.68c1.06-1.16 2.1-1.49 3.9-1.49 3.04 0 4.62 1.28 4.62 3.8v7.08H96.2Zm-11 0v-6.56c0-1.43-.91-1.9-1.77-1.9-.85 0-1.74.5-1.74 1.9v6.56h-2.7v-14.7h2.7v4.94a3.58 3.58 0 0 1 2.6-1.12c2.36 0 3.6 1.65 3.6 3.93v6.95h-2.7Zm-11.02.13c-2.16 0-4.84-1.16-4.84-5.52 0-4.35 2.68-5.49 4.84-5.49 1.5 0 2.61.46 3.57 1.45l-1.83 1.81c-.56-.6-1.04-.84-1.74-.84-.65 0-1.15.23-1.54.7-.41.52-.6 1.24-.6 2.37 0 1.14.19 1.88.6 2.4.4.47.9.7 1.54.7.7 0 1.18-.25 1.74-.85l1.83 1.8a4.64 4.64 0 0 1-3.57 1.47Zm-8.6-.13L63.6 27.7l-1.98 3.22h-3.24l3.74-5.49-3.59-5.26h3.24l1.83 3.07 1.84-3.07h3.24l-3.59 5.26 3.74 5.5h-3.24Zm-17.58 0v-14.7h9.74v2.56h-6.85v3.45h5.83v2.56H50.9v3.57h6.85v2.56H48Z" fill="#205196"/><path d="M147 3h-15v-.5c0-1.3 1.21-2.5 2.5-2.5h10c1.3 0 2.5 1.2 2.5 2.5V3Z" fill="#8FD8F7"/><path d="M132 12v.5c0 1.3 1.21 2.5 2.5 2.5h6.5v3l3-3h.5c1.3 0 2.5-1.2 2.5-2.5V12h-15Z" fill="#155397"/><path d="M132 8v3h15V8h-15Z" fill="#2D6DB5"/><path d="M132 4v3h15V4h-15Z" fill="#46A2D9"/></svg></div>
<h2 class="fw-normal fs-headline2 lh-sm p-ff-roboto-slab mb24 mx-auto wmx6">Explore technical topics and other disciplines across 170+ Q&A communities</h2>
<p class="fs-subheading fc-blue-050 d:fc-black mb32 wmx6 mx-auto">From <a class="fc-blue-300 d:fc-blue-500 h:fc-blue-200" href="https://serverfault.com/">Server Fault</a> to <a class="fc-blue-300 d:fc-blue-500 h:fc-blue-200" href="https://superuser.com/">Super User</a>, much of the Stack Exchange network continues our mission to empower the world to develop technology through collective knowledge. Other sites on the Stack Exchange network further encourage knowledge sharing across topics such as cooking and medicine.</p>
<a class="s-btn px32 p-bg-yellow d:fc-white h:p-bg-yellow-tint fc-black-900 ws-nowrap p-ff-source-bold fs-body2 bar-md mr12" href="https://stackexchange.com/sites" data-ga="["home page","footer callout cta","explore the network",null,null]">Explore the network</a>
</div>
<div class="flex--item ps-relative sm:d-none d-flex">
<div class="js-io-animation p-io-animation ps-relative z-active m-auto ws3 z-active d-flex ai-center jc-center ff-row-wrap l0 r0 t0 b0">
<a href="https://serverfault.com/" data-animation-type="show" class="flex--item m24 w96 h96 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Server Fault" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/serverfault/Img/apple-touch-icon.png?v=6c3100d858bb" alt="Server Fault icon">
</a>
<a href="https://superuser.com/" data-animation-type="show" class="flex--item m24 w64 h64 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Super User" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/superuser/Img/apple-touch-icon.png?v=0ad5b7a83e49" alt="Super User icon">
</a>
<a href="https://dba.stackexchange.com" data-animation-type="show" class="flex--item m24 w64 h64 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Database Administrators" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/dba/Img/apple-touch-icon.png?v=cdcd5ff7b29e" alt="Database Administrators icon">
</a>
<a href="https://quantumcomputing.stackexchange.com" data-animation-type="show" class="flex--item m24 w128 h128 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Quantum Computing" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/quantumcomputing/Img/apple-touch-icon.png?v=2af3cc2b87e8" alt="Quantum Computing icon">
</a>
<a href="https://gamedev.stackexchange.com" data-animation-type="show" class="flex--item m24 w64 h64 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Game Development" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/gamedev/Img/apple-touch-icon.png?v=0cfb55927bd2" alt="Game Development icon">
</a>
<a href="https://networkengineering.stackexchange.com" data-animation-type="show" class="flex--item m24 w96 h96 bg-white d:bg-black bar-lg bs-sm h:bs-lg h:bg-black-050 d-flex p16" title="Network Engineering" data-controller="s-tooltip">
<img class="d-block wmx100 h-auto m-auto" width="79" height="79" src="https://cdn.sstatic.net/Sites/networkengineering/Img/apple-touch-icon.png?v=d66b1118cec8" alt="Network Engineering icon">
</a>
</div>
<img class="w100 h100 d-block us-none pe-none ps-absolute t0 r0 l0 b0 z-base" src="https://cdn.sstatic.net/Img/home/illo-se.svg?v=f7e844293cc5" alt="">
</div>
</div>
</section>
<section class="py32 ta-center fs-body3 d-flex ai-center jc-center sm:fd-column my32">
<svg aria-hidden="true" class="flex--item svg-spot spotLock" width="48" height="48" viewBox="0 0 48 48"><path opacity=".2" d="M12 22a2 2 0 0 0-2 2v19a4 4 0 0 0 4 4h24a4 4 0 0 0 4-4V26a4 4 0 0 0-4-4H12Zm6 7a5 5 0 1 1 7.67 4.23l.05.35c.15.84.36 1.8.61 2.86A2.06 2.06 0 0 1 24.35 39h-2.7a2.06 2.06 0 0 1-1.98-2.56c.29-1.2.52-2.3.66-3.2l-.19-.14A5 5 0 0 1 18 29Z"/><path d="M23 24a5 5 0 0 0-2.86 9.1l.2.13c-.15.91-.38 2-.67 3.21A2.06 2.06 0 0 0 21.65 39h2.7c1.32 0 2.3-1.26 1.98-2.56a46.74 46.74 0 0 1-.6-2.86l-.06-.35A5 5 0 0 0 23 24Zm0 2a3 3 0 0 1 1.76 5.43l-.16.11a2 2 0 0 0-.91 2c.16.98.4 2.12.7 3.37.01.05-.02.09-.04.09h-2.7c-.02 0-.05-.04-.04-.09.3-1.25.54-2.4.7-3.36a2 2 0 0 0-.78-1.92l-.13-.09A3 3 0 0 1 23 26ZM12 12.44V18H9a3 3 0 0 0-3 3v21a3 3 0 0 0 3 3h28a3 3 0 0 0 3-3V21a3 3 0 0 0-3-3h-3v-5.56C34 6.2 29.36 1 23 1S12 6.19 12 12.44ZM23 3c5.14 0 9 4.18 9 9.44V18H14v-5.56C14 7.18 17.86 3 23 3ZM9 20h28a1 1 0 0 1 1 1v21a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V21a1 1 0 0 1 1-1Z"/></svg>
<p class="flex--item mb0 mx24 my16">Build a <strong class="p-ff-source-bold">private community</strong> to share technical or non-technical knowledge.</p>
<a href="https://stackoverflow.com/teams/create/free" class="flex--item s-btn fs-body2 px32 bar-md s-btn__outlined p-ff-source-bold" data-ga="["home page","footer callout cta","create a team",null,null]">Create a free Team</a>
</section>
<svg width="0" height="0" class="ps-absolute"><defs>
<clipPath id="curve" clipPathUnits="objectBoundingBox">
<path d="M0,0 H1 V0.988 a0.007,0.012,0,0,1,-0.009,0.011 C0.955,0.983,0.802,0.925,0.501,0.925 C0.2,0.925,0.045,0.984,0.009,1 A0.007,0.012,0,0,1,0,0.988"/>
</clipPath>
</defs></svg>
<script>
window.onload = function () {
var userSlider = document.querySelector(".js-user-slider");
var userWordsData = userSlider.getAttribute("data-words").split(",");
var userWords;
var userWordsWidth = [];
var userSliderCount = 0;
var userSliderStarted = false;
var userSliderTimeout;
var userSliderPrev = null;
var userSliderCur;
function userSliderInit() {
userSlider.innerHTML = "";
for (var i = 0; i < userWordsData.length; ++i) {
var _span = document.createElement("span");
var _text = document.createTextNode(userWordsData[i]);
var _elm = _span.appendChild(_text);
userSlider.appendChild(_span);
}
userWords = userSlider.childNodes;
userSlider.style.width = userSlider.clientWidth + "px";
userSlider.style.height = userSlider.clientHeight + "px";
userSliderRun();
}
function userSliderRun() {
clearTimeout(userSliderTimeout);
userSliderTimeout = setTimeout(
function () {
userSlider.classList.add("js-loaded");
userSliderStarted = true;
userSliderCur = userWords[userSliderCount];
if (userSliderPrev) {
userSliderPrev.classList.add("js-user-slide-out");
userSliderCur.classList.remove("js-user-slide-out");
userSliderCur.classList.add("js-user-slide-in");
} else {
userSliderCur.classList.add("js-user-slide-init");
}
userSlider.style.width = userSliderCur.clientWidth + "px";
userSlider.style.height = userSliderCur.clientHeight + "px";
userSliderPrev = userSliderCur;
if (userSliderCount === userWords.length - 1) {
userSliderCount = 0;
} else {
userSliderCount++;
}
userSliderRun();
},
userSliderStarted ? 2000 : 0
);
}
userSliderInit();
};
(function () {
var useCases = document.querySelectorAll(".js-use-case");
var useCaseClassActive = "js-use-case wmn3 fc-white d:fc-black js-use-case--is-active c-pointer flex--item bg-black-700 d:bg-black-100 py32 bar-lg bs-md";
var useCaseClass = "js-use-case c-pointer fc-black-025 h:bg-black-800 bar-lg flex--item py32";
var useCaseCur = 0;
var useCasePlayer;
var useCaseSpeed = 5000;
for (var i = 0; i < useCases.length; ++i) {
var useCase = useCases[i];
useCase.addEventListener("click", function(event) {
useCaseShow(event.currentTarget, i);
clearInterval(useCasePlayer);
});
}
function useCaseReset() {
for (var i = 0; i < useCases.length; ++i) {
useCases[i].className = useCaseClass;
}
}
function useCaseShow(el) {
useCaseReset();
el.className = useCaseClassActive;
}
function useCaseInit() {
useCasePlayer = setInterval(function() {
if (useCaseCur === useCases.length) {
useCaseCur = 0;
}
useCaseShow(useCases[useCaseCur++])
}, useCaseSpeed)
}
//useCaseInit();
})();
</script>
</div>
</div>
<footer id="footer" class="site-footer js-footer" role="contentinfo">
<div class="site-footer--container">
<div class="site-footer--logo">
<a href="https://stackoverflow.com"><svg aria-hidden="true" class="native svg-icon iconLogoGlyphMd" width="32" height="37" viewBox="0 0 32 37"><path d="M26 33v-9h4v13H0V24h4v9h22Z" fill="#BCBBBB"/><path d="m21.5 0-2.7 2 9.9 13.3 2.7-2L21.5 0ZM26 18.4 13.3 7.8l2.1-2.5 12.7 10.6-2.1 2.5ZM9.1 15.2l15 7 1.4-3-15-7-1.4 3Zm14 10.79.68-2.95-16.1-3.35L7 23l16.1 2.99ZM23 30H7v-3h16v3Z" fill="#F48024"/></svg></a>
</div>
<nav class="site-footer--nav">
<div class="site-footer--col">
<h5 class="-title"><a href="https://stackoverflow.com" class="js-gps-track" data-gps-track="footer.click({ location: 1, link: 15})">Stack Overflow</a></h5>
<ul class="-list js-primary-footer-links">
<li><a href="/questions" class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 16})">Questions</a></li>
<li><a href="/help" class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 3 })">Help</a></li>
</ul>
</div>
<div class="site-footer--col">
<h5 class="-title"><a href="https://stackoverflow.com/?products" class="js-gps-track" data-gps-track="footer.click({ location: 1, link: 19 })">Products</a></h5>
<ul class="-list">
<li><a href="https://stackoverflow.co/teams" class="js-gps-track -link"
data-ga="["teams traffic","footer - site nav","stackoverflow.com/teams",null,{"dimension4":"teams"}]"
data-gps-track="footer.click({ location: 1, link: 29 })">Teams</a></li>
<li><a href="https://stackoverflow.co/advertising" class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 21 })">Advertising</a></li>
<li><a href="https://stackoverflow.co/collectives" class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 40 })">Collectives</a></li>
<li><a href="https://stackoverflow.co/talent" class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 20 })">Talent</a></li>
</ul>
</div>
<div class="site-footer--col">
<h5 class="-title"><a class="js-gps-track" data-gps-track="footer.click({ location: 1, link: 1 })" href="https://stackoverflow.co/">Company</a></h5>
<ul class="-list">
<li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 1 })" href="https://stackoverflow.co/">About</a></li>
<li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 27 })" href="https://stackoverflow.co/company/press">Press</a></li>
<li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 9 })" href="https://stackoverflow.co/company/work-here">Work Here</a></li>
<li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 7 })" href="https://stackoverflow.com/legal">Legal</a></li>
<li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 8 })" href="https://stackoverflow.com/legal/privacy-policy">Privacy Policy</a></li>
<li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 37 })" href="https://stackoverflow.com/legal/terms-of-service">Terms of Service</a></li>
<li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 13 })" href="https://stackoverflow.co/company/contact">Contact Us</a></li>
<li class="" id="consent-footer-link"><a class="js-gps-track -link js-cookie-settings" data-gps-track="footer.click({ location: 1, link: 38 })" href="#" data-consent-popup-loader="footer">Cookie Settings</a></li>
<li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link: 39 })" href="https://stackoverflow.com/legal/cookie-policy">Cookie Policy</a></li>
</ul>
</div>
<div class="site-footer--col site-footer--categories-nav">
<div>
<h5 class="-title"><a href="https://stackexchange.com" data-gps-track="footer.click({ location: 1, link: 30 })">Stack Exchange Network</a></h5>
<ul class="-list">
<li>
<a href="https://stackexchange.com/sites#technology" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 24 })">
Technology
</a>
</li>
<li>
<a href="https://stackexchange.com/sites#culturerecreation" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 24 })">
Culture & recreation
</a>
</li>
<li>
<a href="https://stackexchange.com/sites#lifearts" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 24 })">
Life & arts
</a>
</li>
<li>
<a href="https://stackexchange.com/sites#science" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 24 })">
Science
</a>
</li>
<li>
<a href="https://stackexchange.com/sites#professional" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 24 })">
Professional
</a>
</li>
<li>
<a href="https://stackexchange.com/sites#business" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 24 })">
Business
</a>
</li>
<li class="mt16 md:mt0">
<a href="https://api.stackexchange.com/" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 24 })">
API
</a>
</li>
<li>
<a href="https://data.stackexchange.com/" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 24 })">
Data
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="site-footer--copyright fs-fine md:mt24">
<ul class="-list -social md:mb8">
<li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 1, link:4 })" href="https://stackoverflow.blog?blb=1">Blog</a></li>
<li><a href="https://www.facebook.com/officialstackoverflow/" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 31 })">Facebook</a></li>
<li><a href="https://twitter.com/stackoverflow" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 32 })">Twitter</a></li>
<li><a href="https://linkedin.com/company/stack-overflow" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 33 })">LinkedIn</a></li>
<li><a href="https://www.instagram.com/thestackoverflow" class="-link js-gps-track" data-gps-track="footer.click({ location: 1, link: 36 })">Instagram</a></li>
</ul>
<p class="md:mb0">
Site design / logo © 2022 Stack Exchange Inc; user contributions licensed under <a href="https://stackoverflow.com/help/licensing">cc by-sa</a>. <span id="svnrev">rev 2022.5.16.42139</span>
</p>
</div>
</div>
</footer>
<script>
</script>
<div class="ff-sans ps-fixed z-nav-fixed ws4 sm:w-auto p32 sm:p16 bg-black-750 fc-white bar-lg b16 l16 r16 js-consent-banner">
<svg aria-hidden="true" class="mln4 mb24 sm:d-none svg-spot spotCookieLg" style="color: var(--theme-button-filled-background-color)" width="96" height="96" viewBox="0 0 96 96">
<path d="M35 45.5a7.5 7.5 0 11-15 0 7.5 7.5 0 0115 0zM63.5 63a7.5 7.5 0 100-15 7.5 7.5 0 000 15zm-19 19a7.5 7.5 0 100-15 7.5 7.5 0 000 15z" opacity=".2"/>
<path d="M56.99 2.53a23.1 23.1 0 0114.66 6.15h.01l.01.02c.57.55.61 1.27.5 1.74v.07a10.95 10.95 0 01-3.07 4.77 9 9 0 01-6.9 2.5 10.34 10.34 0 01-9.72-10.44v-.08a10 10 0 011.03-3.74l.01-.03.02-.02c.28-.5.82-.92 1.52-.95.63-.02 1.27-.02 1.93.01zm12.04 7.83a20.1 20.1 0 00-12.2-4.83l-.92-.03c-.23.6-.38 1.25-.43 1.94a7.34 7.34 0 006.95 7.34 6 6 0 004.64-1.7c.94-.88 1.6-1.9 1.96-2.72zm15.3 8.76a6.84 6.84 0 00-5.09-.24 7.9 7.9 0 00-3.28 2.05 1.8 1.8 0 00-.3 1.95l.02.02v.02a15.16 15.16 0 008.74 7.47c.64.23 1.32.08 1.8-.33a6.63 6.63 0 001.63-1.97l.01-.03.01-.03c1.67-3.5-.12-7.32-3.54-8.91zm-5.5 3.28c.36-.25.82-.5 1.35-.67.92-.3 1.92-.35 2.89.1 2.14 1 2.92 3.14 2.11 4.88-.12.21-.26.41-.43.6l-.26-.1a12.29 12.29 0 01-5.66-4.81zM32 24a2 2 0 11-4 0 2 2 0 014 0zm12 21a2 2 0 11-4 0 2 2 0 014 0zm36 4a2 2 0 11-4 0 2 2 0 014 0zm-7 21a2 2 0 11-4 0 2 2 0 014 0zM59 81a2 2 0 11-4 0 2 2 0 014 0zM22 63a2 2 0 11-4 0 2 2 0 014 0zm27 7a9 9 0 11-18 0 9 9 0 0118 0zm-3 0a6 6 0 10-12 0 6 6 0 0012 0zM33 41a9 9 0 11-18 0 9 9 0 0118 0zm-15 0a6 6 0 1012 0 6 6 0 00-12 0zm50 11a9 9 0 11-18 0 9 9 0 0118 0zm-3 0a6 6 0 10-12 0 6 6 0 0012 0zM44.08 4.24c.31.48.33 1.09.05 1.58a17.46 17.46 0 00-2.36 8.8c0 9.55 7.58 17.24 16.85 17.24 2.97 0 5.75-.78 8.16-2.15a1.5 1.5 0 012.1.66 12.08 12.08 0 0011 6.74 12.4 12.4 0 007.85-2.75 1.5 1.5 0 012.38.74A45.76 45.76 0 0192 48.16c0 24.77-19.67 44.9-44 44.9S4 72.93 4 48.16C4 25.23 20.84 6.28 42.64 3.58a1.5 1.5 0 011.44.66zM40.22 7C21.32 10.71 7 27.7 7 48.16c0 23.17 18.39 41.9 41 41.9s41-18.73 41-41.9c0-3.52-.42-6.93-1.22-10.2a15.5 15.5 0 01-7.9 2.15c-5.5 0-10.36-2.83-12.97-7.1a19.46 19.46 0 01-8.28 1.85c-11 0-19.86-9.1-19.86-20.24 0-2.7.52-5.26 1.45-7.62zM92 91a2 2 0 100-4 2 2 0 000 4zM7 8.5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zM82.5 90a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm9.5-7.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM13.5 8a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM80 14.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM53.5 20a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"/>
</svg>
<p class="fs-body2 fw-bold mb4">
Your privacy
</p>
<p class="mb16 s-anchors s-anchors__inherit s-anchors__underlined">
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our <a href="https://stackoverflow.com/legal/cookie-policy">Cookie Policy</a>.
</p>
<div class="d-flex gs8 ai-stretch fd-column sm:fd-row">
<button class="flex--item s-btn s-btn__primary js-accept-cookies js-consent-banner-hide">
Accept all cookies
</button>
<button class="flex--item s-btn s-btn__filled js-cookie-settings" data-consent-popup-loader="banner">
Customize settings
</button>
</div>
</div>
<div id="onetrust-consent-sdk" class="d-none"></div>
<div id="onetrust-banner-sdk" data-controller="s-modal"></div>
<div id="ot-pc-content" class="d-none"></div>
<div id="onetrust-style" class="d-none"> </div>
<div class="d-none js-consent-banner-version" data-consent-banner-version="baseline"></div>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/benches/lexer.rs | Rust | extern crate swc_malloc;
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{input::StringInput, FileName};
use swc_html_parser::lexer::Lexer;
fn bench_document(b: &mut Bencher, src: &'static str) {
let _ = ::testing::run_test(false, |cm, _| {
let fm = cm.new_source_file(FileName::Anon.into(), src.into());
b.iter(|| {
let lexer = Lexer::new(StringInput::from(&*fm));
for t in lexer {
black_box(t);
}
});
Ok(())
});
}
fn run(c: &mut Criterion, id: &str, src: &'static str) {
c.bench_function(&format!("html/lexer/{}", id), |b| {
bench_document(b, src);
});
}
fn bench_files(c: &mut Criterion) {
run(
c,
"css_2021_spec",
include_str!("./files/css_2021_spec.html"),
);
run(
c,
"github_com_17_05_2022",
include_str!("./files/github_com_17_05_2022.html"),
);
run(
c,
"stackoverflow_com_17_05_2022",
include_str!("./files/stackoverflow_com_17_05_2022.html"),
);
}
criterion_group!(benches, bench_files);
criterion_main!(benches);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/benches/parser.rs | Rust | extern crate swc_malloc;
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{input::StringInput, FileName};
use swc_html_ast::{DocumentMode, Element, Namespace};
use swc_html_parser::{lexer::Lexer, parser::Parser};
fn bench_document(b: &mut Bencher, src: &'static str) {
let _ = ::testing::run_test(false, |cm, _| {
let fm = cm.new_source_file(FileName::Anon.into(), src.into());
b.iter(|| {
let _ = black_box({
let lexer = Lexer::new(StringInput::from(&*fm));
let mut parser = Parser::new(lexer, Default::default());
parser.parse_document()
});
});
Ok(())
});
}
fn bench_document_fragment(b: &mut Bencher, src: &'static str) {
let _ = ::testing::run_test(false, |cm, _| {
let fm = cm.new_source_file(FileName::Anon.into(), src.into());
b.iter(|| {
let _ = black_box({
let lexer = Lexer::new(StringInput::from(&*fm));
let mut parser = Parser::new(lexer, Default::default());
parser.parse_document_fragment(
Element {
span: Default::default(),
tag_name: "template".into(),
namespace: Namespace::HTML,
attributes: Vec::new(),
is_self_closing: false,
children: Vec::new(),
content: None,
},
DocumentMode::NoQuirks,
None,
)
});
});
Ok(())
});
}
fn run_document(c: &mut Criterion, id: &str, src: &'static str) {
c.bench_function(&format!("html/parser/{}", id), |b| {
bench_document(b, src);
});
}
fn run_document_fragment(c: &mut Criterion, id: &str, src: &'static str) {
c.bench_function(&format!("html/parser/{}", id), |b| {
bench_document_fragment(b, src);
});
}
fn bench_files(c: &mut Criterion) {
run_document(
c,
"parser_document/css_2021_spec",
include_str!("./files/css_2021_spec.html"),
);
run_document(
c,
"parser_document/github_com_17_05_2022",
include_str!("./files/github_com_17_05_2022.html"),
);
run_document(
c,
"parser_document/stackoverflow_com_17_05_2022",
include_str!("./files/stackoverflow_com_17_05_2022.html"),
);
run_document_fragment(
c,
"parser_document_fragment/css_2021_spec",
include_str!("./files/css_2021_spec.html"),
);
run_document_fragment(
c,
"parser_document_fragment/github_com_17_05_2022",
include_str!("./files/github_com_17_05_2022.html"),
);
run_document_fragment(
c,
"parser_document_fragment/stackoverflow_com_17_05_2022",
include_str!("./files/stackoverflow_com_17_05_2022.html"),
);
}
criterion_group!(benches, bench_files);
criterion_main!(benches);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/error.rs | Rust | use std::borrow::Cow;
use swc_atoms::Atom;
use swc_common::{
errors::{DiagnosticBuilder, Handler},
Span,
};
/// Size is same as a size of a pointer.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Error {
inner: Box<(Span, ErrorKind)>,
}
impl Error {
pub fn kind(&self) -> &ErrorKind {
&self.inner.1
}
pub fn into_inner(self) -> Box<(Span, ErrorKind)> {
self.inner
}
pub fn new(span: Span, kind: ErrorKind) -> Self {
Error {
inner: Box::new((span, kind)),
}
}
pub fn message(&self) -> Cow<'static, str> {
match &self.inner.1 {
ErrorKind::Eof => "Unexpected end of file".into(),
// Lexer errors
ErrorKind::AbruptClosingOfEmptyComment => "Abrupt closing of empty comment".into(),
ErrorKind::AbruptDoctypePublicIdentifier => "Abrupt doctype public identifier".into(),
ErrorKind::AbruptDoctypeSystemIdentifier => "Abrupt doctype system identifier".into(),
ErrorKind::AbsenceOfDigitsInNumericCharacterReference => {
"Absence of digits in numeric character reference".into()
}
ErrorKind::CdataInHtmlContent => "Cdata in html content".into(),
ErrorKind::CharacterReferenceOutsideUnicodeRange => {
"Character reference outside unicode range".into()
}
ErrorKind::ControlCharacterInInputStream => "Control character in input stream".into(),
ErrorKind::ControlCharacterReference => "Control character reference".into(),
ErrorKind::EndTagWithAttributes => "End tag with attributes".into(),
ErrorKind::DuplicateAttribute => "Duplicate attribute".into(),
ErrorKind::EndTagWithTrailingSolidus => "End tag with trailing solidus".into(),
ErrorKind::EofBeforeTagName => "Eof before tag name".into(),
ErrorKind::EofInCdata => "Eof in cdata".into(),
ErrorKind::EofInComment => "Eof in comment".into(),
ErrorKind::EofInDoctype => "Eof in doctype".into(),
ErrorKind::EofInScriptHtmlCommentLikeText => {
"Eof in script html comment like text".into()
}
ErrorKind::EofInTag => "Eof in tag".into(),
ErrorKind::IncorrectlyClosedComment => "Incorrectly closed comment".into(),
ErrorKind::IncorrectlyOpenedComment => "Incorrectly opened comment".into(),
ErrorKind::InvalidCharacterSequenceAfterDoctypeName => {
"Invalid character sequence after doctype name".into()
}
ErrorKind::InvalidFirstCharacterOfTagName => {
"Invalid first character of tag name".into()
}
ErrorKind::MissingAttributeValue => "Missing attribute value".into(),
ErrorKind::MissingDoctypeName => "Missing doctype name".into(),
ErrorKind::MissingDoctypePublicIdentifier => "Missing doctype public identifier".into(),
ErrorKind::MissingDoctypeSystemIdentifier => "Missing doctype system identifier".into(),
ErrorKind::MissingEndTagName => "Missing end tag name".into(),
ErrorKind::MissingQuoteBeforeDoctypePublicIdentifier => {
"Missing quote before doctype public identifier".into()
}
ErrorKind::MissingQuoteBeforeDoctypeSystemIdentifier => {
"Missing quote before doctype system identifier".into()
}
ErrorKind::MissingSemicolonAfterCharacterReference => {
"Missing semicolon after character reference".into()
}
ErrorKind::MissingWhitespaceAfterDoctypePublicKeyword => {
"Missing whitespace after doctype public keyword".into()
}
ErrorKind::MissingWhitespaceAfterDoctypeSystemKeyword => {
"Missing whitespace after doctype system keyword".into()
}
ErrorKind::MissingWhitespaceBeforeDoctypeName => {
"Missing whitespace before doctype name".into()
}
ErrorKind::MissingWhitespaceBetweenAttributes => {
"Missing whitespace between attributes".into()
}
ErrorKind::MissingWhitespaceBetweenDoctypePublicAndSystemIdentifiers => {
"Missing whitespace between doctype public and system identifiers".into()
}
ErrorKind::NestedComment => "Nested comment".into(),
ErrorKind::NoncharacterCharacterReference => "Noncharacter character reference".into(),
ErrorKind::NoncharacterInInputStream => "Noncharacter in input stream".into(),
ErrorKind::NonVoidHtmlElementStartTagWithTrailingSolidus => {
"Non void html element start tag with trailing solidus".into()
}
ErrorKind::NullCharacterReference => "Null character reference".into(),
ErrorKind::SurrogateCharacterReference => "Surrogate character reference".into(),
ErrorKind::SurrogateInInputStream => "Surrogate in input stream".into(),
ErrorKind::UnexpectedCharacterAfterDoctypeSystemIdentifier => {
"Unexpected character after doctype system identifier".into()
}
ErrorKind::UnexpectedCharacterInAttributeName => {
"Unexpected character in attribute name".into()
}
ErrorKind::UnexpectedCharacterInUnquotedAttributeValue => {
"Unexpected character in unquoted attribute value".into()
}
ErrorKind::UnexpectedEqualsSignBeforeAttributeName => {
"Unexpected equals sign before attribute name".into()
}
ErrorKind::UnexpectedNullCharacter => "Unexpected null character".into(),
ErrorKind::UnexpectedQuestionMarkInsteadOfTagName => {
"Unexpected question mark instead of tag name".into()
}
ErrorKind::UnexpectedSolidusInTag => "Unexpected solidus in tag".into(),
ErrorKind::UnknownNamedCharacterReference => "Unknown named character reference".into(),
// Parser errors
ErrorKind::StrayStartTag(tag_name) => {
format!("Stray start tag \"{}\"", tag_name).into()
}
ErrorKind::StrayEndTag(tag_name) => format!("Stray end tag \"{}\"", tag_name).into(),
ErrorKind::UnclosedElements(tag_name) => format!(
"End tag \"{}\" seen, but there were open elements",
tag_name
)
.into(),
ErrorKind::UnclosedElementsImplied(tag_name) => format!(
"End tag \"{}\" implied, but there were open elements",
tag_name
)
.into(),
ErrorKind::UnclosedElementsCell => {
"A table cell was implicitly closed, but there were open elements".into()
}
ErrorKind::StrayDoctype => "Stray doctype".into(),
ErrorKind::NonConformingDoctype => "Non conforming doctype".into(),
ErrorKind::NonSpaceCharacterInTrailer => "Non-space character in page trailer".into(),
ErrorKind::NonSpaceCharacterAfterFrameset => {
"Non-space character after \"frameset\"".into()
}
ErrorKind::NonSpaceCharacterInFrameset => "Non-space character in \"frameset\"".into(),
ErrorKind::NonSpaceCharacterAfterBody => "Non-space character after body".into(),
ErrorKind::NonSpaceCharacterInColumnGroup => {
"Non-space character in \"colgroup\" element".into()
}
ErrorKind::NonSpaceCharacterInNoscriptInHead => {
"Non-space character inside \"noscript\" inside \"head\"".into()
}
ErrorKind::SomethingBetweenHeadAndBody(tag_name) => {
format!("\"{}\" element between \"head\" and \"body\"", tag_name).into()
}
ErrorKind::StartTagWithoutDoctype => {
"Start tag seen without seeing a doctype first, expected \"<!DOCTYPE html>\"".into()
}
ErrorKind::StartSelectWhereEndSelectExpected => {
"\"select\" start tag where end tag expected".into()
}
ErrorKind::StartTagWithSelectOpen(tag_name) => {
format!("\"{}\" start tag with \"select\" open", tag_name).into()
}
ErrorKind::BadStartTagInNoscriptInHead(tag_name) => format!(
"Bad start tag in \"{}\" in \"noscript\" in \"head\"",
tag_name
)
.into(),
ErrorKind::UnexpectedImageStartTag => {
"Saw a start tag \"image\", \"img\" element is outdated".into()
}
ErrorKind::SomethingSeenWhenSomethingOpen(tag_name) => format!(
"Start tag \"{}\" seen but an element of the same type was already open",
tag_name
)
.into(),
ErrorKind::HeadingWhenHeadingOpen => {
"Heading cannot be a child of another heading".into()
}
ErrorKind::NoCellToClose => "No cell to close".into(),
ErrorKind::StartTagInTable(tag_name) => {
format!("Start tag \"{}\" seen in \"table\"", tag_name).into()
}
ErrorKind::FormWhenFormOpen => "Saw a \"form\" start tag, but there was already an \
active \"form\" element, nested forms are not allowed"
.into(),
ErrorKind::TableSeenWhileTableOpen => {
"Start tag for \"table\" seen but the previous \"table\" is still open".into()
}
ErrorKind::StartTagInTableBody(tag_name) => {
format!("Start tag \"{}\" seen in \"table\" body", tag_name).into()
}
ErrorKind::EndTagSeenWithoutDoctype => {
"End tag seen without seeing a doctype first, expected \"<!DOCTYPE html>\"".into()
}
ErrorKind::EndTagAfterBody => "Saw an end tag after \"body\" had been closed".into(),
ErrorKind::EndTagSeenWithSelectOpen(tag_name) => {
format!("\"{}\" end tag with \"select\" open", tag_name).into()
}
ErrorKind::GarbageInColumnGroup => "Garbage in \"colgroup\" element".into(),
ErrorKind::EndTagBr => "End tag \"br\"".into(),
ErrorKind::NoElementToCloseButEndTagSeen(tag_name) => format!(
"No \"{}\" element in scope but a \"{}\" end tag seen",
tag_name, tag_name
)
.into(),
ErrorKind::HtmlStartTagInForeignContext(tag_name) => format!(
"HTML start tag \"{}\" in a foreign namespace context",
tag_name
)
.into(),
ErrorKind::NoTableRowToClose => "No table row to close".into(),
ErrorKind::NonSpaceCharacterInTable => {
"Misplaced non-space characters inside a table".into()
}
ErrorKind::UnclosedChildrenInRuby => "Unclosed children in \"ruby\"".into(),
ErrorKind::StartTagSeenWithoutRuby(tag_name) => format!(
"Start tag \"{}\" seen without a \"ruby\" element being open",
tag_name
)
.into(),
ErrorKind::UnclosedElementsOnStack => "Unclosed elements on stack".into(),
ErrorKind::EndTagDidNotMatchCurrentOpenElement(
end_tag_name,
current_element_tag_name,
) => format!(
"End tag \"{}\" did not match the name of the current open element (\"{}\")",
end_tag_name, current_element_tag_name
)
.into(),
ErrorKind::EndTagViolatesNestingRules(tag_name) => {
format!("End tag \"{}\" violates nesting rules", tag_name).into()
}
ErrorKind::EofWithUnclosedElements => {
"End of file seen and there were open elements".into()
}
ErrorKind::EndTagWithUnclosedElements(tag_name) => format!(
"Unexpected end tag for \"{}\", but there were unclosed elements",
tag_name
)
.into(),
ErrorKind::NonSpaceCharacterWithoutDoctype => "Non-space characters found without \
seeing a doctype first, expected \
\"<!DOCTYPE html>\""
.into(),
ErrorKind::EofWithoutDoctype => "End of file seen without seeing a doctype first, \
expected \"<!DOCTYPE html>\""
.into(),
ErrorKind::EofInText => "End of file seen when expecting text or an end tag".into(),
}
}
pub fn to_diagnostics<'a>(&self, handler: &'a Handler) -> DiagnosticBuilder<'a> {
handler.struct_span_err(self.inner.0, &self.message())
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum ErrorKind {
Eof,
// Lexer errors
AbruptClosingOfEmptyComment,
AbruptDoctypePublicIdentifier,
AbruptDoctypeSystemIdentifier,
AbsenceOfDigitsInNumericCharacterReference,
CdataInHtmlContent,
CharacterReferenceOutsideUnicodeRange,
ControlCharacterInInputStream,
ControlCharacterReference,
EndTagWithAttributes,
DuplicateAttribute,
EndTagWithTrailingSolidus,
EofBeforeTagName,
EofInCdata,
EofInComment,
EofInDoctype,
EofInScriptHtmlCommentLikeText,
EofInTag,
IncorrectlyClosedComment,
IncorrectlyOpenedComment,
InvalidCharacterSequenceAfterDoctypeName,
InvalidFirstCharacterOfTagName,
MissingAttributeValue,
MissingDoctypeName,
MissingDoctypePublicIdentifier,
MissingDoctypeSystemIdentifier,
MissingEndTagName,
MissingQuoteBeforeDoctypePublicIdentifier,
MissingQuoteBeforeDoctypeSystemIdentifier,
MissingSemicolonAfterCharacterReference,
MissingWhitespaceAfterDoctypePublicKeyword,
MissingWhitespaceAfterDoctypeSystemKeyword,
MissingWhitespaceBeforeDoctypeName,
MissingWhitespaceBetweenAttributes,
MissingWhitespaceBetweenDoctypePublicAndSystemIdentifiers,
NestedComment,
NoncharacterCharacterReference,
NoncharacterInInputStream,
NonVoidHtmlElementStartTagWithTrailingSolidus,
NullCharacterReference,
SurrogateCharacterReference,
SurrogateInInputStream,
UnexpectedCharacterAfterDoctypeSystemIdentifier,
UnexpectedCharacterInAttributeName,
UnexpectedCharacterInUnquotedAttributeValue,
UnexpectedEqualsSignBeforeAttributeName,
UnexpectedNullCharacter,
UnexpectedQuestionMarkInsteadOfTagName,
UnexpectedSolidusInTag,
UnknownNamedCharacterReference,
// Parser errors
StrayStartTag(Atom),
StrayEndTag(Atom),
UnclosedElements(Atom),
UnclosedElementsImplied(Atom),
UnclosedElementsCell,
StrayDoctype,
NonConformingDoctype,
NonSpaceCharacterInTrailer,
NonSpaceCharacterAfterFrameset,
NonSpaceCharacterInFrameset,
NonSpaceCharacterAfterBody,
NonSpaceCharacterInColumnGroup,
NonSpaceCharacterInNoscriptInHead,
SomethingBetweenHeadAndBody(Atom),
StartTagWithoutDoctype,
StartSelectWhereEndSelectExpected,
StartTagWithSelectOpen(Atom),
BadStartTagInNoscriptInHead(Atom),
UnexpectedImageStartTag,
SomethingSeenWhenSomethingOpen(Atom),
HeadingWhenHeadingOpen,
NoCellToClose,
StartTagInTable(Atom),
FormWhenFormOpen,
TableSeenWhileTableOpen,
StartTagInTableBody(Atom),
EndTagSeenWithoutDoctype,
EndTagAfterBody,
EndTagSeenWithSelectOpen(Atom),
GarbageInColumnGroup,
EndTagBr,
NoElementToCloseButEndTagSeen(Atom),
HtmlStartTagInForeignContext(Atom),
NoTableRowToClose,
NonSpaceCharacterInTable,
UnclosedChildrenInRuby,
StartTagSeenWithoutRuby(Atom),
UnclosedElementsOnStack,
EndTagDidNotMatchCurrentOpenElement(Atom, Atom),
EndTagViolatesNestingRules(Atom),
EofWithUnclosedElements,
EndTagWithUnclosedElements(Atom),
NonSpaceCharacterWithoutDoctype,
EofWithoutDoctype,
EofInText,
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/lexer/mod.rs | Rust | use std::{cell::RefCell, char::REPLACEMENT_CHARACTER, collections::VecDeque, mem::take, rc::Rc};
use rustc_hash::FxHashSet;
use swc_atoms::{atom, Atom};
use swc_common::{input::Input, BytePos, Span};
use swc_html_ast::{AttributeToken, Raw, Token, TokenAndSpan};
use swc_html_utils::{Entity, HTML_ENTITIES};
use crate::{
error::{Error, ErrorKind},
parser::input::ParserInput,
};
#[derive(Debug, Clone)]
pub enum State {
Data,
Rcdata,
Rawtext,
ScriptData,
PlainText,
TagOpen,
EndTagOpen,
TagName,
RcdataLessThanSign,
RcdataEndTagOpen,
RcdataEndTagName,
RawtextLessThanSign,
RawtextEndTagOpen,
RawtextEndTagName,
ScriptDataLessThanSign,
ScriptDataEndTagOpen,
ScriptDataEndTagName,
ScriptDataEscapeStart,
ScriptDataEscapeStartDash,
ScriptDataEscaped,
ScriptDataEscapedDash,
ScriptDataEscapedDashDash,
ScriptDataEscapedLessThanSign,
ScriptDataEscapedEndTagOpen,
ScriptDataEscapedEndTagName,
ScriptDataDoubleEscapeStart,
ScriptDataDoubleEscaped,
ScriptDataDoubleEscapedDash,
ScriptDataDoubleEscapedDashDash,
ScriptDataDoubleEscapedLessThanSign,
ScriptDataDoubleEscapeEnd,
BeforeAttributeName,
AttributeName,
AfterAttributeName,
BeforeAttributeValue,
AttributeValueDoubleQuoted,
AttributeValueSingleQuoted,
AttributeValueUnquoted,
AfterAttributeValueQuoted,
SelfClosingStartTag,
BogusComment,
MarkupDeclarationOpen,
CommentStart,
CommentStartDash,
Comment,
CommentLessThanSign,
CommentLessThanSignBang,
CommentLessThanSignBangDash,
CommentLessThanSignBangDashDash,
CommentEndDash,
CommentEnd,
CommentEndBang,
Doctype,
BeforeDoctypeName,
DoctypeName,
AfterDoctypeName,
AfterDoctypePublicKeyword,
BeforeDoctypePublicIdentifier,
DoctypePublicIdentifierDoubleQuoted,
DoctypePublicIdentifierSingleQuoted,
AfterDoctypePublicIdentifier,
BetweenDoctypePublicAndSystemIdentifiers,
AfterDoctypeSystemKeyword,
BeforeDoctypeSystemIdentifier,
DoctypeSystemIdentifierDoubleQuoted,
DoctypeSystemIdentifierSingleQuoted,
AfterDoctypeSystemIdentifier,
BogusDoctype,
CdataSection,
CdataSectionBracket,
CdataSectionEnd,
CharacterReference,
NamedCharacterReference,
AmbiguousAmpersand,
NumericCharacterReference,
HexademicalCharacterReferenceStart,
DecimalCharacterReferenceStart,
HexademicalCharacterReference,
DecimalCharacterReference,
NumericCharacterReferenceEnd,
}
pub(crate) type LexResult<T> = Result<T, ErrorKind>;
pub struct Lexer<I>
where
I: Input,
{
input: I,
cur: Option<char>,
cur_pos: BytePos,
last_token_pos: BytePos,
finished: bool,
state: State,
return_state: State,
errors: Vec<Error>,
last_start_tag_name: Option<Atom>,
pending_tokens: VecDeque<TokenAndSpan>,
buf: Rc<RefCell<String>>,
sub_buf: Rc<RefCell<String>>,
current_token: Option<Token>,
attributes_validator: FxHashSet<Atom>,
attribute_start_position: Option<BytePos>,
character_reference_code: Option<Vec<(u8, u32, Option<char>)>>,
temporary_buffer: String,
is_adjusted_current_node_is_element_in_html_namespace: Option<bool>,
}
impl<I> Lexer<I>
where
I: Input,
{
pub fn new(input: I) -> Self {
let start_pos = input.last_pos();
let mut lexer = Lexer {
input,
cur: None,
cur_pos: start_pos,
last_token_pos: start_pos,
finished: false,
state: State::Data,
return_state: State::Data,
errors: Vec::new(),
last_start_tag_name: None,
pending_tokens: VecDeque::with_capacity(16),
buf: Rc::new(RefCell::new(String::with_capacity(256))),
sub_buf: Rc::new(RefCell::new(String::with_capacity(256))),
current_token: None,
attributes_validator: Default::default(),
attribute_start_position: None,
character_reference_code: None,
// Do this without a new allocation.
temporary_buffer: String::with_capacity(33),
is_adjusted_current_node_is_element_in_html_namespace: None,
};
// A leading Byte Order Mark (BOM) causes the character encoding argument to be
// ignored and will itself be skipped.
if lexer.input.is_at_start() && lexer.input.cur() == Some('\u{feff}') {
unsafe {
// Safety: We know that the current character is '\u{feff}'.
lexer.input.bump();
}
}
lexer
}
}
impl<I: Input> Iterator for Lexer<I> {
type Item = TokenAndSpan;
fn next(&mut self) -> Option<Self::Item> {
let token_and_span = self.read_token_and_span();
match token_and_span {
Ok(token_and_span) => {
return Some(token_and_span);
}
Err(..) => {
return None;
}
}
}
}
impl<I> ParserInput for Lexer<I>
where
I: Input,
{
fn start_pos(&mut self) -> BytePos {
self.input.cur_pos()
}
fn last_pos(&mut self) -> BytePos {
self.input.last_pos()
}
fn take_errors(&mut self) -> Vec<Error> {
take(&mut self.errors)
}
fn set_last_start_tag_name(&mut self, tag_name: &Atom) {
self.last_start_tag_name = Some(tag_name.clone());
}
fn set_adjusted_current_node_to_html_namespace(&mut self, value: bool) {
self.is_adjusted_current_node_is_element_in_html_namespace = Some(value);
}
fn set_input_state(&mut self, state: State) {
self.state = state;
}
}
impl<I> Lexer<I>
where
I: Input,
{
#[inline(always)]
fn next(&mut self) -> Option<char> {
self.input.cur()
}
// Any occurrences of surrogates are surrogate-in-input-stream parse errors. Any
// occurrences of noncharacters are noncharacter-in-input-stream parse errors
// and any occurrences of controls other than ASCII whitespace and U+0000 NULL
// characters are control-character-in-input-stream parse errors.
//
// Postpone validation for each character for perf reasons and do it in
// `anything else`
#[inline(always)]
fn validate_input_stream_character(&mut self, c: char) {
let code = c as u32;
if is_surrogate(code) {
self.emit_error(ErrorKind::SurrogateInInputStream);
} else if is_allowed_control_character(code) {
self.emit_error(ErrorKind::ControlCharacterInInputStream);
} else if is_noncharacter(code) {
self.emit_error(ErrorKind::NoncharacterInInputStream);
}
}
#[inline(always)]
fn consume(&mut self) {
self.cur = self.input.cur();
self.cur_pos = self.input.cur_pos();
if self.cur.is_some() {
unsafe {
// Safety: self.cur is Some()
self.input.bump();
}
}
}
#[inline(always)]
fn reconsume(&mut self) {
unsafe {
// Safety: self.cur_pos is valid position because we got it from self.input
self.input.reset_to(self.cur_pos);
}
}
#[inline(always)]
fn reconsume_in_state(&mut self, state: State) {
self.state = state;
self.reconsume();
}
#[inline(always)]
fn consume_next_char(&mut self) -> Option<char> {
// The next input character is the first character in the input stream that has
// not yet been consumed or explicitly ignored by the requirements in this
// section. Initially, the next input character is the first character in the
// input. The current input character is the last character to have been
// consumed.
let c = self.next();
self.consume();
c
}
#[cold]
fn emit_error(&mut self, kind: ErrorKind) {
self.errors.push(Error::new(
Span::new(self.cur_pos, self.input.cur_pos()),
kind,
));
}
#[inline(always)]
fn emit_token(&mut self, token: Token) {
let cur_pos = self.input.cur_pos();
let span = Span::new(self.last_token_pos, cur_pos);
self.last_token_pos = cur_pos;
self.pending_tokens.push_back(TokenAndSpan { span, token });
}
#[inline(always)]
fn is_consumed_as_part_of_an_attribute(&mut self) -> bool {
matches!(
self.return_state,
State::AttributeValueSingleQuoted
| State::AttributeValueDoubleQuoted
| State::AttributeValueUnquoted
)
}
// An appropriate end tag token is an end tag token whose tag name matches the
// tag name of the last start tag to have been emitted from this tokenizer, if
// any. If no start tag has been emitted from this tokenizer, then no end tag
// token is appropriate.
#[inline(always)]
fn current_end_tag_token_is_an_appropriate_end_tag_token(&mut self) -> bool {
if let Some(last_start_tag_name) = &self.last_start_tag_name {
let b = self.buf.clone();
let buf = b.borrow();
return *last_start_tag_name == *buf;
}
false
}
#[inline(always)]
fn emit_temporary_buffer_as_character_tokens(&mut self) {
for c in take(&mut self.temporary_buffer).chars() {
self.emit_token(Token::Character {
value: c,
raw: Some(Raw::Same),
});
}
}
fn flush_code_points_consumed_as_character_reference(&mut self, raw: Option<String>) {
if self.is_consumed_as_part_of_an_attribute() {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
// When the length of raw is more than the length of temporary buffer we emit a
// raw character in the first character token
let mut once_raw = raw;
let mut once_emitted = false;
for c in take(&mut self.temporary_buffer).chars() {
buf.push(c);
let raw = match once_raw {
Some(_) => {
once_emitted = true;
once_raw.take()
}
_ => {
if once_emitted {
None
} else {
Some(String::from(c))
}
}
};
if let Some(raw) = raw {
sub_buf.push_str(&raw);
}
}
} else {
// When the length of raw is more than the length of temporary buffer we emit a
// raw character in the first character token
let mut once_raw = raw;
let is_value_eq_raw = if let Some(raw) = &once_raw {
*raw == self.temporary_buffer
} else {
true
};
for c in take(&mut self.temporary_buffer).chars() {
self.emit_token(Token::Character {
value: c,
raw: if is_value_eq_raw {
Some(Raw::Same)
} else {
once_raw.take().map(|x| Raw::Atom(Atom::new(x)))
},
});
}
}
}
#[inline(always)]
fn create_doctype_token(&mut self) {
self.current_token = Some(Token::Doctype {
name: None,
force_quirks: false,
public_id: None,
system_id: None,
raw: None,
});
}
fn append_raw_to_doctype_token(&mut self, c: char) {
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
let is_cr = c == '\r';
if is_cr {
sub_buf.push(c);
if self.input.cur() == Some('\n') {
unsafe {
// Safety: cur() is Some('\n')
self.input.bump();
}
sub_buf.push('\n');
}
} else {
sub_buf.push(c);
}
}
fn append_to_doctype_token(
&mut self,
name: Option<char>,
public_id: Option<char>,
system_id: Option<char>,
) {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
if let Some(name) = name {
buf.push(name);
}
if let Some(public_id) = public_id {
buf.push(public_id);
}
if let Some(system_id) = system_id {
buf.push(system_id);
}
}
fn consume_and_append_to_doctype_token_name<F>(&mut self, c: char, f: F)
where
F: Fn(char) -> bool,
{
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
buf.push(c.to_ascii_lowercase());
sub_buf.push(c);
let value = self.input.uncons_while(f);
buf.push_str(&value.to_ascii_lowercase());
sub_buf.push_str(value);
}
fn consume_and_append_to_doctype_token_public_id<F>(&mut self, c: char, f: F)
where
F: Fn(char) -> bool,
{
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
let is_cr = c == '\r';
if is_cr {
buf.push('\n');
sub_buf.push(c);
if self.input.cur() == Some('\n') {
unsafe {
// Safety: cur() is Some('\n')
self.input.bump();
}
sub_buf.push('\n');
}
} else {
buf.push(c);
sub_buf.push(c);
}
let value = self.input.uncons_while(f);
buf.push_str(value);
sub_buf.push_str(value);
}
fn consume_and_append_to_doctype_token_system_id<F>(&mut self, c: char, f: F)
where
F: Fn(char) -> bool,
{
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
let is_cr = c == '\r';
if is_cr {
buf.push('\n');
sub_buf.push(c);
if self.input.cur() == Some('\n') {
unsafe {
// Safety: cur() is Some('\n')
self.input.bump();
}
sub_buf.push('\n');
}
} else {
buf.push(c);
sub_buf.push(c);
}
let value = self.input.uncons_while(f);
buf.push_str(value);
sub_buf.push_str(value);
}
#[inline(always)]
fn set_doctype_token_force_quirks(&mut self) {
if let Some(Token::Doctype { force_quirks, .. }) = &mut self.current_token {
*force_quirks = true;
}
}
#[inline(always)]
fn set_doctype_token_name(&mut self, c: char) {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
buf.push(c);
}
#[inline(always)]
fn set_doctype_token_public_id(&mut self) {
if let Some(Token::Doctype { public_id, .. }) = &mut self.current_token {
*public_id = Some(atom!(""));
}
}
#[inline(always)]
fn set_doctype_token_system_id(&mut self) {
if let Some(Token::Doctype { system_id, .. }) = &mut self.current_token {
// The Longest system id is `http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`
*system_id = Some(atom!(""));
}
}
fn finish_doctype_token_name(&mut self) {
if let Some(Token::Doctype { name, .. }) = &mut self.current_token {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
*name = Some(buf.clone().into());
buf.clear();
}
}
fn finish_doctype_token_public_id(&mut self) {
if let Some(Token::Doctype { public_id, .. }) = &mut self.current_token {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
*public_id = Some(buf.clone().into());
buf.clear();
}
}
fn finish_doctype_token_system_id(&mut self) {
if let Some(Token::Doctype { system_id, .. }) = &mut self.current_token {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
*system_id = Some(buf.clone().into());
buf.clear();
}
}
fn emit_doctype_token(&mut self) {
if let Some(mut token @ Token::Doctype { .. }) = self.current_token.take() {
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
match &mut token {
Token::Doctype { raw, .. } => {
*raw = Some(Atom::new(sub_buf.clone()));
}
_ => {
unreachable!();
}
}
sub_buf.clear();
self.emit_token(token);
}
}
#[inline(always)]
fn create_start_tag_token(&mut self) {
self.current_token = Some(Token::StartTag {
// Maximum known tag is `feComponentTransfer` (SVG)
tag_name: atom!(""),
raw_tag_name: None,
is_self_closing: false,
attributes: Vec::new(),
});
}
#[inline(always)]
fn create_end_tag_token(&mut self) {
self.current_token = Some(Token::EndTag {
// Maximum known tag is `feComponentTransfer` (SVG)
tag_name: atom!(""),
raw_tag_name: None,
is_self_closing: false,
// In valid HTML code closed tags do not have attributes
attributes: Vec::new(),
});
}
fn append_to_tag_token_name(&mut self, c: char, raw_c: char) {
if let Some(Token::StartTag { .. } | Token::EndTag { .. }) = &mut self.current_token {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
buf.push(c);
sub_buf.push(raw_c);
}
}
fn consume_and_append_to_tag_token_name<F>(&mut self, c: char, f: F)
where
F: Fn(char) -> bool,
{
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
buf.push(c.to_ascii_lowercase());
sub_buf.push(c);
let value = self.input.uncons_while(f);
buf.push_str(&value.to_ascii_lowercase());
sub_buf.push_str(value);
}
fn finish_tag_token_name(&mut self) {
if let Some(
Token::StartTag {
tag_name,
raw_tag_name,
..
}
| Token::EndTag {
tag_name,
raw_tag_name,
..
},
) = &mut self.current_token
{
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
*tag_name = buf.clone().into();
*raw_tag_name = Some(Atom::new(sub_buf.clone()));
buf.clear();
sub_buf.clear();
}
}
fn start_new_attribute_token(&mut self) {
if let Some(Token::StartTag { attributes, .. } | Token::EndTag { attributes, .. }) =
&mut self.current_token
{
attributes.push(AttributeToken {
span: Default::default(),
name: atom!(""),
raw_name: None,
value: None,
raw_value: None,
});
self.attribute_start_position = Some(self.cur_pos);
}
}
fn append_to_attribute_token_name(&mut self, c: char, raw_c: char) {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
buf.push(c);
sub_buf.push(raw_c);
}
fn consume_and_append_to_attribute_token_name<F>(&mut self, c: char, f: F)
where
F: FnMut(char) -> bool,
{
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
buf.push(c.to_ascii_lowercase());
sub_buf.push(c);
let value = self.input.uncons_while(f);
buf.push_str(&value.to_ascii_lowercase());
sub_buf.push_str(value);
}
fn consume_and_append_to_attribute_token_name_and_temp_buf<F>(&mut self, c: char, f: F)
where
F: FnMut(char) -> bool,
{
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
buf.push(c.to_ascii_lowercase());
sub_buf.push(c);
self.temporary_buffer.push(c);
let value = self.input.uncons_while(f);
buf.push_str(&value.to_ascii_lowercase());
sub_buf.push_str(value);
self.temporary_buffer.push_str(value);
}
fn finish_attribute_token_name(&mut self) {
if let Some(attribute_start_position) = self.attribute_start_position {
if let Some(
Token::StartTag {
ref mut attributes, ..
}
| Token::EndTag {
ref mut attributes, ..
},
) = self.current_token
{
if let Some(last) = attributes.last_mut() {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
let name: Atom = buf.clone().into();
let raw_name = Atom::new(sub_buf.clone());
let span = Span::new(attribute_start_position, self.cur_pos);
if self.attributes_validator.contains(&name) {
self.errors
.push(Error::new(span, ErrorKind::DuplicateAttribute));
}
self.attributes_validator.insert(name.clone());
last.name = name;
last.raw_name = Some(raw_name);
buf.clear();
sub_buf.clear();
last.span = span;
}
}
}
}
fn append_to_attribute_token_value(&mut self, c: Option<char>, raw_c: Option<char>) {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
let is_cr = raw_c == Some('\r');
if is_cr {
buf.push('\n');
sub_buf.push('\r');
if self.input.cur() == Some('\n') {
unsafe {
// Safety: cur() is Some('\n')
self.input.bump();
}
sub_buf.push('\n');
}
} else {
if let Some(c) = c {
buf.push(c);
}
if let Some(raw_c) = raw_c {
sub_buf.push(raw_c);
}
}
}
fn consume_and_append_to_attribute_token_value<F>(&mut self, c: char, f: F)
where
F: FnMut(char) -> bool,
{
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
let is_cr = c == '\r';
if is_cr {
buf.push('\n');
sub_buf.push(c);
if self.input.cur() == Some('\n') {
unsafe {
// Safety: cur() is Some('\n')
self.input.bump();
}
sub_buf.push('\n');
}
} else {
buf.push(c);
sub_buf.push(c);
}
let value = self.input.uncons_while(f);
buf.push_str(value);
sub_buf.push_str(value);
}
fn finish_attribute_token_value(&mut self) {
if let Some(attribute_start_position) = self.attribute_start_position {
if let Some(
Token::StartTag {
ref mut attributes, ..
}
| Token::EndTag {
ref mut attributes, ..
},
) = self.current_token
{
if let Some(last) = attributes.last_mut() {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
if !buf.is_empty() {
last.value = Some(buf.clone().into());
} else if !sub_buf.is_empty() {
last.value = Some("".into());
}
buf.clear();
if !sub_buf.is_empty() {
last.raw_value = Some(Atom::new(sub_buf.clone()));
sub_buf.clear();
}
last.span = Span::new(attribute_start_position, self.cur_pos);
}
}
}
}
fn emit_tag_token(&mut self) {
if let Some(current_tag_token) = self.current_token.take() {
self.attributes_validator.clear();
match ¤t_tag_token {
Token::StartTag { ref tag_name, .. } => {
self.last_start_tag_name = Some(tag_name.clone());
}
Token::EndTag {
ref is_self_closing,
ref attributes,
..
} => {
if !attributes.is_empty() {
self.emit_error(ErrorKind::EndTagWithAttributes);
}
if *is_self_closing {
self.emit_error(ErrorKind::EndTagWithTrailingSolidus);
}
}
_ => {
unreachable!();
}
}
self.emit_token(current_tag_token);
}
}
#[inline(always)]
fn create_comment_token(&mut self, raw_start: &str) {
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
sub_buf.push_str(raw_start);
}
#[inline(always)]
fn create_comment_token_with_cdata(&mut self) {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
buf.push_str("[CDATA[");
sub_buf.push_str("<!");
sub_buf.push_str("[CDATA[");
}
fn append_to_comment_token(&mut self, c: char, raw_c: char) {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
buf.push(c);
sub_buf.push(raw_c);
}
fn consume_and_append_to_comment_token<F>(&mut self, c: char, f: F)
where
F: Fn(char) -> bool,
{
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
let is_cr = c == '\r';
if is_cr {
buf.push('\n');
sub_buf.push(c);
if self.input.cur() == Some('\n') {
unsafe {
// Safety: cur() is Some('\n')
self.input.bump();
}
sub_buf.push('\n');
}
} else {
buf.push(c);
sub_buf.push(c);
}
let value = self.input.uncons_while(f);
buf.push_str(value);
sub_buf.push_str(value);
}
fn emit_comment_token(&mut self, raw_end: Option<&str>) {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
if let Some(raw_end) = raw_end {
sub_buf.push_str(raw_end);
}
self.emit_token(Token::Comment {
data: buf.clone().into(),
raw: Some(Atom::new(sub_buf.clone())),
});
buf.clear();
sub_buf.clear();
}
#[inline(always)]
fn emit_character_token(&mut self, value: char) {
self.emit_token(Token::Character {
value,
raw: Some(Raw::Same),
});
}
#[inline(always)]
fn emit_character_token_with_raw(&mut self, c: char, raw_c: char) {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
buf.push(raw_c);
self.emit_token(Token::Character {
value: c,
raw: Some(Raw::Atom(Atom::new(&**buf))),
});
buf.clear();
}
fn handle_raw_and_emit_character_token(&mut self, c: char) {
let is_cr = c == '\r';
if is_cr {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
buf.push(c);
if self.input.cur() == Some('\n') {
unsafe {
// Safety: cur() is Some('\n')
self.input.bump();
}
buf.push('\n');
}
self.emit_token(Token::Character {
value: '\n',
raw: Some(Raw::Atom(Atom::new(&**buf))),
});
buf.clear();
} else {
self.emit_token(Token::Character {
value: c,
raw: Some(Raw::Same),
});
}
}
fn read_token_and_span(&mut self) -> LexResult<TokenAndSpan> {
if self.finished {
return Err(ErrorKind::Eof);
} else {
while self.pending_tokens.is_empty() {
self.run()?;
}
}
let token_and_span = self.pending_tokens.pop_front().unwrap();
match token_and_span.token {
Token::Eof => {
self.finished = true;
return Err(ErrorKind::Eof);
}
_ => {
return Ok(token_and_span);
}
}
}
fn run(&mut self) -> LexResult<()> {
match self.state {
// https://html.spec.whatwg.org/multipage/parsing.html#data-state
State::Data => {
// Consume the next input character:
match self.consume_next_char() {
// U+0026 AMPERSAND (&)
// Set the return state to the data state. Switch to the character reference
// state.
Some('&') => {
self.return_state = State::Data;
self.state = State::CharacterReference;
}
// U+003C LESS-THAN SIGN (<)
// Switch to the tag open state.
Some('<') => {
self.state = State::TagOpen;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Emit the current input
// character as a character token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.emit_character_token(c);
}
// EOF
// Emit an end-of-file token.
None => {
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Emit the current input character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#rcdata-state
State::Rcdata => {
// Consume the next input character:
match self.consume_next_char() {
// U+0026 AMPERSAND (&)
// Set the return state to the RCDATA state. Switch to the character
// reference state.
Some('&') => {
self.return_state = State::Rcdata;
self.state = State::CharacterReference;
}
// U+003C LESS-THAN SIGN (<)
// Switch to the RCDATA less-than sign state.
Some('<') => {
self.state = State::RcdataLessThanSign;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Emit a U+FFFD
// REPLACEMENT CHARACTER character token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// Emit an end-of-file token.
None => {
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Emit the current input character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#rawtext-state
State::Rawtext => {
// Consume the next input character:
match self.consume_next_char() {
// U+003C LESS-THAN SIGN (<)
// Switch to the RAWTEXT less-than sign state.
Some('<') => self.state = State::RawtextLessThanSign,
// U+0000 NULL
// This is an unexpected-null-character parse error. Emit a U+FFFD
// REPLACEMENT CHARACTER character token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// Emit an end-of-file token.
None => {
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Emit the current input character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-state
State::ScriptData => {
// Consume the next input character:
match self.consume_next_char() {
// U+003C LESS-THAN SIGN (<)
// Switch to the script data less-than sign state.
Some('<') => self.state = State::ScriptDataLessThanSign,
// U+0000 NULL
// This is an unexpected-null-character parse error. Emit a U+FFFD
// REPLACEMENT CHARACTER character token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// Emit an end-of-file token.
None => {
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Emit the current input character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#plaintext-state
State::PlainText => {
// Consume the next input character:
match self.consume_next_char() {
// U+0000 NULL
// This is an unexpected-null-character parse error. Emit a U+FFFD
// REPLACEMENT CHARACTER character token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// Emit an end-of-file token.
None => {
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Emit the current input character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state
State::TagOpen => {
// Consume the next input character:
match self.consume_next_char() {
// U+002F SOLIDUS (/)
// Switch to the end tag open state.
Some('/') => {
self.state = State::EndTagOpen;
}
// U+0021 EXCLAMATION MARK (!)
// Switch to the markup declaration open state.
Some('!') => {
self.state = State::MarkupDeclarationOpen;
}
// ASCII alpha
// Create a new start tag token, set its tag name to the empty string.
// Reconsume in the tag name state.
Some(c) if is_ascii_alpha(c) => {
self.create_start_tag_token();
self.reconsume_in_state(State::TagName);
}
// U+003F QUESTION MARK (?)
// This is an unexpected-question-mark-instead-of-tag-name parse error.
// Create a comment token whose data is the empty string. Reconsume in the
// bogus comment state.
Some('?') => {
self.emit_error(ErrorKind::UnexpectedQuestionMarkInsteadOfTagName);
self.create_comment_token("<");
self.reconsume_in_state(State::BogusComment);
}
// EOF
// This is an eof-before-tag-name parse error. Emit a U+003C LESS-THAN SIGN
// character token and an end-of-file token.
None => {
self.emit_error(ErrorKind::EofBeforeTagName);
self.emit_character_token('<');
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is an invalid-first-character-of-tag-name parse error. Emit a U+003C
// LESS-THAN SIGN character token. Reconsume in the data state.
_ => {
self.emit_error(ErrorKind::InvalidFirstCharacterOfTagName);
self.emit_character_token('<');
self.reconsume_in_state(State::Data);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state
State::EndTagOpen => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII alpha
// Create a new end tag token, set its tag name to the empty string.
// Reconsume in the tag name state.
Some(c) if is_ascii_alpha(c) => {
self.create_end_tag_token();
self.reconsume_in_state(State::TagName);
}
// U+003E GREATER-THAN SIGN (>)
// This is a missing-end-tag-name parse error. Switch to the data state.
Some('>') => {
self.emit_error(ErrorKind::MissingEndTagName);
self.state = State::Data;
}
// EOF
// This is an eof-before-tag-name parse error. Emit a U+003C LESS-THAN SIGN
// character token, a U+002F SOLIDUS character token and an end-of-file
// token.
None => {
self.emit_error(ErrorKind::EofBeforeTagName);
self.emit_character_token('<');
self.emit_character_token('/');
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is an invalid-first-character-of-tag-name parse error. Create a
// comment token whose data is the empty string. Reconsume in the bogus
// comment state.
_ => {
self.emit_error(ErrorKind::InvalidFirstCharacterOfTagName);
self.create_comment_token("</");
self.reconsume_in_state(State::BogusComment);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#tag-name-state
State::TagName => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Switch to the before attribute name state.
Some(c) if is_spacy(c) => {
self.finish_tag_token_name();
self.skip_whitespaces(c);
self.state = State::BeforeAttributeName;
}
// U+002F SOLIDUS (/)
// Switch to the self-closing start tag state.
Some('/') => {
self.finish_tag_token_name();
self.state = State::SelfClosingStartTag;
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current tag token.
Some('>') => {
self.finish_tag_token_name();
self.state = State::Data;
self.emit_tag_token();
}
// ASCII upper alpha
// Append the lowercase version of the current input character (add 0x0020
// to the character's code point) to the current tag token's tag name.
Some(c) if is_ascii_upper_alpha(c) => {
self.consume_and_append_to_tag_token_name(c, is_ascii_upper_alpha);
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current tag token's tag name.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_tag_token_name(REPLACEMENT_CHARACTER, c);
}
// EOF
// This is an eof-in-tag parse error. Emit an end-of-file token.
None => {
self.finish_tag_token_name();
self.emit_error(ErrorKind::EofInTag);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the current tag token's tag name.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_tag_token_name(c, |c| {
if !is_allowed_character(c) {
return false;
}
// List of characters from above to stop consumption and a certain
// branch took control
!is_spacy(c)
&& !matches!(c, '/' | '>' | '\x00')
&& !is_ascii_upper_alpha(c)
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#rcdata-less-than-sign-state
State::RcdataLessThanSign => {
// Consume the next input character:
match self.consume_next_char() {
// U+002F SOLIDUS (/)
// Set the temporary buffer to the empty string. Switch to the RCDATA end
// tag open state.
Some('/') => {
self.temporary_buffer.clear();
self.state = State::RcdataEndTagOpen;
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token. Reconsume in the RCDATA
// state.
_ => {
self.emit_character_token('<');
self.reconsume_in_state(State::Rcdata);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#rcdata-end-tag-open-state
State::RcdataEndTagOpen => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII alpha
// Create a new end tag token, set its tag name to the empty string.
// Reconsume in the RCDATA end tag name state.
Some(c) if is_ascii_alpha(c) => {
self.create_end_tag_token();
self.reconsume_in_state(State::RcdataEndTagName);
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token and a U+002F SOLIDUS
// character token. Reconsume in the RCDATA state.
_ => {
self.emit_character_token('<');
self.emit_character_token('/');
self.reconsume_in_state(State::Rcdata);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#rcdata-end-tag-name-state
State::RcdataEndTagName => {
let anything_else = |lexer: &mut Lexer<I>| {
lexer.finish_tag_token_name();
lexer.emit_character_token('<');
lexer.emit_character_token('/');
lexer.emit_temporary_buffer_as_character_tokens();
lexer.reconsume_in_state(State::Rcdata);
};
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// If the current end tag token is an appropriate end tag token, then switch
// to the before attribute name state. Otherwise, treat it as per the
// "anything else" entry below.
Some(c) if is_spacy(c) => {
self.skip_whitespaces(c);
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::BeforeAttributeName;
} else {
anything_else(self);
}
}
// U+002F SOLIDUS (/)
// If the current end tag token is an appropriate end tag token, then switch
// to the self-closing start tag state. Otherwise, treat it as per the
// "anything else" entry below.
Some('/') => {
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::SelfClosingStartTag;
} else {
anything_else(self);
}
}
// U+003E GREATER-THAN SIGN (>)
// If the current end tag token is an appropriate end tag token, then switch
// to the data state and emit the current tag token. Otherwise, treat it as
// per the "anything else" entry below.
Some('>') => {
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::Data;
self.emit_tag_token();
} else {
anything_else(self);
}
}
// ASCII upper alpha
// Append the lowercase version of the current input character (add 0x0020
// to the character's code point) to the current tag token's tag name.
// Append the current input character to the temporary buffer.
Some(c) if is_ascii_upper_alpha(c) => {
self.consume_and_append_to_attribute_token_name_and_temp_buf(
c,
is_ascii_upper_alpha,
);
}
// ASCII lower alpha
// Append the current input character to the current tag token's tag name.
// Append the current input character to the temporary buffer.
Some(c) if is_ascii_lower_alpha(c) => {
self.consume_and_append_to_attribute_token_name_and_temp_buf(
c,
is_ascii_lower_alpha,
);
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS character
// token, and a character token for each of the characters in the temporary
// buffer (in the order they were added to the buffer). Reconsume in the
// RCDATA state.
_ => {
anything_else(self);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#rawtext-less-than-sign-state
State::RawtextLessThanSign => {
// Consume the next input character:
match self.consume_next_char() {
// U+002F SOLIDUS (/)
// Set the temporary buffer to the empty string. Switch to the RAWTEXT end
// tag open state.
Some('/') => {
self.temporary_buffer.clear();
self.state = State::RawtextEndTagOpen;
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token. Reconsume in the RAWTEXT
// state.
_ => {
self.emit_character_token('<');
self.reconsume_in_state(State::Rawtext);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#rawtext-end-tag-open-state
State::RawtextEndTagOpen => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII alpha
// Create a new end tag token, set its tag name to the empty string.
// Reconsume in the RAWTEXT end tag name state.
Some(c) if is_ascii_alpha(c) => {
self.create_end_tag_token();
self.reconsume_in_state(State::RawtextEndTagName);
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token and a U+002F SOLIDUS
// character token. Reconsume in the RAWTEXT state.
_ => {
self.emit_character_token('<');
self.emit_character_token('/');
self.reconsume_in_state(State::Rawtext);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#rawtext-end-tag-name-state
State::RawtextEndTagName => {
let anything_else = |lexer: &mut Lexer<I>| {
lexer.finish_tag_token_name();
lexer.emit_character_token('<');
lexer.emit_character_token('/');
lexer.emit_temporary_buffer_as_character_tokens();
lexer.reconsume_in_state(State::Rawtext);
};
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// If the current end tag token is an appropriate end tag token, then switch
// to the before attribute name state. Otherwise, treat it as per the
// "anything else" entry below.
Some(c) if is_spacy(c) => {
self.skip_whitespaces(c);
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::BeforeAttributeName;
} else {
anything_else(self);
}
}
// U+002F SOLIDUS (/)
// If the current end tag token is an appropriate end tag token, then switch
// to the self-closing start tag state. Otherwise, treat it as per the
// "anything else" entry below.
Some('/') => {
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::SelfClosingStartTag;
} else {
anything_else(self);
}
}
// U+003E GREATER-THAN SIGN (>)
// If the current end tag token is an appropriate end tag token, then switch
// to the data state and emit the current tag token. Otherwise, treat it as
// per the "anything else" entry below.
Some('>') => {
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::Data;
self.emit_tag_token();
} else {
anything_else(self);
}
}
// ASCII upper alpha
// Append the lowercase version of the current input character (add 0x0020
// to the character's code point) to the current tag token's tag name.
// Append the current input character to the temporary buffer.
Some(c) if is_ascii_upper_alpha(c) => {
self.consume_and_append_to_attribute_token_name_and_temp_buf(
c,
is_ascii_upper_alpha,
);
}
// ASCII lower alpha
// Append the current input character to the current tag token's tag name.
// Append the current input character to the temporary buffer.
Some(c) if is_ascii_lower_alpha(c) => {
self.consume_and_append_to_attribute_token_name_and_temp_buf(
c,
is_ascii_lower_alpha,
);
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS character
// token, and a character token for each of the characters in the temporary
// buffer (in the order they were added to the buffer). Reconsume in the
// RAWTEXT state.
_ => {
anything_else(self);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-less-than-sign-state
State::ScriptDataLessThanSign => {
// Consume the next input character:
match self.consume_next_char() {
// U+002F SOLIDUS (/)
// Set the temporary buffer to the empty string. Switch to the script data
// end tag open state.
Some('/') => {
self.temporary_buffer.clear();
self.state = State::ScriptDataEndTagOpen;
}
// U+0021 EXCLAMATION MARK (!)
// Switch to the script data escape start state. Emit a U+003C LESS-THAN
// SIGN character token and a U+0021 EXCLAMATION MARK character token.
Some('!') => {
self.state = State::ScriptDataEscapeStart;
self.emit_character_token('<');
self.emit_character_token('!');
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token. Reconsume in the script
// data state.
_ => {
self.emit_character_token('<');
self.reconsume_in_state(State::ScriptData);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-open-state
State::ScriptDataEndTagOpen => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII alpha
// Create a new end tag token, set its tag name to the empty string.
// Reconsume in the script data end tag name state.
Some(c) if is_ascii_alpha(c) => {
self.create_end_tag_token();
self.reconsume_in_state(State::ScriptDataEndTagName);
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token and a U+002F SOLIDUS
// character token. Reconsume in the script data state.
_ => {
self.emit_character_token('<');
self.emit_character_token('/');
self.reconsume_in_state(State::ScriptData);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state
State::ScriptDataEndTagName => {
let anything_else = |lexer: &mut Lexer<I>| {
lexer.finish_tag_token_name();
lexer.emit_character_token('<');
lexer.emit_character_token('/');
lexer.emit_temporary_buffer_as_character_tokens();
lexer.reconsume_in_state(State::ScriptData);
};
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// If the current end tag token is an appropriate end tag token, then switch
// to the before attribute name state. Otherwise, treat it as per the
// "anything else" entry below.
Some(c) if is_spacy(c) => {
self.skip_whitespaces(c);
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::BeforeAttributeName;
} else {
anything_else(self);
}
}
// U+002F SOLIDUS (/)
// If the current end tag token is an appropriate end tag token, then switch
// to the self-closing start tag state. Otherwise, treat it as per the
// "anything else" entry below.
Some('/') => {
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::SelfClosingStartTag;
} else {
anything_else(self);
}
}
// U+003E GREATER-THAN SIGN (>)
// If the current end tag token is an appropriate end tag token, then switch
// to the data state and emit the current tag token. Otherwise, treat it as
// per the "anything else" entry below.
Some('>') => {
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::Data;
self.emit_tag_token();
} else {
anything_else(self);
}
}
// ASCII upper alpha
// Append the lowercase version of the current input character (add 0x0020
// to the character's code point) to the current tag token's tag name.
// Append the current input character to the temporary buffer.
Some(c) if is_ascii_upper_alpha(c) => {
self.consume_and_append_to_attribute_token_name_and_temp_buf(
c,
is_ascii_upper_alpha,
);
}
// ASCII lower alpha
// Append the current input character to the current tag token's tag name.
// Append the current input character to the temporary buffer.
Some(c) if is_ascii_lower_alpha(c) => {
self.consume_and_append_to_attribute_token_name_and_temp_buf(
c,
is_ascii_lower_alpha,
);
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS character
// token, and a character token for each of the characters in the temporary
// buffer (in the order they were added to the buffer). Reconsume in the
// script data state.
_ => {
anything_else(self);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-escape-start-state
State::ScriptDataEscapeStart => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the script data escape start dash state. Emit a U+002D
// HYPHEN-MINUS character token.
Some(c @ '-') => {
self.state = State::ScriptDataEscapeStartDash;
self.emit_character_token(c);
}
// Anything else
// Reconsume in the script data state.
_ => {
self.reconsume_in_state(State::ScriptData);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-escape-start-dash-state
State::ScriptDataEscapeStartDash => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the script data escaped dash dash state. Emit a U+002D
// HYPHEN-MINUS character token.
Some(c @ '-') => {
self.state = State::ScriptDataEscapedDashDash;
self.emit_character_token(c);
}
// Anything else
// Reconsume in the script data state.
_ => {
self.reconsume_in_state(State::ScriptData);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-state
State::ScriptDataEscaped => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the script data escaped dash state. Emit a U+002D HYPHEN-MINUS
// character token.
Some(c @ '-') => {
self.state = State::ScriptDataEscapedDash;
self.emit_character_token(c);
}
// U+003C LESS-THAN SIGN (<)
// Switch to the script data escaped less-than sign state.
Some('<') => {
self.state = State::ScriptDataEscapedLessThanSign;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Emit a U+FFFD
// REPLACEMENT CHARACTER character token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// This is an eof-in-script-html-comment-like-text parse error. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInScriptHtmlCommentLikeText);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Emit the current input character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-dash-state
State::ScriptDataEscapedDash => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the script data escaped dash dash state. Emit a U+002D
// HYPHEN-MINUS character token.
Some(c @ '-') => {
self.state = State::ScriptDataEscapedDashDash;
self.emit_character_token(c);
}
// U+003C LESS-THAN SIGN (<)
// Switch to the script data escaped less-than sign state.
Some('<') => {
self.state = State::ScriptDataEscapedLessThanSign;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Switch to the script
// data escaped state. Emit a U+FFFD REPLACEMENT CHARACTER character token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.state = State::ScriptDataEscaped;
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// This is an eof-in-script-html-comment-like-text parse error. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInScriptHtmlCommentLikeText);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Switch to the script data escaped state. Emit the current input character
// as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.state = State::ScriptDataEscaped;
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-dash-dash-state
State::ScriptDataEscapedDashDash => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Emit a U+002D HYPHEN-MINUS character token.
Some(c @ '-') => {
self.emit_character_token(c);
}
// U+003C LESS-THAN SIGN (<)
// Switch to the script data escaped less-than sign state.
Some('<') => {
self.state = State::ScriptDataEscapedLessThanSign;
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the script data state. Emit a U+003E GREATER-THAN SIGN
// character token.
Some(c @ '>') => {
self.state = State::ScriptData;
self.emit_character_token(c);
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Switch to the script
// data escaped state. Emit a U+FFFD REPLACEMENT CHARACTER character token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.state = State::ScriptDataEscaped;
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// This is an eof-in-script-html-comment-like-text parse error. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInScriptHtmlCommentLikeText);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Switch to the script data escaped state. Emit the current input character
// as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.state = State::ScriptDataEscaped;
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-less-than-sign-state
State::ScriptDataEscapedLessThanSign => {
// Consume the next input character:
match self.consume_next_char() {
// U+002F SOLIDUS (/)
// Set the temporary buffer to the empty string. Switch to the script data
// escaped end tag open state.
Some('/') => {
self.temporary_buffer.clear();
self.state = State::ScriptDataEscapedEndTagOpen;
}
// ASCII alpha
// Set the temporary buffer to the empty string. Emit a U+003C LESS-THAN
// SIGN character token. Reconsume in the script data double escape start
// state.
Some(c) if is_ascii_alpha(c) => {
self.temporary_buffer.clear();
self.emit_character_token('<');
self.reconsume_in_state(State::ScriptDataDoubleEscapeStart);
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token. Reconsume in the script
// data escaped state.
_ => {
self.emit_character_token('<');
self.reconsume_in_state(State::ScriptDataEscaped);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-open-state
State::ScriptDataEscapedEndTagOpen => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII alpha
// Create a new end tag token, set its tag name to the empty string.
// Reconsume in the script data escaped end tag name state.
Some(c) if is_ascii_alpha(c) => {
self.create_end_tag_token();
self.reconsume_in_state(State::ScriptDataEscapedEndTagName);
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token and a U+002F SOLIDUS
// character token. Reconsume in the script data escaped state.
_ => {
self.emit_character_token('<');
self.emit_character_token('/');
self.reconsume_in_state(State::ScriptDataEscaped);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state
State::ScriptDataEscapedEndTagName => {
let anything_else = |lexer: &mut Lexer<I>| {
lexer.finish_tag_token_name();
lexer.emit_character_token('<');
lexer.emit_character_token('/');
lexer.emit_temporary_buffer_as_character_tokens();
lexer.reconsume_in_state(State::ScriptDataEscaped);
};
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// If the current end tag token is an appropriate end tag token, then switch
// to the before attribute name state. Otherwise, treat it as per the
// "anything else" entry below.
Some(c) if is_spacy(c) => {
self.skip_whitespaces(c);
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::BeforeAttributeName;
} else {
anything_else(self);
}
}
// U+002F SOLIDUS (/)
// If the current end tag token is an appropriate end tag token, then switch
// to the self-closing start tag state. Otherwise, treat it as per the
// "anything else" entry below.
Some('/') => {
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::SelfClosingStartTag;
} else {
anything_else(self);
}
}
// U+003E GREATER-THAN SIGN (>)
// If the current end tag token is an appropriate end tag token, then switch
// to the data state and emit the current tag token. Otherwise, treat it as
// per the "anything else" entry below.
Some('>') => {
if self.current_end_tag_token_is_an_appropriate_end_tag_token() {
self.finish_tag_token_name();
self.state = State::Data;
self.emit_tag_token();
} else {
anything_else(self);
}
}
// ASCII upper alpha
// Append the lowercase version of the current input character (add 0x0020
// to the character's code point) to the current tag token's tag name.
// Append the current input character to the temporary buffer.
Some(c) if is_ascii_upper_alpha(c) => {
self.consume_and_append_to_attribute_token_name_and_temp_buf(
c,
is_ascii_upper_alpha,
);
}
// ASCII lower alpha
// Append the current input character to the current tag token's tag name.
// Append the current input character to the temporary buffer.
Some(c) if is_ascii_lower_alpha(c) => {
self.consume_and_append_to_attribute_token_name_and_temp_buf(
c,
is_ascii_lower_alpha,
);
}
// Anything else
// Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS character
// token, and a character token for each of the characters in the temporary
// buffer (in the order they were added to the buffer). Reconsume in the
// script data escaped state.
_ => {
anything_else(self);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state
State::ScriptDataDoubleEscapeStart => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// U+002F SOLIDUS (/)
// U+003E GREATER-THAN SIGN (>)
// If the temporary buffer is the string "script", then switch to the script
// data double escaped state. Otherwise, switch to the script data escaped
// state. Emit the current input character as a character token.
Some(c) if is_spacy(c) => {
let is_script = self.temporary_buffer == "script";
if is_script {
self.state = State::ScriptDataDoubleEscaped;
} else {
self.state = State::ScriptDataEscaped;
}
self.handle_raw_and_emit_character_token(c);
}
Some(c @ '/' | c @ '>') => {
let is_script = self.temporary_buffer == "script";
if is_script {
self.state = State::ScriptDataDoubleEscaped;
} else {
self.state = State::ScriptDataEscaped;
}
self.emit_character_token(c);
}
// ASCII upper alpha
// Append the lowercase version of the current input character (add 0x0020
// to the character's code point) to the temporary buffer. Emit the current
// input character as a character token.
Some(c) if is_ascii_upper_alpha(c) => {
self.temporary_buffer.push(c.to_ascii_lowercase());
self.emit_character_token(c);
}
// ASCII lower alpha
// Append the current input character to the temporary buffer. Emit the
// current input character as a character token.
Some(c) if is_ascii_lower_alpha(c) => {
self.temporary_buffer.push(c);
self.emit_character_token(c);
}
// Anything else
// Reconsume in the script data escaped state.
_ => {
self.reconsume_in_state(State::ScriptDataEscaped);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escaped-state
State::ScriptDataDoubleEscaped => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the script data double escaped dash state. Emit a U+002D
// HYPHEN-MINUS character token.
Some(c @ '-') => {
self.state = State::ScriptDataDoubleEscapedDash;
self.emit_character_token(c);
}
// U+003C LESS-THAN SIGN (<)
// Switch to the script data double escaped less-than sign state. Emit a
// U+003C LESS-THAN SIGN character token.
Some(c @ '<') => {
self.state = State::ScriptDataDoubleEscapedLessThanSign;
self.emit_character_token(c);
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Emit a U+FFFD
// REPLACEMENT CHARACTER character token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// This is an eof-in-script-html-comment-like-text parse error. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInScriptHtmlCommentLikeText);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Emit the current input character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escaped-dash-state
State::ScriptDataDoubleEscapedDash => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the script data double escaped dash dash state. Emit a U+002D
// HYPHEN-MINUS character token.
Some(c @ '-') => {
self.state = State::ScriptDataDoubleEscapedDashDash;
self.emit_character_token(c);
}
// U+003C LESS-THAN SIGN (<)
// Switch to the script data double escaped less-than sign state. Emit a
// U+003C LESS-THAN SIGN character token.
Some(c @ '<') => {
self.state = State::ScriptDataDoubleEscapedLessThanSign;
self.emit_character_token(c);
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Switch to the script
// data double escaped state. Emit a U+FFFD REPLACEMENT CHARACTER character
// token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.state = State::ScriptDataDoubleEscaped;
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// This is an eof-in-script-html-comment-like-text parse error. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInScriptHtmlCommentLikeText);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Switch to the script data double escaped state. Emit the current input
// character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.state = State::ScriptDataDoubleEscaped;
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escaped-dash-dash-state
State::ScriptDataDoubleEscapedDashDash => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Emit a U+002D HYPHEN-MINUS character token.
Some(c @ '-') => {
self.emit_character_token(c);
}
// U+003C LESS-THAN SIGN (<)
// Switch to the script data double escaped less-than sign state. Emit a
// U+003C LESS-THAN SIGN character token.
Some(c @ '<') => {
self.state = State::ScriptDataDoubleEscapedLessThanSign;
self.emit_character_token(c);
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the script data state. Emit a U+003E GREATER-THAN SIGN
// character token.
Some(c @ '>') => {
self.state = State::ScriptData;
self.emit_character_token(c);
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Switch to the script
// data double escaped state. Emit a U+FFFD REPLACEMENT CHARACTER character
// token.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.state = State::ScriptDataDoubleEscaped;
self.emit_character_token_with_raw(REPLACEMENT_CHARACTER, c);
}
// EOF
// This is an eof-in-script-html-comment-like-text parse error. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInScriptHtmlCommentLikeText);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Switch to the script data double escaped state. Emit the current input
// character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.state = State::ScriptDataDoubleEscaped;
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escaped-less-than-sign-state
State::ScriptDataDoubleEscapedLessThanSign => {
// Consume the next input character:
match self.consume_next_char() {
// U+002F SOLIDUS (/)
// Set the temporary buffer to the empty string. Switch to the script data
// double escape end state. Emit a U+002F SOLIDUS character token.
Some(c @ '/') => {
self.temporary_buffer.clear();
self.state = State::ScriptDataDoubleEscapeEnd;
self.emit_character_token(c);
}
// Anything else
// Reconsume in the script data double escaped state.
_ => {
self.reconsume_in_state(State::ScriptDataDoubleEscaped);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state
State::ScriptDataDoubleEscapeEnd => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// U+002F SOLIDUS (/)
// U+003E GREATER-THAN SIGN (>)
// If the temporary buffer is the string "script", then switch to the script
// data escaped state. Otherwise, switch to the script data double escaped
// state. Emit the current input character as a character token.
Some(c) if is_spacy(c) => {
let is_script = self.temporary_buffer == "script";
if is_script {
self.state = State::ScriptDataEscaped;
} else {
self.state = State::ScriptDataDoubleEscaped;
}
self.handle_raw_and_emit_character_token(c);
}
Some(c @ '/' | c @ '>') => {
let is_script = self.temporary_buffer == "script";
if is_script {
self.state = State::ScriptDataEscaped;
} else {
self.state = State::ScriptDataDoubleEscaped;
}
self.emit_character_token(c);
}
// ASCII upper alpha
// Append the lowercase version of the current input character (add 0x0020
// to the character's code point) to the temporary buffer. Emit the current
// input character as a character token.
Some(c) if is_ascii_upper_alpha(c) => {
self.temporary_buffer.push(c.to_ascii_lowercase());
self.emit_character_token(c);
}
// ASCII lower alpha
// Append the current input character to the temporary buffer. Emit the
// current input character as a character token.
Some(c) if is_ascii_lower_alpha(c) => {
self.temporary_buffer.push(c);
self.emit_character_token(c);
}
// Anything else
// Reconsume in the script data double escaped state.
_ => {
self.reconsume_in_state(State::ScriptDataDoubleEscaped);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state
State::BeforeAttributeName => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Ignore the character.
Some(c) if is_spacy(c) => {
self.skip_whitespaces(c);
}
// U+002F SOLIDUS (/)
// U+003E GREATER-THAN SIGN (>)
// EOF
// Reconsume in the after attribute name state.
Some('/') | Some('>') | None => {
self.reconsume_in_state(State::AfterAttributeName);
}
// U+003D EQUALS SIGN (=)
// This is an unexpected-equals-sign-before-attribute-name parse error.
// Start a new attribute in the current tag token. Set that attribute's name
// to the current input character, and its value to the empty string. Switch
// to the attribute name state.
// We set `None` for `value` to support boolean attributes in AST
Some(c @ '=') => {
self.emit_error(ErrorKind::UnexpectedEqualsSignBeforeAttributeName);
self.start_new_attribute_token();
self.append_to_attribute_token_name(c, c);
self.state = State::AttributeName;
}
// Anything else
// Start a new attribute in the current tag token. Set that attribute name
// and value to the empty string. Reconsume in the attribute name state.
// We set `None` for `value` to support boolean attributes in AST
_ => {
self.start_new_attribute_token();
self.reconsume_in_state(State::AttributeName);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#attribute-name-state
State::AttributeName => {
let anything_else = |lexer: &mut Lexer<I>, c: char| {
lexer.append_to_attribute_token_name(c, c);
};
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// U+002F SOLIDUS (/)
// U+003E GREATER-THAN SIGN (>)
// EOF
// Reconsume in the after attribute name state.
Some(c) if is_spacy(c) => {
self.finish_attribute_token_name();
self.skip_whitespaces(c);
self.reconsume_in_state(State::AfterAttributeName);
}
Some('/' | '>') | None => {
self.finish_attribute_token_name();
self.reconsume_in_state(State::AfterAttributeName);
}
// U+003D EQUALS SIGN (=)
// Switch to the before attribute value state.
Some('=') => {
self.finish_attribute_token_name();
self.state = State::BeforeAttributeValue;
}
// ASCII upper alpha
// Append the lowercase version of the current input character (add 0x0020
// to the character's code point) to the current attribute's name.
Some(c) if is_ascii_upper_alpha(c) => {
self.consume_and_append_to_attribute_token_name(c, |c| {
is_ascii_upper_alpha(c)
});
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current attribute's name.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_attribute_token_name(REPLACEMENT_CHARACTER, c);
}
// U+0022 QUOTATION MARK (")
// U+0027 APOSTROPHE (')
// U+003C LESS-THAN SIGN (<)
// This is an unexpected-character-in-attribute-name parse error. Treat it
// as per the "anything else" entry below.
Some(c @ '"') | Some(c @ '\'') | Some(c @ '<') => {
self.emit_error(ErrorKind::UnexpectedCharacterInAttributeName);
anything_else(self, c);
}
// Anything else
// Append the current input character to the current attribute's name.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_attribute_token_name(c, |c| {
if !is_allowed_character(c) {
return false;
}
// List of characters from above to stop consumption and a certain
// branch took control
!is_spacy(c)
&& !matches!(c, '/' | '>' | '=' | '\x00' | '"' | '\'' | '<')
&& !is_ascii_upper_alpha(c)
});
}
}
// When the user agent leaves the attribute name state (and
// before emitting the tag token, if appropriate), the
// complete attribute's name must be compared to the other
// attributes on the same token; if there is already an
// attribute on the token with the exact same name, then
// this is a duplicate-attribute parse error and the new
// attribute must be removed from the token.
//
// We postpone it when we will emit current tag token
}
// https://html.spec.whatwg.org/multipage/parsing.html#after-attribute-name-state
State::AfterAttributeName => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Ignore the character.
Some(c) if is_spacy(c) => {
self.skip_whitespaces(c);
}
// U+002F SOLIDUS (/)
// Switch to the self-closing start tag state.
Some('/') => {
self.state = State::SelfClosingStartTag;
}
// U+003D EQUALS SIGN (=)
// Switch to the before attribute value state.
Some('=') => {
self.state = State::BeforeAttributeValue;
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current tag token.
Some('>') => {
self.state = State::Data;
self.emit_tag_token();
}
// EOF
// This is an eof-in-tag parse error. Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInTag);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Start a new attribute in the current tag token. Set that attribute name
// and value to the empty string. Reconsume in the attribute name state.
// We set `None` for `value` to support boolean attributes in AST
_ => {
self.start_new_attribute_token();
self.reconsume_in_state(State::AttributeName);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#before-attribute-value-state
State::BeforeAttributeValue => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Ignore the character.
Some(c) if is_spacy(c) => {
self.skip_whitespaces(c);
}
// U+0022 QUOTATION MARK (")
// Switch to the attribute value (double-quoted) state.
Some(c @ '"') => {
self.append_to_attribute_token_value(None, Some(c));
self.state = State::AttributeValueDoubleQuoted;
}
// U+0027 APOSTROPHE (')
// Switch to the attribute value (single-quoted) state.
Some(c @ '\'') => {
self.append_to_attribute_token_value(None, Some(c));
self.state = State::AttributeValueSingleQuoted;
}
// U+003E GREATER-THAN SIGN (>)
// This is a missing-attribute-value parse error. Switch to the data state.
// Emit the current tag token.
Some('>') => {
self.emit_error(ErrorKind::MissingAttributeValue);
self.state = State::Data;
self.emit_tag_token();
}
// Anything else
// Reconsume in the attribute value (unquoted) state.
_ => {
self.reconsume_in_state(State::AttributeValueUnquoted);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#attribute-value-(double-quoted)-state
State::AttributeValueDoubleQuoted => {
// Consume the next input character:
match self.consume_next_char() {
// U+0022 QUOTATION MARK (")
// Switch to the after attribute value (quoted) state.
// We set value to support empty attributes (i.e. `attr=""`)
Some(c @ '"') => {
self.append_to_attribute_token_value(None, Some(c));
self.state = State::AfterAttributeValueQuoted;
}
// U+0026 AMPERSAND (&)
// Set the return state to the attribute value (double-quoted) state. Switch
// to the character reference state.
Some('&') => {
self.return_state = State::AttributeValueDoubleQuoted;
self.state = State::CharacterReference;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current attribute's value.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_attribute_token_value(Some(REPLACEMENT_CHARACTER), Some(c));
}
// EOF
// This is an eof-in-tag parse error. Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInTag);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the current attribute's value.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_attribute_token_value(c, |c| {
if !is_allowed_character(c) {
return false;
}
// List of characters from above to stop consumption and a certain
// branch took control, `\r` is in list because of newline normalization
!matches!(c, '"' | '&' | '\x00' | '\r')
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#attribute-value-(single-quoted)-state
State::AttributeValueSingleQuoted => {
// Consume the next input character:
match self.consume_next_char() {
// U+0027 APOSTROPHE (')
// Switch to the after attribute value (quoted) state.
// We set value to support empty attributes (i.e. `attr=''`)
Some(c @ '\'') => {
self.append_to_attribute_token_value(None, Some(c));
self.state = State::AfterAttributeValueQuoted;
}
// U+0026 AMPERSAND (&)
// Set the return state to the attribute value (single-quoted) state. Switch
// to the character reference state.
Some('&') => {
self.return_state = State::AttributeValueSingleQuoted;
self.state = State::CharacterReference;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current attribute's value.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_attribute_token_value(Some(REPLACEMENT_CHARACTER), Some(c));
}
// EOF
// This is an eof-in-tag parse error. Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInTag);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the current attribute's value.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_attribute_token_value(c, |c| {
if !is_allowed_character(c) {
return false;
}
// List of characters from above to stop consumption and a certain
// branch took control, `\r` is in list because of newline normalization
!matches!(c, '\'' | '&' | '\x00' | '\r')
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#attribute-value-(unquoted)-state
State::AttributeValueUnquoted => {
let anything_else = |lexer: &mut Lexer<I>, c: char| {
lexer.append_to_attribute_token_value(Some(c), Some(c));
};
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Switch to the before attribute name state.
Some(c) if is_spacy(c) => {
self.finish_attribute_token_value();
self.skip_whitespaces(c);
self.state = State::BeforeAttributeName;
}
// U+0026 AMPERSAND (&)
// Set the return state to the attribute value (unquoted) state. Switch to
// the character reference state.
Some('&') => {
self.return_state = State::AttributeValueUnquoted;
self.state = State::CharacterReference;
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current tag token.
Some('>') => {
self.finish_attribute_token_value();
self.state = State::Data;
self.emit_tag_token();
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current attribute's value.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_attribute_token_value(Some(REPLACEMENT_CHARACTER), Some(c));
}
// U+0022 QUOTATION MARK (")
// U+0027 APOSTROPHE (')
// U+003C LESS-THAN SIGN (<)
// U+003D EQUALS SIGN (=)
// U+0060 GRAVE ACCENT (`)
// This is an unexpected-character-in-unquoted-attribute-value parse error.
// Treat it as per the "anything else" entry below.
Some(c @ '"') | Some(c @ '\'') | Some(c @ '<') | Some(c @ '=')
| Some(c @ '`') => {
self.emit_error(ErrorKind::UnexpectedCharacterInUnquotedAttributeValue);
anything_else(self, c);
}
// EOF
// This is an eof-in-tag parse error. Emit an end-of-file token.
None => {
self.finish_attribute_token_value();
self.emit_error(ErrorKind::EofInTag);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the current attribute's value.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_attribute_token_value(c, |c| {
if !is_allowed_character(c) {
return false;
}
// List of characters from above to stop consumption and a certain
// branch took control, `\r` is in list because of newline normalization
!is_spacy(c)
&& !matches!(
c,
'&' | '>' | '\x00' | '"' | '\'' | '<' | '=' | '`' | '\r'
)
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#after-attribute-value-(quoted)-state
State::AfterAttributeValueQuoted => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Switch to the before attribute name state.
Some(c) if is_spacy(c) => {
self.finish_attribute_token_value();
self.skip_whitespaces(c);
self.state = State::BeforeAttributeName;
}
// U+002F SOLIDUS (/)
// Switch to the self-closing start tag state.
Some('/') => {
self.finish_attribute_token_value();
self.state = State::SelfClosingStartTag;
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current tag token.
Some('>') => {
self.finish_attribute_token_value();
self.state = State::Data;
self.emit_tag_token();
}
// EOF
// This is an eof-in-tag parse error. Emit an end-of-file token.
None => {
self.finish_attribute_token_value();
self.emit_error(ErrorKind::EofInTag);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is a missing-whitespace-between-attributes parse error. Reconsume in
// the before attribute name state.
_ => {
self.finish_attribute_token_value();
self.emit_error(ErrorKind::MissingWhitespaceBetweenAttributes);
self.reconsume_in_state(State::BeforeAttributeName);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#self-closing-start-tag-state
State::SelfClosingStartTag => {
// Consume the next input character:
match self.consume_next_char() {
// U+003E GREATER-THAN SIGN (>)
// Set the self-closing flag of the current tag token. Switch to the data
// state. Emit the current tag token.
Some('>') => {
if let Some(
Token::StartTag {
is_self_closing, ..
}
| Token::EndTag {
is_self_closing, ..
},
) = &mut self.current_token
{
*is_self_closing = true;
}
self.state = State::Data;
self.emit_tag_token();
}
// EOF
// This is an eof-in-tag parse error. Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInTag);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is an unexpected-solidus-in-tag parse error. Reconsume in the before
// attribute name state.
_ => {
self.emit_error(ErrorKind::UnexpectedSolidusInTag);
self.reconsume_in_state(State::BeforeAttributeName);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#bogus-comment-state
State::BogusComment => {
// Consume the next input character:
match self.consume_next_char() {
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current comment token.
Some('>') => {
self.state = State::Data;
self.emit_comment_token(Some(">"));
}
// EOF
// Emit the comment. Emit an end-of-file token.
None => {
self.emit_comment_token(None);
self.emit_token(Token::Eof);
return Ok(());
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the comment token's data.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_comment_token(REPLACEMENT_CHARACTER, c);
}
// Anything else
// Append the current input character to the comment token's data.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_comment_token(c, |c| {
if !is_allowed_character(c) {
return false;
}
// List of characters from above to stop consumption and a certain
// branch took control, `\r` is in list because of newline normalization
!matches!(c, '>' | '\x00' | '\r')
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state
State::MarkupDeclarationOpen => {
let cur_pos = self.input.cur_pos();
let anything_else = |lexer: &mut Lexer<I>| {
lexer.emit_error(ErrorKind::IncorrectlyOpenedComment);
lexer.create_comment_token("<!");
lexer.state = State::BogusComment;
lexer.cur_pos = cur_pos;
// We don't validate input here because we reset position
unsafe {
// Safety: We reset position to the previous one
lexer.input.reset_to(cur_pos);
}
};
// If the next few characters are:
match self.consume_next_char() {
// Two U+002D HYPHEN-MINUS characters (-)
// Consume those two characters, create a comment token whose data
// is the empty string, and switch to the comment start state.
Some('-') => match self.consume_next_char() {
Some('-') => {
self.create_comment_token("<!--");
self.state = State::CommentStart;
}
_ => {
anything_else(self);
}
},
// ASCII case-insensitive match for the word "DOCTYPE"
// Consume those characters and switch to the DOCTYPE state.
Some(d @ 'd' | d @ 'D') => match self.consume_next_char() {
Some(o @ 'o' | o @ 'O') => match self.consume_next_char() {
Some(c @ 'c' | c @ 'C') => match self.consume_next_char() {
Some(t @ 't' | t @ 'T') => match self.consume_next_char() {
Some(y @ 'y' | y @ 'Y') => match self.consume_next_char() {
Some(p @ 'p' | p @ 'P') => match self.consume_next_char() {
Some(e @ 'e' | e @ 'E') => {
self.state = State::Doctype;
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
sub_buf.push('<');
sub_buf.push('!');
sub_buf.push(d);
sub_buf.push(o);
sub_buf.push(c);
sub_buf.push(t);
sub_buf.push(y);
sub_buf.push(p);
sub_buf.push(e);
}
_ => {
anything_else(self);
}
},
_ => {
anything_else(self);
}
},
_ => {
anything_else(self);
}
},
_ => {
anything_else(self);
}
},
_ => {
anything_else(self);
}
},
_ => {
anything_else(self);
}
},
// The string "[CDATA[" (the five uppercase letters "CDATA" with a
// U+005B LEFT SQUARE BRACKET character before and after)
// Consume those characters. If there is an adjusted current node and it
// is not an element in the HTML namespace, then switch to the CDATA
// section state. Otherwise, this is a cdata-in-html-content parse
// error. Create a comment token whose data is the "[CDATA[" string.
// Switch to the bogus comment state.
Some('[') => match self.consume_next_char() {
Some('C') => match self.consume_next_char() {
Some('D') => match self.consume_next_char() {
Some('A') => match self.consume_next_char() {
Some('T') => match self.consume_next_char() {
Some('A') => match self.consume_next_char() {
Some('[') => {
if let Some(false) = self.is_adjusted_current_node_is_element_in_html_namespace {
self.state = State::CdataSection;
} else {
self.emit_error(
ErrorKind::CdataInHtmlContent,
);
self.create_comment_token_with_cdata();
self.state = State::BogusComment;
}
}
_ => {
anything_else(self);
}
}
_ => {
anything_else(self);
}
},
_ => {
anything_else(self);
}
},
_ => {
anything_else(self);
}
}
_ => {
anything_else(self);
}
}
_ => {
anything_else(self);
}
}
// Anything else
// This is an incorrectly-opened-comment parse error. Create a comment token
// whose data is the empty string. Switch to the bogus comment state (don't
// consume anything in the current state).
_ => {
anything_else(self);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-start-state
State::CommentStart => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the comment start dash state.
Some('-') => {
self.state = State::CommentStartDash;
}
// U+003E GREATER-THAN SIGN (>)
// This is an abrupt-closing-of-empty-comment parse error. Switch to the
// data state. Emit the current comment token.
Some('>') => {
self.emit_error(ErrorKind::AbruptClosingOfEmptyComment);
self.state = State::Data;
self.emit_comment_token(Some(">"));
}
// Anything else
// Reconsume in the comment state.
_ => {
self.reconsume_in_state(State::Comment);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-start-dash-state
State::CommentStartDash => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the comment end state.
Some('-') => {
self.state = State::CommentEnd;
}
// U+003E GREATER-THAN SIGN (>)
// This is an abrupt-closing-of-empty-comment parse error. Switch to the
// data state. Emit the current comment token.
Some('>') => {
self.emit_error(ErrorKind::AbruptClosingOfEmptyComment);
self.state = State::Data;
self.emit_comment_token(Some("->"));
}
// EOF
// This is an eof-in-comment parse error. Emit the current comment token.
// Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInComment);
self.emit_comment_token(None);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append a U+002D HYPHEN-MINUS character (-) to the comment token's data.
// Reconsume in the comment state.
_ => {
self.append_to_comment_token('-', '-');
self.reconsume_in_state(State::Comment);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-state
State::Comment => {
// Consume the next input character:
match self.consume_next_char() {
// U+003C LESS-THAN SIGN (<)
// Append the current input character to the comment token's data. Switch to
// the comment less-than sign state.
Some(c @ '<') => {
self.append_to_comment_token(c, c);
self.state = State::CommentLessThanSign;
}
// U+002D HYPHEN-MINUS (-)
// Switch to the comment end dash state.
Some('-') => {
self.state = State::CommentEndDash;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the comment token's data.
Some(c @ '\x00') => {
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_comment_token(REPLACEMENT_CHARACTER, c);
}
// EOF
// This is an eof-in-comment parse error. Emit the current comment token.
// Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInComment);
self.emit_comment_token(None);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the comment token's data.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_comment_token(c, |c| {
if !is_allowed_character(c) {
return false;
}
// List of characters from above to stop consumption and a certain
// branch took control, `\r` is in list because of newline normalization
!matches!(c, '<' | '-' | '\x00' | '\r')
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-less-than-sign-state
State::CommentLessThanSign => {
// Consume the next input character:
match self.consume_next_char() {
// U+0021 EXCLAMATION MARK (!)
// Append the current input character to the comment token's data. Switch to
// the comment less-than sign bang state.
Some(c @ '!') => {
self.append_to_comment_token(c, c);
self.state = State::CommentLessThanSignBang;
}
// U+003C LESS-THAN SIGN (<)
// Append the current input character to the comment token's data.
Some(c @ '<') => {
self.append_to_comment_token(c, c);
}
// Anything else
// Reconsume in the comment state.
_ => {
self.reconsume_in_state(State::Comment);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-less-than-sign-bang-state
State::CommentLessThanSignBang => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the comment less-than sign bang dash state.
Some('-') => {
self.state = State::CommentLessThanSignBangDash;
}
// Anything else
// Reconsume in the comment state.
_ => {
self.reconsume_in_state(State::Comment);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-less-than-sign-bang-dash-state
State::CommentLessThanSignBangDash => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the comment less-than sign bang dash dash state.
Some('-') => {
self.state = State::CommentLessThanSignBangDashDash;
}
// Anything else
// Reconsume in the comment end dash state.
_ => {
self.reconsume_in_state(State::CommentEndDash);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-less-than-sign-bang-dash-dash-state
State::CommentLessThanSignBangDashDash => {
// Consume the next input character:
match self.consume_next_char() {
// U+003E GREATER-THAN SIGN (>)
// EOF
// Reconsume in the comment end state.
Some('>') | None => {
self.reconsume_in_state(State::CommentEnd);
}
// Anything else
// This is a nested-comment parse error. Reconsume in the comment end state.
_ => {
self.emit_error(ErrorKind::NestedComment);
self.reconsume_in_state(State::CommentEnd);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-end-dash-state
State::CommentEndDash => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Switch to the comment end state.
Some('-') => {
self.state = State::CommentEnd;
}
// EOF
// This is an eof-in-comment parse error. Emit the current comment token.
// Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInComment);
self.emit_comment_token(None);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append a U+002D HYPHEN-MINUS character (-) to the comment token's data.
// Reconsume in the comment state.
_ => {
self.append_to_comment_token('-', '-');
self.reconsume_in_state(State::Comment);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-end-state
State::CommentEnd => {
// Consume the next input character:
match self.consume_next_char() {
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current comment token.
Some('>') => {
self.state = State::Data;
self.emit_comment_token(Some("-->"));
}
// U+0021 EXCLAMATION MARK (!)
// Switch to the comment end bang state.
Some('!') => {
self.state = State::CommentEndBang;
}
// U+002D HYPHEN-MINUS (-)
// Append a U+002D HYPHEN-MINUS character (-) to the comment token's data.
Some(c @ '-') => {
self.append_to_comment_token(c, c);
}
// EOF
// This is an eof-in-comment parse error. Emit the current comment token.
// Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInComment);
self.emit_comment_token(None);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append two U+002D HYPHEN-MINUS characters (-) to the comment token's
// data. Reconsume in the comment state.
_ => {
self.append_to_comment_token('-', '-');
self.append_to_comment_token('-', '-');
self.reconsume_in_state(State::Comment);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#comment-end-bang-state
State::CommentEndBang => {
// Consume the next input character:
match self.consume_next_char() {
// U+002D HYPHEN-MINUS (-)
// Append two U+002D HYPHEN-MINUS characters (-) and a U+0021 EXCLAMATION
// MARK character (!) to the comment token's data. Switch to the comment end
// dash state.
Some(c @ '-') => {
self.append_to_comment_token(c, c);
self.append_to_comment_token('-', '-');
self.append_to_comment_token('!', '!');
self.state = State::CommentEndDash;
}
// U+003E GREATER-THAN SIGN (>)
// This is an incorrectly-closed-comment parse error. Switch to the data
// state. Emit the current comment token.
Some('>') => {
self.emit_error(ErrorKind::IncorrectlyClosedComment);
self.state = State::Data;
self.emit_comment_token(Some(">"));
}
// EOF
// This is an eof-in-comment parse error. Emit the current comment token.
// Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInComment);
self.emit_comment_token(None);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append two U+002D HYPHEN-MINUS characters (-) and a U+0021 EXCLAMATION
// MARK character (!) to the comment token's data. Reconsume in the comment
// state.
_ => {
self.append_to_comment_token('-', '-');
self.append_to_comment_token('-', '-');
self.append_to_comment_token('!', '!');
self.reconsume_in_state(State::Comment);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#doctype-state
State::Doctype => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Switch to the before DOCTYPE name state.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
self.state = State::BeforeDoctypeName;
}
// U+003E GREATER-THAN SIGN (>)
// Reconsume in the before DOCTYPE name state.
Some('>') => {
self.reconsume_in_state(State::BeforeDoctypeName);
}
// EOF
// This is an eof-in-doctype parse error. Create a new DOCTYPE token. Set
// its force-quirks flag to on. Emit the current token. Emit an end-of-file
// token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.create_doctype_token();
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is a missing-whitespace-before-doctype-name parse error. Reconsume
// in the before DOCTYPE name state.
_ => {
self.emit_error(ErrorKind::MissingWhitespaceBeforeDoctypeName);
self.reconsume_in_state(State::BeforeDoctypeName);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#before-doctype-name-state
State::BeforeDoctypeName => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Ignore the character.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
}
// ASCII upper alpha
// Create a new DOCTYPE token. Set the token's name to the lowercase version
// of the current input character (add 0x0020 to the character's code
// point). Switch to the DOCTYPE name state.
Some(c) if is_ascii_upper_alpha(c) => {
self.append_raw_to_doctype_token(c);
self.create_doctype_token();
self.set_doctype_token_name(c.to_ascii_lowercase());
self.state = State::DoctypeName;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Create a new DOCTYPE
// token. Set the token's name to a U+FFFD REPLACEMENT CHARACTER character.
// Switch to the DOCTYPE name state.
Some(c @ '\x00') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.create_doctype_token();
self.set_doctype_token_name(REPLACEMENT_CHARACTER);
self.state = State::DoctypeName;
}
// U+003E GREATER-THAN SIGN (>)
// This is a missing-doctype-name parse error. Create a new DOCTYPE token.
// Set its force-quirks flag to on. Switch to the data state. Emit the
// current token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::MissingDoctypeName);
self.create_doctype_token();
self.set_doctype_token_force_quirks();
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Create a new DOCTYPE token. Set
// its force-quirks flag to on. Emit the current token. Emit an end-of-file
// token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.create_doctype_token();
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Create a new DOCTYPE token. Set the token's name to the current input
// character. Switch to the DOCTYPE name state.
Some(c) => {
self.validate_input_stream_character(c);
self.append_raw_to_doctype_token(c);
self.create_doctype_token();
self.set_doctype_token_name(c);
self.state = State::DoctypeName;
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#doctype-name-state
State::DoctypeName => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Switch to the after DOCTYPE name state.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
self.finish_doctype_token_name();
self.state = State::AfterDoctypeName;
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.finish_doctype_token_name();
self.state = State::Data;
self.emit_doctype_token();
}
// ASCII upper alpha
// Append the lowercase version of the current input character (add 0x0020
// to the character's code point) to the current DOCTYPE token's name.
Some(c) if is_ascii_upper_alpha(c) => {
self.consume_and_append_to_doctype_token_name(c, is_ascii_upper_alpha);
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current DOCTYPE token's name.
Some(c @ '\x00') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_doctype_token(Some(REPLACEMENT_CHARACTER), None, None);
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.finish_doctype_token_name();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the current DOCTYPE token's name.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_doctype_token_name(c, |c| {
if !is_allowed_character(c) {
return false;
}
!is_spacy(c) && !matches!(c, '>' | '\x00') && !is_ascii_upper_alpha(c)
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#after-doctype-name-state
State::AfterDoctypeName => {
let cur_pos = self.input.cur_pos();
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Ignore the character.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// If the six characters starting from the current input character are an
// ASCII case-insensitive match for the word "PUBLIC", then consume those
// characters and switch to the after DOCTYPE public keyword state.
//
// Otherwise, if the six characters starting from the current input
// character are an ASCII case-insensitive match for the word "SYSTEM", then
// consume those characters and switch to the after DOCTYPE system keyword
// state.
//
// Otherwise, this is an invalid-character-sequence-after-doctype-name parse
// error. Set the current DOCTYPE token's force-quirks flag to on. Reconsume
// in the bogus DOCTYPE state.
Some(c) => {
let b = self.buf.clone();
let mut buf = b.borrow_mut();
buf.push(c);
for _ in 0..5 {
match self.consume_next_char() {
Some(c) => {
buf.push(c);
}
_ => {
break;
}
}
}
match &*buf.to_lowercase() {
"public" => {
self.state = State::AfterDoctypePublicKeyword;
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
sub_buf.push_str(&buf);
buf.clear();
}
"system" => {
self.state = State::AfterDoctypeSystemKeyword;
let b = self.sub_buf.clone();
let mut sub_buf = b.borrow_mut();
sub_buf.push_str(&buf);
buf.clear();
}
_ => {
buf.clear();
self.cur_pos = cur_pos;
unsafe {
// Safety: We got cur_pos from self.input.cur_pos() above, so
// it's a valid position.
self.input.reset_to(cur_pos);
}
self.emit_error(
ErrorKind::InvalidCharacterSequenceAfterDoctypeName,
);
self.set_doctype_token_force_quirks();
self.reconsume_in_state(State::BogusDoctype);
}
}
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#after-doctype-public-keyword-state
State::AfterDoctypePublicKeyword => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Switch to the before DOCTYPE public identifier state.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
self.state = State::BeforeDoctypePublicIdentifier;
}
// U+0022 QUOTATION MARK (")
// This is a missing-whitespace-after-doctype-public-keyword parse error.
// Set the current DOCTYPE token's public identifier to the empty string
// (not missing), then switch to the DOCTYPE public identifier
// (double-quoted) state.
Some(c @ '"') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::MissingWhitespaceAfterDoctypePublicKeyword);
self.set_doctype_token_public_id();
self.state = State::DoctypePublicIdentifierDoubleQuoted;
}
// U+0027 APOSTROPHE (')
// This is a missing-whitespace-after-doctype-public-keyword parse error.
// Set the current DOCTYPE token's public identifier to the empty string
// (not missing), then switch to the DOCTYPE public identifier
// (single-quoted) state.
Some(c @ '\'') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::MissingWhitespaceAfterDoctypePublicKeyword);
self.set_doctype_token_public_id();
self.state = State::DoctypePublicIdentifierSingleQuoted;
}
// U+003E GREATER-THAN SIGN (>)
// This is a missing-doctype-public-identifier parse error. Set the current
// DOCTYPE token's force-quirks flag to on. Switch to the data state. Emit
// the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::MissingDoctypePublicIdentifier);
self.set_doctype_token_force_quirks();
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is a missing-quote-before-doctype-public-identifier parse error. Set
// the current DOCTYPE token's force-quirks flag to on. Reconsume in the
// bogus DOCTYPE state.
_ => {
self.emit_error(ErrorKind::MissingQuoteBeforeDoctypePublicIdentifier);
self.set_doctype_token_force_quirks();
self.reconsume_in_state(State::BogusDoctype);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#before-doctype-public-identifier-state
State::BeforeDoctypePublicIdentifier => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Ignore the character.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
}
// U+0022 QUOTATION MARK (")
// Set the current DOCTYPE token's public identifier to the empty string
// (not missing), then switch to the DOCTYPE public identifier
// (double-quoted) state.
Some(c @ '"') => {
self.append_raw_to_doctype_token(c);
self.set_doctype_token_public_id();
self.state = State::DoctypePublicIdentifierDoubleQuoted;
}
// U+0027 APOSTROPHE (')
// Set the current DOCTYPE token's public identifier to the empty string
// (not missing), then switch to the DOCTYPE public identifier
// (single-quoted) state.
Some(c @ '\'') => {
self.append_raw_to_doctype_token(c);
self.set_doctype_token_public_id();
self.state = State::DoctypePublicIdentifierSingleQuoted;
}
// U+003E GREATER-THAN SIGN (>)
// This is a missing-doctype-public-identifier parse error. Set the current
// DOCTYPE token's force-quirks flag to on. Switch to the data state. Emit
// the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::MissingDoctypePublicIdentifier);
self.set_doctype_token_force_quirks();
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is a missing-quote-before-doctype-public-identifier parse error. Set
// the current DOCTYPE token's force-quirks flag to on. Reconsume in the
// bogus DOCTYPE state.
_ => {
self.emit_error(ErrorKind::MissingQuoteBeforeDoctypePublicIdentifier);
self.set_doctype_token_force_quirks();
self.reconsume_in_state(State::BogusDoctype);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#doctype-public-identifier-(double-quoted)-state
State::DoctypePublicIdentifierDoubleQuoted => {
// Consume the next input character:
match self.consume_next_char() {
// U+0022 QUOTATION MARK (")
// Switch to the after DOCTYPE public identifier state.
Some(c @ '"') => {
self.append_raw_to_doctype_token(c);
self.finish_doctype_token_public_id();
self.state = State::AfterDoctypePublicIdentifier;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current DOCTYPE token's public
// identifier.
Some(c @ '\x00') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_doctype_token(None, Some(REPLACEMENT_CHARACTER), None);
}
// U+003E GREATER-THAN SIGN (>)
// This is an abrupt-doctype-public-identifier parse error. Set the current
// DOCTYPE token's force-quirks flag to on. Switch to the data state. Emit
// the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.finish_doctype_token_public_id();
self.emit_error(ErrorKind::AbruptDoctypePublicIdentifier);
self.set_doctype_token_force_quirks();
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.finish_doctype_token_public_id();
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the current DOCTYPE token's public
// identifier.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_doctype_token_public_id(c, |c| {
if !is_allowed_character(c) {
return false;
}
!matches!(c, '"' | '\x00' | '>' | '\r')
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#doctype-public-identifier-(single-quoted)-state
State::DoctypePublicIdentifierSingleQuoted => {
// Consume the next input character:
match self.consume_next_char() {
// U+0027 APOSTROPHE (')
// Switch to the after DOCTYPE public identifier state.
Some(c @ '\'') => {
self.finish_doctype_token_public_id();
self.append_raw_to_doctype_token(c);
self.state = State::AfterDoctypePublicIdentifier;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current DOCTYPE token's public
// identifier.
Some(c @ '\x00') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_doctype_token(None, Some(REPLACEMENT_CHARACTER), None);
}
// U+003E GREATER-THAN SIGN (>)
// This is an abrupt-doctype-public-identifier parse error. Set the current
// DOCTYPE token's force-quirks flag to on. Switch to the data state. Emit
// the current DOCTYPE token.
Some(c @ '>') => {
self.finish_doctype_token_public_id();
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::AbruptDoctypePublicIdentifier);
self.set_doctype_token_force_quirks();
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.finish_doctype_token_public_id();
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the current DOCTYPE token's public
// identifier.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_doctype_token_public_id(c, |c| {
if !is_allowed_character(c) {
return false;
}
!matches!(c, '\'' | '\x00' | '>' | '\r')
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#after-doctype-public-identifier-state
State::AfterDoctypePublicIdentifier => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Switch to the between DOCTYPE public and system identifiers state.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
self.state = State::BetweenDoctypePublicAndSystemIdentifiers;
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.state = State::Data;
self.emit_doctype_token();
}
// U+0022 QUOTATION MARK (")
// This is a missing-whitespace-between-doctype-public-and-system-identifiers
// parse error. Set the current DOCTYPE token's system
// identifier to the empty string (not missing), then switch
// to the DOCTYPE system identifier (double-quoted) state.
Some(c @ '"') => {
self.append_raw_to_doctype_token(c);
self.emit_error(
ErrorKind::MissingWhitespaceBetweenDoctypePublicAndSystemIdentifiers,
);
self.set_doctype_token_system_id();
self.state = State::DoctypeSystemIdentifierDoubleQuoted;
}
// U+0027 APOSTROPHE (')
// This is a missing-whitespace-between-doctype-public-and-system-identifiers
// parse error. Set the current DOCTYPE token's system
// identifier to the empty string (not missing), then switch
// to the DOCTYPE system identifier (single-quoted) state.
Some(c @ '\'') => {
self.append_raw_to_doctype_token(c);
self.emit_error(
ErrorKind::MissingWhitespaceBetweenDoctypePublicAndSystemIdentifiers,
);
self.set_doctype_token_system_id();
self.state = State::DoctypeSystemIdentifierSingleQuoted;
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is a missing-quote-before-doctype-system-identifier parse error. Set
// the current DOCTYPE token's force-quirks flag to on. Reconsume in the
// bogus DOCTYPE state.
_ => {
self.emit_error(ErrorKind::MissingQuoteBeforeDoctypeSystemIdentifier);
self.set_doctype_token_force_quirks();
self.reconsume_in_state(State::BogusDoctype);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#between-doctype-public-and-system-identifiers-state
State::BetweenDoctypePublicAndSystemIdentifiers => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Ignore the character.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.state = State::Data;
self.emit_doctype_token();
}
// U+0022 QUOTATION MARK (")
// Set the current DOCTYPE token's system identifier to the empty string
// (not missing), then switch to the DOCTYPE system identifier
// (double-quoted) state.
Some(c @ '"') => {
self.append_raw_to_doctype_token(c);
self.set_doctype_token_system_id();
self.state = State::DoctypeSystemIdentifierDoubleQuoted;
}
// U+0027 APOSTROPHE (')
// Set the current DOCTYPE token's system identifier to the empty string
// (not missing), then switch to the DOCTYPE system identifier
// (single-quoted) state.
Some(c @ '\'') => {
self.append_raw_to_doctype_token(c);
self.set_doctype_token_system_id();
self.state = State::DoctypeSystemIdentifierSingleQuoted;
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is a missing-quote-before-doctype-system-identifier parse error. Set
// the current DOCTYPE token's force-quirks flag to on. Reconsume in the
// bogus DOCTYPE state
_ => {
self.emit_error(ErrorKind::MissingQuoteBeforeDoctypeSystemIdentifier);
self.set_doctype_token_force_quirks();
self.reconsume_in_state(State::BogusDoctype);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#after-doctype-system-keyword-state
State::AfterDoctypeSystemKeyword => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Switch to the before DOCTYPE system identifier state.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
self.state = State::BeforeDoctypeSystemIdentifier;
}
// U+0022 QUOTATION MARK (")
// This is a missing-whitespace-after-doctype-system-keyword parse error.
// Set the current DOCTYPE token's system identifier to the empty string
// (not missing), then switch to the DOCTYPE system identifier
// (double-quoted) state.
Some(c @ '"') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::MissingWhitespaceAfterDoctypeSystemKeyword);
self.set_doctype_token_system_id();
self.state = State::DoctypeSystemIdentifierDoubleQuoted;
}
// U+0027 APOSTROPHE (')
// This is a missing-whitespace-after-doctype-system-keyword parse error.
// Set the current DOCTYPE token's system identifier to the empty string
// (not missing), then switch to the DOCTYPE system identifier
// (single-quoted) state.
Some(c @ '\'') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::MissingWhitespaceAfterDoctypeSystemKeyword);
self.set_doctype_token_system_id();
self.state = State::DoctypeSystemIdentifierSingleQuoted;
}
// U+003E GREATER-THAN SIGN (>)
// This is a missing-doctype-system-identifier parse error. Set the current
// DOCTYPE token's force-quirks flag to on. Switch to the data state. Emit
// the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::MissingDoctypeSystemIdentifier);
self.set_doctype_token_force_quirks();
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is a missing-quote-before-doctype-system-identifier parse error. Set
// the current DOCTYPE token's force-quirks flag to on. Reconsume in the
// bogus DOCTYPE state.
_ => {
self.emit_error(ErrorKind::MissingQuoteBeforeDoctypeSystemIdentifier);
self.set_doctype_token_force_quirks();
self.reconsume_in_state(State::BogusDoctype);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#before-doctype-system-identifier-state
State::BeforeDoctypeSystemIdentifier => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Ignore the character.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
}
// U+0022 QUOTATION MARK (")
// Set the current DOCTYPE token's system identifier to the empty string
// (not missing), then switch to the DOCTYPE system identifier
// (double-quoted) state.
Some(c @ '"') => {
self.append_raw_to_doctype_token(c);
self.set_doctype_token_system_id();
self.state = State::DoctypeSystemIdentifierDoubleQuoted;
}
// U+0027 APOSTROPHE (')
// Set the current DOCTYPE token's system identifier to the empty string
// (not missing), then switch to the DOCTYPE system identifier
// (single-quoted) state.
Some(c @ '\'') => {
self.append_raw_to_doctype_token(c);
self.set_doctype_token_system_id();
self.state = State::DoctypeSystemIdentifierSingleQuoted;
}
// U+003E GREATER-THAN SIGN (>)
// This is a missing-doctype-system-identifier parse error. Set the current
// DOCTYPE token's force-quirks flag to on. Switch to the data state. Emit
// the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is a missing-quote-before-doctype-system-identifier parse error. Set
// the current DOCTYPE token's force-quirks flag to on. Reconsume in the
// bogus DOCTYPE state.
_ => {
self.emit_error(ErrorKind::MissingQuoteBeforeDoctypeSystemIdentifier);
self.set_doctype_token_force_quirks();
self.reconsume_in_state(State::BogusDoctype);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#doctype-system-identifier-(double-quoted)-state
State::DoctypeSystemIdentifierDoubleQuoted => {
// Consume the next input character:
match self.consume_next_char() {
// U+0027 APOSTROPHE (')
// Switch to the after DOCTYPE system identifier state.
Some(c @ '"') => {
self.finish_doctype_token_system_id();
self.append_raw_to_doctype_token(c);
self.state = State::AfterDoctypeSystemIdentifier;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current DOCTYPE token's system
// identifier.
Some(c @ '\x00') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_doctype_token(None, None, Some(REPLACEMENT_CHARACTER));
}
// U+003E GREATER-THAN SIGN (>)
// This is an abrupt-doctype-system-identifier parse error. Set the current
// DOCTYPE token's force-quirks flag to on. Switch to the data state. Emit
// the current DOCTYPE token.
Some(c @ '>') => {
self.finish_doctype_token_system_id();
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::AbruptDoctypeSystemIdentifier);
self.set_doctype_token_force_quirks();
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.finish_doctype_token_system_id();
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the current DOCTYPE token's system
// identifier.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_doctype_token_system_id(c, |c| {
if !is_allowed_character(c) {
return false;
}
!matches!(c, '"' | '\x00' | '>' | '\r')
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#doctype-system-identifier-(single-quoted)-state
State::DoctypeSystemIdentifierSingleQuoted => {
// Consume the next input character:
match self.consume_next_char() {
// U+0027 APOSTROPHE (')
// Switch to the after DOCTYPE system identifier state.
Some(c @ '\'') => {
self.finish_doctype_token_system_id();
self.append_raw_to_doctype_token(c);
self.state = State::AfterDoctypeSystemIdentifier;
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Append a U+FFFD
// REPLACEMENT CHARACTER character to the current DOCTYPE token's system
// identifier.
Some(c @ '\x00') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::UnexpectedNullCharacter);
self.append_to_doctype_token(None, None, Some(REPLACEMENT_CHARACTER));
}
// U+003E GREATER-THAN SIGN (>)
// This is an abrupt-doctype-system-identifier parse error. Set the current
// DOCTYPE token's force-quirks flag to on. Switch to the data state. Emit
// the current DOCTYPE token.
Some(c @ '>') => {
self.finish_doctype_token_system_id();
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::AbruptDoctypeSystemIdentifier);
self.set_doctype_token_force_quirks();
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.finish_doctype_token_system_id();
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Append the current input character to the current DOCTYPE token's system
// identifier.
Some(c) => {
self.validate_input_stream_character(c);
self.consume_and_append_to_doctype_token_system_id(c, |c| {
if !is_allowed_character(c) {
return false;
}
!matches!(c, '\'' | '\x00' | '>' | '\r')
});
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#after-doctype-system-identifier-state
State::AfterDoctypeSystemIdentifier => {
// Consume the next input character:
match self.consume_next_char() {
// U+0009 CHARACTER TABULATION (tab)
// U+000A LINE FEED (LF)
// U+000C FORM FEED (FF)
// U+0020 SPACE
// Ignore the character.
Some(c) if is_spacy(c) => {
self.append_raw_to_doctype_token(c);
}
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the current DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.state = State::Data;
self.emit_doctype_token();
}
// EOF
// This is an eof-in-doctype parse error. Set the current DOCTYPE token's
// force-quirks flag to on. Emit the current DOCTYPE token. Emit an
// end-of-file token.
None => {
self.emit_error(ErrorKind::EofInDoctype);
self.set_doctype_token_force_quirks();
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// This is an unexpected-character-after-doctype-system-identifier parse
// error. Reconsume in the bogus DOCTYPE state. (This does not set the
// current DOCTYPE token's force-quirks flag to on.)
_ => {
self.emit_error(ErrorKind::UnexpectedCharacterAfterDoctypeSystemIdentifier);
self.reconsume_in_state(State::BogusDoctype);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#bogus-doctype-state
State::BogusDoctype => {
// Consume the next input character:
match self.consume_next_char() {
// U+003E GREATER-THAN SIGN (>)
// Switch to the data state. Emit the DOCTYPE token.
Some(c @ '>') => {
self.append_raw_to_doctype_token(c);
self.state = State::Data;
self.emit_doctype_token();
}
// U+0000 NULL
// This is an unexpected-null-character parse error. Ignore the character.
Some(c @ '\x00') => {
self.append_raw_to_doctype_token(c);
self.emit_error(ErrorKind::UnexpectedNullCharacter);
}
// EOF
// Emit the DOCTYPE token. Emit an end-of-file token.
None => {
self.emit_doctype_token();
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Ignore the character.
Some(c) => {
self.validate_input_stream_character(c);
self.append_raw_to_doctype_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#cdata-section-state
State::CdataSection => {
// Consume the next input character:
match self.consume_next_char() {
// U+005D RIGHT SQUARE BRACKET (])
// Switch to the CDATA section bracket state.
Some(']') => {
self.state = State::CdataSectionBracket;
}
// EOF
// This is an eof-in-cdata parse error. Emit an end-of-file token.
None => {
self.emit_error(ErrorKind::EofInCdata);
self.emit_token(Token::Eof);
return Ok(());
}
// Anything else
// Emit the current input character as a character token.
Some(c) => {
self.validate_input_stream_character(c);
self.handle_raw_and_emit_character_token(c);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#cdata-section-bracket-state
State::CdataSectionBracket => {
// Consume the next input character:
match self.consume_next_char() {
// U+005D RIGHT SQUARE BRACKET (])
// Switch to the CDATA section end state.
Some(']') => {
self.state = State::CdataSectionEnd;
}
// Anything else
// Emit a U+005D RIGHT SQUARE BRACKET character token. Reconsume in the
// CDATA section state.
_ => {
self.emit_character_token(']');
self.reconsume_in_state(State::CdataSection);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#cdata-section-end-state
State::CdataSectionEnd => {
// Consume the next input character:
match self.consume_next_char() {
// U+005D RIGHT SQUARE BRACKET (])
// Emit a U+005D RIGHT SQUARE BRACKET character token.
Some(c @ ']') => {
self.emit_character_token_with_raw(']', c);
}
// U+003E GREATER-THAN SIGN character
// Switch to the data state.
Some('>') => {
self.state = State::Data;
}
// Anything else
// Emit two U+005D RIGHT SQUARE BRACKET character tokens. Reconsume in the
// CDATA section state.
_ => {
self.emit_character_token(']');
self.emit_character_token(']');
self.reconsume_in_state(State::CdataSection);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#character-reference-state
State::CharacterReference => {
// Set the temporary buffer to the empty string. Append a U+0026 AMPERSAND (&)
// character to the temporary buffer.
self.temporary_buffer.clear();
self.temporary_buffer.push('&');
// Consume the next input character:
match self.consume_next_char() {
// ASCII alphanumeric
// Reconsume in the named character reference state.
Some(c) if c.is_ascii_alphanumeric() => {
self.reconsume_in_state(State::NamedCharacterReference);
}
// U+0023 NUMBER SIGN (#)
// Append the current input character to the temporary buffer. Switch to the
// numeric character reference state.
Some(c @ '#') => {
self.temporary_buffer.push(c);
self.state = State::NumericCharacterReference;
}
// Anything else
// Flush code points consumed as a character reference. Reconsume in the
// return state.
_ => {
self.flush_code_points_consumed_as_character_reference(None);
self.reconsume_in_state(self.return_state.clone());
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
State::NamedCharacterReference => {
// Consume the maximum number of characters possible, where the consumed
// characters are one of the identifiers in the first column of the named
// character references table. Append each character to the temporary buffer
// when it's consumed.
// The shortest entity - `>`
// The longest entity - `∳`
let initial_cur_pos = self.input.cur_pos();
let mut entity: Option<&Entity> = None;
let mut entity_cur_pos: Option<BytePos> = None;
let mut entity_temporary_buffer =
String::with_capacity(self.temporary_buffer.capacity());
entity_temporary_buffer.push_str(&self.temporary_buffer);
// No need to validate input, because we reset position if nothing was found
while let Some(c) = &self.consume_next_char() {
entity_temporary_buffer.push(*c);
if let Some(found_entity) = HTML_ENTITIES.get(&entity_temporary_buffer) {
entity = Some(found_entity);
entity_cur_pos = Some(self.input.cur_pos());
self.temporary_buffer
.replace_range(1.., &entity_temporary_buffer[1..]);
} else {
// We stop when:
//
// - not ascii alphanumeric
// - we consume more characters than the longest entity
if !c.is_ascii_alphanumeric() || entity_temporary_buffer.len() > 32 {
break;
}
}
}
if entity.is_some() {
self.cur_pos = entity_cur_pos.unwrap();
unsafe {
// Safety: We got entity_cur_pos from the input, so it's valid
self.input.reset_to(entity_cur_pos.unwrap());
}
} else {
self.cur_pos = initial_cur_pos;
unsafe {
// Safety: We got initial_cur_pos from the input, so it's valid
self.input.reset_to(initial_cur_pos);
}
}
let is_last_semicolon = self.temporary_buffer.ends_with(';');
// If there is a match
match entity {
Some(entity) => {
let is_next_equals_sign_or_ascii_alphanumeric = match self.next() {
Some('=') => true,
Some(c) if c.is_ascii_alphanumeric() => true,
_ => false,
};
// If the character reference was consumed as part of an attribute, and
// the last character matched is not a
// U+003B SEMICOLON character (;), and the next input
// character is either a U+003D EQUALS SIGN character (=) or an ASCII
// alphanumeric, then, for historical reasons, flush code points
// consumed as a character reference and
// switch to the return state.
if self.is_consumed_as_part_of_an_attribute()
&& !is_last_semicolon
&& is_next_equals_sign_or_ascii_alphanumeric
{
self.flush_code_points_consumed_as_character_reference(None);
self.state = self.return_state.clone();
}
// Otherwise:
//
// If the last character matched is not a U+003B SEMICOLON character
// (;), then this is a missing-semicolon-after-character-reference parse
// error.
//
// Set the temporary buffer to the empty string. Append one or two
// characters corresponding to the character reference name (as given by
// the second column of the named character references table) to the
// temporary buffer.
//
// Flush code points consumed as a character reference. Switch to the
// return state.
else {
if !is_last_semicolon {
self.emit_error(ErrorKind::MissingSemicolonAfterCharacterReference);
}
let old_temporary_buffer = self.temporary_buffer.clone();
self.temporary_buffer.clear();
self.temporary_buffer.push_str(&entity.characters);
self.flush_code_points_consumed_as_character_reference(Some(
old_temporary_buffer,
));
self.state = self.return_state.clone();
}
}
// Otherwise
// Flush code points consumed as a character reference. Switch to the
// ambiguous ampersand state.
_ => {
self.flush_code_points_consumed_as_character_reference(None);
self.state = State::AmbiguousAmpersand;
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#ambiguous-ampersand-state
State::AmbiguousAmpersand => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII alphanumeric
// If the character reference was consumed as part of an attribute, then
// append the current input character to the current attribute's value.
// Otherwise, emit the current input character as a character token.
Some(c) if c.is_ascii_alphanumeric() => {
if self.is_consumed_as_part_of_an_attribute() {
self.append_to_attribute_token_value(Some(c), Some(c));
} else {
self.emit_character_token(c);
}
}
// U+003B SEMICOLON (;)
// This is an unknown-named-character-reference parse error. Reconsume in
// the return state.
Some(';') => {
self.emit_error(ErrorKind::UnknownNamedCharacterReference);
self.reconsume_in_state(self.return_state.clone());
}
// Anything else
// Reconsume in the return state.
_ => {
self.reconsume_in_state(self.return_state.clone());
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-state
State::NumericCharacterReference => {
self.character_reference_code = Some(vec![(0, 0, None)]);
// Consume the next input character:
match self.consume_next_char() {
// U+0078 LATIN SMALL LETTER X
// U+0058 LATIN CAPITAL LETTER X
// Append the current input character to the temporary buffer. Switch to the
// hexadecimal character reference start state.
Some(c @ 'x' | c @ 'X') => {
self.temporary_buffer.push(c);
self.state = State::HexademicalCharacterReferenceStart;
}
// Anything else
// Reconsume in the decimal character reference start state.
_ => {
self.reconsume_in_state(State::DecimalCharacterReferenceStart);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#hexadecimal-character-reference-start-state
State::HexademicalCharacterReferenceStart => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII hex digit
// Reconsume in the hexadecimal character reference state.
Some(c) if is_ascii_hex_digit(c) => {
self.reconsume_in_state(State::HexademicalCharacterReference);
}
// Anything else
// This is an absence-of-digits-in-numeric-character-reference parse error.
// Flush code points consumed as a character reference. Reconsume in the
// return state.
_ => {
self.emit_error(ErrorKind::AbsenceOfDigitsInNumericCharacterReference);
self.flush_code_points_consumed_as_character_reference(None);
self.reconsume_in_state(self.return_state.clone());
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#decimal-character-reference-start-state
State::DecimalCharacterReferenceStart => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII digit
// Reconsume in the decimal character reference state.
Some(c) if c.is_ascii_digit() => {
self.reconsume_in_state(State::DecimalCharacterReference);
}
// Anything else
// This is an absence-of-digits-in-numeric-character-reference parse error.
// Flush code points consumed as a character reference. Reconsume in the
// return state.
_ => {
self.emit_error(ErrorKind::AbsenceOfDigitsInNumericCharacterReference);
self.flush_code_points_consumed_as_character_reference(None);
self.reconsume_in_state(self.return_state.clone());
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#hexadecimal-character-reference-state
State::HexademicalCharacterReference => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII digit
// Multiply the character reference code by 16. Add a numeric version of the
// current input character (subtract 0x0030 from the character's code point)
// to the character reference code.
Some(c) if c.is_ascii_digit() => match &mut self.character_reference_code {
Some(character_reference_code) => {
character_reference_code.push((16, c as u32 - 0x30, Some(c)));
}
_ => {
unreachable!();
}
},
// ASCII upper hex digit
// Multiply the character reference code by 16. Add a numeric version of the
// current input character as a hexadecimal digit (subtract 0x0037 from the
// character's code point) to the character reference code.
Some(c) if is_upper_hex_digit(c) => match &mut self.character_reference_code {
Some(character_reference_code) => {
character_reference_code.push((16, c as u32 - 0x37, Some(c)));
}
_ => {
unreachable!();
}
},
// ASCII lower hex digit
// Multiply the character reference code by 16. Add a numeric version of the
// current input character as a hexadecimal digit (subtract 0x0057 from the
// character's code point) to the character reference code.
Some(c) if is_lower_hex_digit(c) => match &mut self.character_reference_code {
Some(character_reference_code) => {
character_reference_code.push((16, c as u32 - 0x57, Some(c)));
}
_ => {
unreachable!();
}
},
// U+003B SEMICOLON
// Switch to the numeric character reference end state.
Some(';') => {
self.state = State::NumericCharacterReferenceEnd;
}
// Anything else
// This is a missing-semicolon-after-character-reference parse error.
// Reconsume in the numeric character reference end state.
_ => {
self.emit_error(ErrorKind::MissingSemicolonAfterCharacterReference);
self.reconsume_in_state(State::NumericCharacterReferenceEnd);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#decimal-character-reference-state
State::DecimalCharacterReference => {
// Consume the next input character:
match self.consume_next_char() {
// ASCII digit
// Multiply the character reference code by 10. Add a numeric version of the
// current input character (subtract 0x0030 from the character's code point)
// to the character reference code.
Some(c) if c.is_ascii_digit() => match &mut self.character_reference_code {
Some(character_reference_code) => {
character_reference_code.push((10, c as u32 - 0x30, Some(c)));
}
_ => {
unreachable!();
}
},
// U+003B SEMICOLON
// Switch to the numeric character reference end state.
Some(';') => self.state = State::NumericCharacterReferenceEnd,
// Anything else
// This is a missing-semicolon-after-character-reference parse error.
// Reconsume in the numeric character reference end state.
_ => {
self.emit_error(ErrorKind::MissingSemicolonAfterCharacterReference);
self.reconsume_in_state(State::NumericCharacterReferenceEnd);
}
}
}
// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state
State::NumericCharacterReferenceEnd => {
let (value, raw_char_ref) =
if let Some(chars) = self.character_reference_code.take() {
let mut raw = String::with_capacity(8);
let mut i: u32 = 0;
let mut overflowed = false;
for (base, value, c) in chars.iter() {
if let Some(c) = c {
raw.push(*c);
}
if !overflowed {
if let Some(result) = i.checked_mul(*base as u32) {
i = result;
if let Some(result) = i.checked_add(*value) {
i = result;
} else {
i = 0x110000;
overflowed = true;
}
} else {
i = 0x110000;
overflowed = true;
}
}
}
(i, raw)
} else {
unreachable!();
};
// Check the character reference code:
let cr = match value {
// If the number is 0x00, then this is a null-character-reference
// parse error. Set the character
// reference code to 0xFFFD.
0 => {
self.emit_error(ErrorKind::NullCharacterReference);
0xfffd
}
// If the number is greater than 0x10FFFF, then this is a
// character-reference-outside-unicode-range parse error. Set the
// character reference code to
// 0xFFFD.
cr if cr > 0x10ffff => {
self.emit_error(ErrorKind::CharacterReferenceOutsideUnicodeRange);
0xfffd
}
// If the number is a surrogate, then this is a
// surrogate-character-reference parse error. Set the character
// reference code to 0xFFFD.
cr if is_surrogate(cr) => {
self.emit_error(ErrorKind::SurrogateCharacterReference);
0xfffd
}
// If the number is a noncharacter, then this is a
// noncharacter-character-reference parse error.
cr if is_noncharacter(cr) => {
self.emit_error(ErrorKind::NoncharacterCharacterReference);
cr
}
// If the number is 0x0D, or a control that's not ASCII whitespace,
// then
// this is a control-character-reference parse error. If the number
// is one of the numbers in the
// first column of the following table, then find the
// row with that number in the first column, and set the character
// reference code to the number in
// the second column of that row.
cr if cr == 0x0d || is_control(cr) => {
self.emit_error(ErrorKind::ControlCharacterReference);
match cr {
// 0x80 0x20AC EURO SIGN (€)
0x80 => 0x20ac,
// 0x82 0x201A SINGLE LOW-9 QUOTATION MARK (‚)
0x82 => 0x201a,
// 0x83 0x0192 LATIN SMALL LETTER F WITH HOOK (ƒ)
0x83 => 0x0192,
// 0x84 0x201E DOUBLE LOW-9 QUOTATION MARK („)
0x84 => 0x201e,
// 0x85 0x2026 HORIZONTAL ELLIPSIS (…)
0x85 => 0x2026,
// 0x86 0x2020 DAGGER (†)
0x86 => 0x2020,
// 0x87 0x2021 DOUBLE DAGGER (‡)
0x87 => 0x2021,
// 0x88 0x02C6 MODIFIER LETTER CIRCUMFLEX ACCENT (ˆ)
0x88 => 0x02c6,
// 0x89 0x2030 PER MILLE SIGN (‰)
0x89 => 0x2030,
// 0x8A 0x0160 LATIN CAPITAL LETTER S WITH CARON (Š)
0x8a => 0x0160,
// 0x8B 0x2039 SINGLE LEFT-POINTING ANGLE QUOTATION MARK (‹)
0x8b => 0x2039,
// 0x8C 0x0152 LATIN CAPITAL LIGATURE OE (Œ)
0x8c => 0x0152,
// 0x8E 0x017D LATIN CAPITAL LETTER Z WITH CARON (Ž)
0x8e => 0x017d,
// 0x91 0x2018 LEFT SINGLE QUOTATION MARK (‘)
0x91 => 0x2018,
// 0x92 0x2018 RIGHT SINGLE QUOTATION MARK (’)
0x92 => 0x2019,
// 0x93 0x201C LEFT DOUBLE QUOTATION MARK (“)
0x93 => 0x201c,
// 0x94 0x201D RIGHT DOUBLE QUOTATION MARK (”)
0x94 => 0x201d,
// 0x95 0x2022 BULLET (•)
0x95 => 0x2022,
// 0x96 0x2013 EN DASH (–)
0x96 => 0x2013,
// 0x97 0x2014 EM DASH (—)
0x97 => 0x2014,
// 0x98 0x02DC SMALL TILDE (˜)
0x98 => 0x02dc,
// 0x99 0x2122 TRADE MARK SIGN (™)
0x99 => 0x2122,
// 0x9A 0x0161 LATIN SMALL LETTER S WITH CARON (š)
0x9a => 0x0161,
// 0x9B 0x203A SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (›)
0x9b => 0x203a,
// 0x9C 0x0153 LATIN SMALL LIGATURE OE (œ)
0x9c => 0x0153,
// 0x9E 0x017E LATIN SMALL LETTER Z WITH CARON (ž)
0x9e => 0x017e,
// 0x9F 0x0178 LATIN CAPITAL LETTER Y WITH DIAERESIS (Ÿ)
0x9f => 0x0178,
_ => cr,
}
}
_ => value,
};
// Set the temporary buffer to the empty string.
// Append a code point equal to the character reference code to the temporary
// buffer.
// Flush code points consumed as a character reference.
// Switch to the return state.
let old_temporary_buffer = self.temporary_buffer.clone();
let mut raw =
String::with_capacity(old_temporary_buffer.len() + raw_char_ref.len() + 1);
raw.push_str(&old_temporary_buffer);
raw.push_str(&raw_char_ref);
if self.cur == Some(';') {
raw.push(';');
}
self.temporary_buffer.clear();
let c = match char::from_u32(cr) {
Some(c) => c,
_ => {
unreachable!();
}
};
self.temporary_buffer.push(c);
self.flush_code_points_consumed_as_character_reference(Some(raw));
self.state = self.return_state.clone();
}
}
Ok(())
}
#[inline(always)]
fn skip_whitespaces(&mut self, c: char) {
if c == '\r' && self.input.cur() == Some('\n') {
unsafe {
// Safety: cur() is Some
self.input.bump();
}
}
}
}
// By spec '\r` removed before tokenizer, but we keep them to have better AST
// and don't break logic to ignore characters
#[inline(always)]
fn is_spacy(c: char) -> bool {
matches!(c, '\x09' | '\x0a' | '\x0d' | '\x0c' | '\x20')
}
#[inline(always)]
fn is_control(c: u32) -> bool {
matches!(c, c @ 0x00..=0x1f | c @ 0x7f..=0x9f if !matches!(c, 0x09 | 0x0a | 0x0c | 0x0d | 0x20))
}
#[inline(always)]
fn is_surrogate(c: u32) -> bool {
matches!(c, 0xd800..=0xdfff)
}
// A noncharacter is a code point that is in the range U+FDD0 to U+FDEF,
// inclusive, or U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE,
// U+3FFFF, U+4FFFE, U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE,
// U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, U+AFFFE, U+AFFFF, U+BFFFE,
// U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE,
// U+FFFFF, U+10FFFE, or U+10FFFF.
#[inline(always)]
fn is_noncharacter(c: u32) -> bool {
matches!(
c,
0xfdd0
..=0xfdef
| 0xfffe
| 0xffff
| 0x1fffe
| 0x1ffff
| 0x2fffe
| 0x2ffff
| 0x3fffe
| 0x3ffff
| 0x4fffe
| 0x4ffff
| 0x5fffe
| 0x5ffff
| 0x6fffe
| 0x6ffff
| 0x7fffe
| 0x7ffff
| 0x8fffe
| 0x8ffff
| 0x9fffe
| 0x9ffff
| 0xafffe
| 0xaffff
| 0xbfffe
| 0xbffff
| 0xcfffe
| 0xcffff
| 0xdfffe
| 0xdffff
| 0xefffe
| 0xeffff
| 0xffffe
| 0xfffff
| 0x10fffe
| 0x10ffff,
)
}
#[inline(always)]
fn is_upper_hex_digit(c: char) -> bool {
matches!(c, '0'..='9' | 'A'..='F')
}
#[inline(always)]
fn is_lower_hex_digit(c: char) -> bool {
matches!(c, '0'..='9' | 'a'..='f')
}
#[inline(always)]
fn is_ascii_hex_digit(c: char) -> bool {
is_upper_hex_digit(c) || is_lower_hex_digit(c)
}
#[inline(always)]
fn is_ascii_upper_alpha(c: char) -> bool {
c.is_ascii_uppercase()
}
#[inline(always)]
fn is_ascii_lower_alpha(c: char) -> bool {
c.is_ascii_lowercase()
}
#[inline(always)]
fn is_ascii_alpha(c: char) -> bool {
is_ascii_upper_alpha(c) || is_ascii_lower_alpha(c)
}
#[inline(always)]
fn is_allowed_control_character(c: u32) -> bool {
c != 0x00 && is_control(c)
}
#[inline(always)]
fn is_allowed_character(c: char) -> bool {
let c = c as u32;
if is_surrogate(c) || is_allowed_control_character(c) || is_noncharacter(c) {
return false;
}
return true;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/lib.rs | Rust | #![cfg_attr(docsrs, feature(doc_cfg))]
#![deny(unused_must_use)]
#![deny(clippy::all)]
#![allow(clippy::needless_return)]
#![allow(clippy::nonminimal_bool)]
#![allow(clippy::wrong_self_convention)]
#![allow(clippy::match_like_matches_macro)]
use swc_common::{input::StringInput, SourceFile};
use swc_html_ast::{Document, DocumentFragment, DocumentMode, Element};
use crate::{
error::Error,
lexer::Lexer,
parser::{PResult, Parser, ParserConfig},
};
#[macro_use]
mod macros;
pub mod error;
pub mod lexer;
pub mod parser;
/// Parse a given file as `Document`.
///
/// If there are syntax errors but if it was recoverable, it will be appended to
/// `errors`.
pub fn parse_file_as_document(
fm: &SourceFile,
config: ParserConfig,
errors: &mut Vec<Error>,
) -> PResult<Document> {
let lexer = Lexer::new(StringInput::from(fm));
let mut parser = Parser::new(lexer, config);
let result = parser.parse_document();
errors.extend(parser.take_errors());
result
}
/// Parse a given file as `DocumentFragment`.
///
/// If there are syntax errors but if it was recoverable, it will be appended to
/// `errors`.
pub fn parse_file_as_document_fragment(
fm: &SourceFile,
context_element: &Element,
mode: DocumentMode,
form_element: Option<&Element>,
config: ParserConfig,
errors: &mut Vec<Error>,
) -> PResult<DocumentFragment> {
let lexer = Lexer::new(StringInput::from(fm));
let mut parser = Parser::new(lexer, config);
let result =
parser.parse_document_fragment(context_element.clone(), mode, form_element.cloned());
errors.extend(parser.take_errors());
result
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/macros.rs | Rust | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | ||
crates/swc_html_parser/src/parser/active_formatting_element_stack.rs | Rust | use swc_html_ast::Token;
use crate::parser::{is_same_node, RcNode, TokenAndInfo};
#[derive(Debug)]
pub enum ActiveFormattingElement {
Element(RcNode, TokenAndInfo),
Marker,
}
pub struct ActiveFormattingElementStack {
pub items: Vec<ActiveFormattingElement>,
}
impl ActiveFormattingElementStack {
pub fn new() -> Self {
ActiveFormattingElementStack {
items: Vec::with_capacity(8),
}
}
pub fn push(&mut self, value: ActiveFormattingElement) {
// When the steps below require the UA to push onto the list of active
// formatting elements an element element, the UA must perform the following
// steps:
// 1. If there are already three elements in the list of active formatting
// elements after the last marker, if any, or anywhere in the list if
// there are no markers, that have the same tag name, namespace, and
// attributes as element, then remove the earliest such element from the
// list of active formatting elements. For these purposes, the attributes
// must be compared as they were when the elements were created by the parser;
// two elements have the same attributes if all their parsed attributes
// can be paired such that the two attributes in each pair have
// identical names, namespaces, and values (the order of the attributes
// does not matter).
let mut count = 0;
let new_element = match &value {
ActiveFormattingElement::Element(node, token_and_info) => (node, token_and_info),
_ => {
unreachable!();
}
};
for element in self.items.iter().rev() {
let (node_in_element, token_and_info_in_element) = match &element {
ActiveFormattingElement::Marker => {
break;
}
ActiveFormattingElement::Element(node, token_and_info) => {
if get_namespace!(node) != get_namespace!(new_element.0)
|| get_tag_name!(node) != get_tag_name!(new_element.0)
{
continue;
}
(node.clone(), token_and_info)
}
};
let attributes_in_element = match &token_and_info_in_element.token {
Token::StartTag { attributes, .. } | Token::EndTag { attributes, .. } => attributes,
_ => {
unreachable!()
}
};
let attributes_in_new_element = match &new_element.1.token {
Token::StartTag { attributes, .. } | Token::EndTag { attributes, .. } => attributes,
_ => {
unreachable!()
}
};
if attributes_in_element.len() != attributes_in_new_element.len() {
continue;
}
let mut sorted_attributes_in_element = attributes_in_element.clone();
for attribute in &mut sorted_attributes_in_element {
attribute.span = Default::default();
}
let mut sorted_attributes_in_new_element = attributes_in_new_element.clone();
for attribute in &mut sorted_attributes_in_new_element {
attribute.span = Default::default();
}
sorted_attributes_in_element.sort();
sorted_attributes_in_new_element.sort();
if sorted_attributes_in_element != sorted_attributes_in_new_element {
continue;
}
count += 1;
if count == 3 {
self.remove(&node_in_element);
break;
}
}
// 2. Add element to the list of active formatting elements.
self.items.push(value);
}
pub fn remove(&mut self, node: &RcNode) {
let position = self.get_position(node);
if let Some(position) = position {
self.items.remove(position);
}
}
pub fn insert_marker(&mut self) {
self.items.push(ActiveFormattingElement::Marker);
}
pub fn get_position(&self, element: &RcNode) -> Option<usize> {
self.items.iter().position(|n| match *n {
ActiveFormattingElement::Marker => false,
ActiveFormattingElement::Element(ref handle, _) => is_same_node(handle, element),
})
}
pub fn clear_to_last_marker(&mut self) {
loop {
match self.items.pop() {
None | Some(ActiveFormattingElement::Marker) => break,
_ => (),
}
}
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/parser/doctypes.rs | Rust | pub static LIMITED_QUIRKY_PUBLIC_PREFIXES: &[&str] = &[
"-//w3c//dtd xhtml 1.0 frameset//",
"-//w3c//dtd xhtml 1.0 transitional//",
];
pub static HTML4_PUBLIC_PREFIXES: &[&str] = &[
"-//w3c//dtd html 4.01 frameset//",
"-//w3c//dtd html 4.01 transitional//",
];
pub static QUIRKY_PUBLIC_PREFIXES: &[&str] = &[
"-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
"-//as//dtd html 3.0 aswedit + extensions//",
"-//ietf//dtd html 2.0 level 1//",
"-//ietf//dtd html 2.0 level 2//",
"-//ietf//dtd html 2.0 strict level 1//",
"-//ietf//dtd html 2.0 strict level 2//",
"-//ietf//dtd html 2.0 strict//",
"-//ietf//dtd html 2.0//",
"-//ietf//dtd html 2.1e//",
"-//ietf//dtd html 3.0//",
"-//ietf//dtd html 3.2 final//",
"-//ietf//dtd html 3.2//",
"-//ietf//dtd html 3//",
"-//ietf//dtd html level 0//",
"-//ietf//dtd html level 1//",
"-//ietf//dtd html level 2//",
"-//ietf//dtd html level 3//",
"-//ietf//dtd html strict level 0//",
"-//ietf//dtd html strict level 1//",
"-//ietf//dtd html strict level 2//",
"-//ietf//dtd html strict level 3//",
"-//ietf//dtd html strict//",
"-//ietf//dtd html//",
"-//metrius//dtd metrius presentational//",
"-//microsoft//dtd internet explorer 2.0 html strict//",
"-//microsoft//dtd internet explorer 2.0 html//",
"-//microsoft//dtd internet explorer 2.0 tables//",
"-//microsoft//dtd internet explorer 3.0 html strict//",
"-//microsoft//dtd internet explorer 3.0 html//",
"-//microsoft//dtd internet explorer 3.0 tables//",
"-//netscape comm. corp.//dtd html//",
"-//netscape comm. corp.//dtd strict html//",
"-//o'reilly and associates//dtd html 2.0//",
"-//o'reilly and associates//dtd html extended 1.0//",
"-//o'reilly and associates//dtd html extended relaxed 1.0//",
"-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//",
"-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//",
"-//spyglass//dtd html 2.0 extended//",
"-//sq//dtd html 2.0 hotmetal + extensions//",
"-//sun microsystems corp.//dtd hotjava html//",
"-//sun microsystems corp.//dtd hotjava strict html//",
"-//w3c//dtd html 3 1995-03-24//",
"-//w3c//dtd html 3.2 draft//",
"-//w3c//dtd html 3.2 final//",
"-//w3c//dtd html 3.2//",
"-//w3c//dtd html 3.2s draft//",
"-//w3c//dtd html 4.0 frameset//",
"-//w3c//dtd html 4.0 transitional//",
"-//w3c//dtd html experimental 19960712//",
"-//w3c//dtd html experimental 970421//",
"-//w3c//dtd w3 html//",
"-//w3o//dtd w3 html 3.0//",
"-//webtechs//dtd mozilla html 2.0//",
"-//webtechs//dtd mozilla html//",
];
pub static QUIRKY_PUBLIC_MATCHES: &[&str] = &[
"-//w3o//dtd w3 html strict 3.0//en//",
"-/w3c/dtd html 4.0 transitional/en",
"html",
];
pub static QUIRKY_SYSTEM_MATCHES: &[&str] =
&["http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/parser/input.rs | Rust | use std::{fmt::Debug, mem::take};
use swc_atoms::Atom;
use swc_common::{BytePos, Span};
use swc_html_ast::{Token, TokenAndSpan};
use super::PResult;
use crate::{error::Error, lexer::State};
pub trait ParserInput: Iterator<Item = TokenAndSpan> {
fn start_pos(&mut self) -> BytePos;
fn last_pos(&mut self) -> BytePos;
fn take_errors(&mut self) -> Vec<Error>;
fn set_last_start_tag_name(&mut self, tag_name: &Atom);
fn set_input_state(&mut self, state: State);
fn set_adjusted_current_node_to_html_namespace(&mut self, value: bool);
}
#[derive(Debug)]
pub(super) struct Buffer<I>
where
I: ParserInput,
{
cur: Option<TokenAndSpan>,
input: I,
}
impl<I> Buffer<I>
where
I: ParserInput,
{
pub fn new(input: I) -> Self {
Buffer { cur: None, input }
}
/// Last start position
pub fn start_pos(&mut self) -> PResult<BytePos> {
Ok(self.input.start_pos())
}
/// Last end position
pub fn last_pos(&mut self) -> PResult<BytePos> {
Ok(self.input.last_pos())
}
pub fn cur_span(&mut self) -> PResult<Span> {
if self.cur.is_none() {
self.bump_inner()?;
}
Ok(self.cur.as_ref().map(|cur| cur.span).unwrap_or_default())
}
pub fn cur(&mut self) -> PResult<Option<&Token>> {
if self.cur.is_none() {
self.bump_inner()?;
}
Ok(self.cur.as_ref().map(|v| &v.token))
}
#[track_caller]
pub fn bump(&mut self) -> PResult<Option<TokenAndSpan>> {
debug_assert!(
self.cur.is_some(),
"bump() is called without checking current token"
);
let token = self.cur.take();
Ok(token)
}
fn bump_inner(&mut self) -> PResult<()> {
self.cur = None;
if self.cur.is_none() {
let result = self.input.next();
if let Some(result) = result {
self.cur = Some(result);
} else {
return Ok(());
}
}
Ok(())
}
pub fn take_errors(&mut self) -> Vec<Error> {
take(&mut self.input.take_errors())
}
pub(super) fn set_input_state(&mut self, state: State) {
self.input.set_input_state(state);
}
pub(super) fn set_adjusted_current_node_to_html_namespace(&mut self, value: bool) {
self.input
.set_adjusted_current_node_to_html_namespace(value);
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/parser/macros.rs | Rust | macro_rules! span {
($parser:expr, $start:expr) => {{
let last_pos = $parser.input.last_pos()?;
swc_common::Span::new($start, last_pos)
}};
}
macro_rules! bump {
($parser:expr) => {
$parser.input.bump()?.unwrap().token
};
}
macro_rules! get_tag_name {
($node:expr) => {{
match &$node.data {
crate::parser::Data::Element { tag_name, .. } => &**tag_name,
_ => {
unreachable!();
}
}
}};
}
macro_rules! get_namespace {
($node:expr) => {{
match $node.data {
crate::parser::Data::Element { namespace, .. } => namespace,
_ => {
unreachable!();
}
}
}};
}
macro_rules! get_document_mode {
($node:expr) => {{
match &$node.data {
crate::parser::Data::Document { mode, .. } => *mode.borrow(),
_ => {
unreachable!();
}
}
}};
}
macro_rules! is_html_element {
($node:expr, $tag_names:pat) => {{
get_namespace!($node) == Namespace::HTML && matches!(get_tag_name!($node), $tag_names)
}};
}
macro_rules! is_mathml_element {
($node:expr, $tag_names:pat) => {{
get_namespace!($node) == Namespace::MATHML && matches!(get_tag_name!($node), $tag_names)
}};
}
macro_rules! is_svg_element {
($node:expr, $tag_names:pat) => {{
get_namespace!($node) == Namespace::SVG && matches!(get_tag_name!($node), $tag_names)
}};
}
macro_rules! is_html_element_with_tag_name {
($node:expr, $tag_name:expr) => {{
get_namespace!($node) == Namespace::HTML && get_tag_name!($node) == $tag_name
}};
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/parser/mod.rs | Rust | use std::{cell::RefCell, mem, rc::Rc};
use active_formatting_element_stack::*;
use doctypes::*;
use node::*;
use open_elements_stack::*;
use swc_atoms::Atom;
use swc_common::{Span, DUMMY_SP};
use swc_html_ast::*;
use self::input::{Buffer, ParserInput};
use crate::{
error::{Error, ErrorKind},
lexer::State,
};
#[macro_use]
mod macros;
mod active_formatting_element_stack;
mod doctypes;
pub mod input;
mod node;
mod open_elements_stack;
pub type PResult<T> = Result<T, Error>;
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ParserConfig {
pub scripting_enabled: bool,
pub iframe_srcdoc: bool,
// #8459
pub allow_self_closing: bool,
}
enum Bookmark<RcNode> {
Replace(RcNode),
InsertAfter(RcNode),
}
enum AdjustAttributes {
MathML,
Svg,
}
#[derive(Debug, Clone, Default)]
enum InsertionMode {
#[default]
Initial,
BeforeHtml,
BeforeHead,
InHead,
InHeadNoScript,
AfterHead,
InBody,
Text,
InTable,
InTableText,
InCaption,
InColumnGroup,
InTableBody,
InRow,
InCell,
InSelect,
InSelectInTable,
InTemplate,
AfterBody,
InFrameset,
AfterFrameset,
AfterAfterBody,
AfterAfterFrameset,
}
enum InsertionPosition {
LastChild(RcNode),
BeforeSibling(RcNode),
}
pub struct Parser<I>
where
I: ParserInput,
{
#[allow(dead_code)]
config: ParserConfig,
input: Buffer<I>,
stopped: bool,
is_fragment_case: bool,
context_element: Option<RcNode>,
insertion_mode: InsertionMode,
original_insertion_mode: InsertionMode,
template_insertion_mode_stack: Vec<InsertionMode>,
document: Option<RcNode>,
head_element_pointer: Option<RcNode>,
form_element_pointer: Option<RcNode>,
open_elements_stack: OpenElementsStack,
active_formatting_elements: ActiveFormattingElementStack,
pending_character_tokens: Vec<TokenAndInfo>,
frameset_ok: bool,
foster_parenting_enabled: bool,
errors: Vec<Error>,
}
impl<I> Parser<I>
where
I: ParserInput,
{
pub fn new(input: I, config: ParserConfig) -> Self {
Parser {
config,
input: Buffer::new(input),
stopped: false,
is_fragment_case: false,
context_element: None,
insertion_mode: Default::default(),
original_insertion_mode: Default::default(),
template_insertion_mode_stack: Vec::with_capacity(16),
document: None,
head_element_pointer: None,
form_element_pointer: None,
open_elements_stack: OpenElementsStack::new(),
active_formatting_elements: ActiveFormattingElementStack::new(),
pending_character_tokens: Vec::with_capacity(16),
frameset_ok: true,
foster_parenting_enabled: false,
errors: Default::default(),
}
}
pub fn dump_cur(&mut self) -> String {
format!("{:?}", self.input.cur())
}
pub fn take_errors(&mut self) -> Vec<Error> {
mem::take(&mut self.errors)
}
pub fn parse_document(&mut self) -> PResult<Document> {
let start = self.input.cur_span()?;
self.document = Some(self.create_document(None));
self.run()?;
let document = &mut self.document.take().unwrap();
let nodes = document.children.take();
let mut children = Vec::with_capacity(nodes.len());
for node in nodes {
children.push(self.node_to_child(node));
}
let last = self.input.last_pos()?;
let mode = match &document.data {
Data::Document { mode, .. } => *mode.borrow(),
_ => {
unreachable!();
}
};
Ok(Document {
span: Span::new(start.lo(), last),
mode,
children,
})
}
// The following steps form the HTML fragment parsing algorithm. The algorithm
// takes as input an Element node, referred to as the context element, which
// gives the context for the parser, as well as input, a string to parse, and
// returns a list of zero or more nodes.
//
// Parts marked fragment case in algorithms in the parser section are parts that
// only occur if the parser was created for the purposes of this algorithm. The
// algorithms have been annotated with such markings for informational purposes
// only; such markings have no normative weight. If it is possible for a
// condition described as a fragment case to occur even when the parser wasn't
// created for the purposes of handling this algorithm, then that is an error in
// the specification.
//
// 1. Create a new Document node, and mark it as being an HTML document.
//
// 2. If the node document of the context element is in quirks mode, then let
// the Document be in quirks mode. Otherwise, the node document of the
// context element is in limited-quirks mode, then let the Document be in
// limited-quirks mode. Otherwise, leave the Document in no-quirks mode.
//
// 3. Create a new HTML parser, and associate it with the just created Document
// node.
//
// 4. Set the state of the HTML parser's tokenization stage as follows,
// switching on the context element:
//
// title
// textarea
//
// Switch the tokenizer to the RCDATA state.
//
// style
// xmp
// iframe
// noembed
// noframes
//
// Switch the tokenizer to the RAWTEXT state.
//
// script
//
// Switch the tokenizer to the script data state.
//
// noscript
//
// If the scripting flag is enabled, switch the tokenizer to the RAWTEXT state.
// Otherwise, leave the tokenizer in the data state. plaintext
//
// Switch the tokenizer to the PLAINTEXT state.
//
// Any other element
//
// Leave the tokenizer in the data state.
//
// For performance reasons, an implementation that does not report errors and
// that uses the actual state machine described in this specification directly
// could use the PLAINTEXT state instead of the RAWTEXT and script data states
// where those are mentioned in the list above. Except for rules regarding parse
// errors, they are equivalent, since there is no appropriate end tag token in
// the fragment case, yet they involve far fewer state transitions.
//
// 5. Let root be a new html element with no attributes.
//
// 6. Append the element root to the Document node created above.
//
// 7. Set up the parser's stack of open elements so that it contains just the
// single element root.
//
// 8. If the context element is a template element, push "in template" onto the
// stack of template insertion modes so that it is the new current template
// insertion mode.
//
// 9. Create a start tag token whose name is the local name of context and whose
// attributes are the attributes of context.
//
// Let this start tag token be the start tag token of the context node, e.g. for
// the purposes of determining if it is an HTML integration point.
//
// 10. Reset the parser's insertion mode appropriately.
//
// The parser will reference the context element as part of that algorithm.
//
// 11. Set the parser's form element pointer to the nearest node to the context
// element that is a form element (going straight up the ancestor chain, and
// including the element itself, if it is a form element), if any. (If there is
// no such form element, the form element pointer keeps its initial value,
// null.)
//
// 12. Place the input into the input stream for the HTML parser just created.
// The encoding confidence is irrelevant.
//
// 13. Start the parser and let it run until it has consumed all the characters
// just inserted into the input stream.
//
// 14. Return the child nodes of root, in tree order.
pub fn parse_document_fragment(
&mut self,
context_element: Element,
mode: DocumentMode,
form_element: Option<Element>,
) -> PResult<DocumentFragment> {
// 1.
// 2.
self.document = Some(self.create_document(Some(mode)));
// 3.
// Parser already created
let context_node = Node::new(
Data::Element {
namespace: context_element.namespace,
tag_name: context_element.tag_name,
attributes: RefCell::new(context_element.attributes),
is_self_closing: context_element.is_self_closing,
},
DUMMY_SP,
);
// 4.
match get_tag_name!(context_node) {
"title" | "textarea" if get_namespace!(context_node) == Namespace::HTML => {
self.input.set_input_state(State::Rcdata);
}
"style" | "xmp" | "iframe" | "noembed" | "noframes"
if get_namespace!(context_node) == Namespace::HTML =>
{
self.input.set_input_state(State::Rawtext);
}
"script" if get_namespace!(context_node) == Namespace::HTML => {
self.input.set_input_state(State::ScriptData);
}
"noscript" if get_namespace!(context_node) == Namespace::HTML => {
if self.config.scripting_enabled {
self.input.set_input_state(State::Rawtext);
} else {
self.input.set_input_state(State::Data)
}
}
"plaintext" if get_namespace!(context_node) == Namespace::HTML => {
self.input.set_input_state(State::PlainText)
}
_ => self.input.set_input_state(State::Data),
}
// 5.
let root = self.create_fake_html_element();
// 6.
self.append_node(self.document.as_ref().unwrap(), root.clone());
// 7.
self.open_elements_stack.push(root.clone());
// 8.
if is_html_element!(context_node, "template") {
self.template_insertion_mode_stack
.push(InsertionMode::InTemplate);
}
// 9.
self.context_element = Some(context_node.clone());
self.is_fragment_case = true;
// 10.
self.reset_insertion_mode();
// 11.
if is_html_element!(context_node, "form") {
self.form_element_pointer = Some(context_node);
} else if let Some(form_element) = form_element {
self.form_element_pointer = Some(Node::new(
Data::Element {
namespace: form_element.namespace,
tag_name: form_element.tag_name,
attributes: RefCell::new(form_element.attributes),
is_self_closing: form_element.is_self_closing,
},
DUMMY_SP,
));
}
// 12.
// We do preprocess input stream inside lexer
// 13.
let start = self.input.cur_span()?;
self.run()?;
let nodes = root.children.take();
let mut children = Vec::with_capacity(nodes.len());
for node in nodes {
children.push(self.node_to_child(node));
}
let last = self.input.last_pos()?;
Ok(DocumentFragment {
span: Span::new(start.lo(), last),
children,
})
}
fn create_document(&self, mode: Option<DocumentMode>) -> RcNode {
Node::new(
Data::Document {
mode: RefCell::new(mode.unwrap_or(DocumentMode::NoQuirks)),
},
DUMMY_SP,
)
}
#[allow(clippy::only_used_in_recursion)]
fn get_deep_end_span(&mut self, children: &[Child]) -> Option<Span> {
match children.last() {
Some(Child::DocumentType(DocumentType { span, .. })) => Some(*span),
Some(Child::Element(Element { span, children, .. })) => {
if span.is_dummy() {
return self.get_deep_end_span(children);
}
Some(*span)
}
Some(Child::Comment(Comment { span, .. })) => Some(*span),
Some(Child::Text(Text { span, .. })) => Some(*span),
_ => None,
}
}
fn node_to_child(&mut self, node: RcNode) -> Child {
let start_span = node.start_span.take();
match node.data.clone() {
Data::DocumentType {
name,
public_id,
system_id,
raw,
} => Child::DocumentType(DocumentType {
span: start_span,
name,
public_id,
system_id,
raw,
}),
Data::Element {
namespace,
tag_name,
attributes,
is_self_closing,
} => {
let nodes = node.children.take();
let mut new_children = Vec::with_capacity(nodes.len());
for node in nodes {
new_children.push(self.node_to_child(node));
}
let attributes = attributes.take();
match &*tag_name {
"html" | "body" if namespace == Namespace::HTML => {
// Elements and text after `</html>` are moving into `<body>`
// Elements and text after `</body>` are moving into `<body>`
let span = if start_span.is_dummy() {
start_span
} else {
let end_body = match node.end_span.take() {
Some(end_tag_span) => end_tag_span,
_ => start_span,
};
let end_children = match self.get_deep_end_span(&new_children) {
Some(end_span) => end_span,
_ => start_span,
};
let end = if end_body.hi() >= end_children.hi() {
end_body
} else {
end_children
};
Span::new(start_span.lo(), end.hi())
};
Child::Element(Element {
span,
namespace,
tag_name,
attributes,
is_self_closing,
children: new_children,
content: None,
})
}
_ => {
let span = if start_span.is_dummy() {
start_span
} else {
let end_span = match node.end_span.take() {
Some(end_span) if !end_span.is_dummy() => end_span,
_ => match self.get_deep_end_span(&new_children) {
Some(end_span) => end_span,
_ => start_span,
},
};
Span::new(start_span.lo(), end_span.hi())
};
let (children, content) =
if namespace == Namespace::HTML && &tag_name == "template" {
(
Vec::new(),
Some(DocumentFragment {
span,
children: new_children,
}),
)
} else {
(new_children, None)
};
Child::Element(Element {
span,
namespace,
tag_name,
attributes,
is_self_closing,
children,
content,
})
}
}
}
Data::Text { data, raw } => {
let span = if let Some(end_span) = node.end_span.take() {
Span::new(start_span.lo(), end_span.hi())
} else {
start_span
};
Child::Text(Text {
span,
data: data.take().into(),
raw: Some(raw.take().into()),
})
}
Data::Comment { data, raw } => Child::Comment(Comment {
span: start_span,
data,
raw,
}),
_ => {
unreachable!();
}
}
}
fn run(&mut self) -> PResult<()> {
while !self.stopped {
let adjusted_current_node = self.get_adjusted_current_node();
let is_element_in_html_namespace = is_element_in_html_namespace(adjusted_current_node);
self.input
.set_adjusted_current_node_to_html_namespace(is_element_in_html_namespace);
let mut token_and_info = match self.input.cur()? {
Some(_) => {
let span = self.input.cur_span()?;
let token = bump!(self);
TokenAndInfo {
span: span!(self, span.lo()),
acknowledged: false,
token,
}
}
None => {
let start_pos = self.input.start_pos()?;
let last_pos = self.input.last_pos()?;
TokenAndInfo {
span: Span::new(start_pos, last_pos),
acknowledged: false,
token: Token::Eof,
}
}
};
// Re-emit errors from tokenizer
for error in self.input.take_errors() {
let (span, kind) = *error.into_inner();
self.errors.push(Error::new(span, kind));
}
self.tree_construction_dispatcher(&mut token_and_info)?;
// When a start tag token is emitted with its self-closing flag set,
// if the flag is not acknowledged when it is processed by the tree
// construction stage, that is a parse error.
if let Token::StartTag {
is_self_closing, ..
} = &token_and_info.token
{
if *is_self_closing && !token_and_info.acknowledged {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonVoidHtmlElementStartTagWithTrailingSolidus,
));
}
}
}
Ok(())
}
fn tree_construction_dispatcher(&mut self, token_and_info: &mut TokenAndInfo) -> PResult<()> {
// As each token is emitted from the tokenizer, the user agent must follow the
// appropriate steps from the following list, known as the tree construction
// dispatcher:
//
// If the stack of open elements is empty
//
// If the adjusted current node is an element in the HTML namespace
//
// If the adjusted current node is a MathML text integration point and the token
// is a start tag whose tag name is neither "mglyph" nor "malignmark"
//
// If the adjusted current node is a MathML text integration point and the token
// is a character token
//
// If the adjusted current node is a MathML annotation-xml element and the token
// is a start tag whose tag name is "svg"
//
// If the adjusted current node is an HTML integration point and the token is a
// start tag
//
// If the adjusted current node is an HTML integration point and the token is a
// character token
//
// If the token is an end-of-file token
//
// Process the token according to the rules given in the section corresponding
// to the current insertion mode in HTML content.
let adjusted_current_node = self.get_adjusted_current_node();
let is_element_in_html_namespace = is_element_in_html_namespace(adjusted_current_node);
let is_mathml_text_integration_point =
is_mathml_text_integration_point(adjusted_current_node);
let is_mathml_annotation_xml = is_mathml_annotation_xml(adjusted_current_node);
let is_html_integration_point = is_html_integration_point(adjusted_current_node);
if self.open_elements_stack.items.is_empty()
|| is_element_in_html_namespace
|| (is_mathml_text_integration_point
&& matches!(&token_and_info.token, Token::StartTag { tag_name, .. } if *tag_name != "mglyph" && *tag_name != "malignmark"))
|| (is_mathml_text_integration_point
&& matches!(&token_and_info.token, Token::Character { .. }))
|| (is_mathml_annotation_xml
&& matches!(&token_and_info.token, Token::StartTag { tag_name, .. } if tag_name == "svg"))
|| (is_html_integration_point
&& matches!(&token_and_info.token, Token::StartTag { .. }))
|| (is_html_integration_point
&& matches!(&token_and_info.token, Token::Character { .. }))
|| matches!(&token_and_info.token, Token::Eof)
{
self.process_token(token_and_info, None)?;
}
// Otherwise
// Process the token according to the rules given in the section for parsing tokens in
// foreign content.
else {
self.process_token_in_foreign_content(token_and_info)?;
}
Ok(())
}
// The adjusted current node is the context element if the parser was created as
// part of the HTML fragment parsing algorithm and the stack of open elements
// has only one element in it (fragment case); otherwise, the adjusted current
// node is the current node.
fn get_adjusted_current_node(&self) -> Option<&RcNode> {
if self.is_fragment_case && self.open_elements_stack.items.len() == 1 {
return self.context_element.as_ref();
}
self.open_elements_stack.items.last()
}
fn process_token_in_foreign_content(
&mut self,
token_and_info: &mut TokenAndInfo,
) -> PResult<()> {
let TokenAndInfo { token, .. } = &token_and_info;
match token {
// A character token that is U+0000 NULL
//
// Parse error. Insert a U+FFFD REPLACEMENT CHARACTER character.
Token::Character { value, .. } if *value == '\x00' => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnexpectedNullCharacter,
));
token_and_info.token = Token::Character {
value: '\u{FFFD}',
raw: Some(Raw::Atom(Atom::new(String::from('\x00')))),
};
println!("{:?}", token_and_info.token);
self.insert_character(token_and_info)?;
}
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF),
// U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE
//
// Insert the token's character.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.insert_character(token_and_info)?;
}
// Any other character token
//
// Insert the token's character.
//
// Set the frameset-ok flag to "not ok".
Token::Character { .. } => {
self.insert_character(token_and_info)?;
self.frameset_ok = false;
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is one of: "b", "big", "blockquote", "body", "br",
// "center", "code", "dd", "div", "dl", "dt", "em", "embed", "h1", "h2", "h3", "h4",
// "h5", "h6", "head", "hr", "i", "img", "li", "listing", "menu", "meta", "nobr", "ol",
// "p", "pre", "ruby", "s", "small", "span", "strong", "strike", "sub", "sup", "table",
// "tt", "u", "ul", "var"
//
// A start tag whose tag name is "font", if the token has any attributes named "color",
// "face", or "size"
//
// An end tag whose tag name is "br", "p"
//
// Parse error.
//
// While the current node is not a MathML text integration point, an HTML integration
// point, or an element in the HTML namespace, pop elements from the stack of open
// elements.
//
// Reprocess the token according to the rules given in the section corresponding to the
// current insertion mode in HTML content.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"b" | "big"
| "blockquote"
| "body"
| "br"
| "center"
| "code"
| "dd"
| "div"
| "dl"
| "dt"
| "em"
| "embed"
| "h1"
| "h2"
| "h3"
| "h4"
| "h5"
| "h6"
| "head"
| "hr"
| "i"
| "img"
| "li"
| "listing"
| "menu"
| "meta"
| "nobr"
| "ol"
| "p"
| "pre"
| "ruby"
| "s"
| "small"
| "span"
| "strong"
| "strike"
| "sub"
| "sup"
| "table"
| "tt"
| "u"
| "ul"
| "var"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::HtmlStartTagInForeignContext(tag_name.clone()),
));
self.open_elements_stack.pop_until_in_foreign();
self.process_token(token_and_info, None)?;
}
Token::StartTag {
tag_name,
attributes,
..
} if tag_name == "font"
&& attributes
.iter()
.any(|attribute| matches!(&*attribute.name, "color" | "face" | "size")) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::HtmlStartTagInForeignContext(tag_name.clone()),
));
self.open_elements_stack.pop_until_in_foreign();
self.process_token(token_and_info, None)?;
}
Token::EndTag { tag_name, .. } if matches!(&**tag_name, "br" | "p") => {
let last = get_tag_name!(self.open_elements_stack.items.last().unwrap());
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EndTagDidNotMatchCurrentOpenElement(tag_name.clone(), last.into()),
));
self.open_elements_stack.pop_until_in_foreign();
self.process_token(token_and_info, None)?;
}
// Any other start tag
//
// If the adjusted current node is an element in the MathML namespace, adjust MathML
// attributes for the token. (This fixes the case of MathML attributes that are not all
// lowercase.)
//
// If the adjusted current node is an element in the SVG namespace, and the token's tag
// name is one of the ones in the first column of the following table, change the tag
// name to the name given in the corresponding cell in the second column. (This fixes
// the case of SVG elements that are not all lowercase.)
//
// Tag name Element name
// altglyph altGlyph
// altglyphdef altGlyphDef
// altglyphitem altGlyphItem
// animatecolor animateColor
// animatemotion animateMotion
// animatetransform animateTransform
// clippath clipPath
// feblend feBlend
// fecolormatrix feColorMatrix
// fecomponenttransfer feComponentTransfer
// fecomposite feComposite
// feconvolvematrix feConvolveMatrix
// fediffuselighting feDiffuseLighting
// fedisplacementmap feDisplacementMap
// fedistantlight feDistantLight
// fedropshadow feDropShadow
// feflood feFlood
// fefunca feFuncA
// fefuncb feFuncB
// fefuncg feFuncG
// fefuncr feFuncR
// fegaussianblur feGaussianBlur
// feimage feImage
// femerge feMerge
// femergenode feMergeNode
// femorphology feMorphology
// feoffset feOffset
// fepointlight fePointLight
// fespecularlighting feSpecularLighting
// fespotlight feSpotLight
// fetile feTile
// feturbulence feTurbulence
// foreignobject foreignObject
// glyphref glyphRef
// lineargradient linearGradient
// radialgradient radialGradient
// textpath textPath
//
// If the adjusted current node is an element in the SVG namespace, adjust SVG
// attributes for the token. (This fixes the case of SVG attributes that are not all
// lowercase.)
//
// Adjust foreign attributes for the token. (This fixes the use of namespaced
// attributes, in particular XLink in SVG.)
//
// Insert a foreign element for the token, in the same namespace as the adjusted current
// node.
//
// If the token has its self-closing flag set, then run the appropriate steps from the
// following list:
//
// If the token's tag name is "script", and the new current node is in the SVG
// namespace
//
// Acknowledge the token's self-closing flag, and then act as
// described in the steps for a "script" end tag below.
//
// Otherwise
// Pop the current node off the stack of open elements and acknowledge the token's
// self-closing flag.
Token::StartTag {
tag_name,
raw_tag_name,
is_self_closing,
attributes,
} => {
let is_self_closing = *is_self_closing;
let is_script = tag_name == "script";
let adjusted_current_node = self.get_adjusted_current_node();
let namespace = match adjusted_current_node {
Some(node) => {
get_namespace!(node)
}
_ => {
unreachable!();
}
};
let adjust_attributes = match namespace {
Namespace::MATHML => Some(AdjustAttributes::MathML),
Namespace::SVG => Some(AdjustAttributes::Svg),
_ => None,
};
if namespace == Namespace::SVG {
let new_tag_name = match &**tag_name {
"altglyph" => Some("altGlyph"),
"altglyphdef" => Some("altGlyphDef"),
"altglyphitem" => Some("altGlyphItem"),
"animatecolor" => Some("animateColor"),
"animatemotion" => Some("animateMotion"),
"animatetransform" => Some("animateTransform"),
"clippath" => Some("clipPath"),
"feblend" => Some("feBlend"),
"fecolormatrix" => Some("feColorMatrix"),
"fecomponenttransfer" => Some("feComponentTransfer"),
"fecomposite" => Some("feComposite"),
"feconvolvematrix" => Some("feConvolveMatrix"),
"fediffuselighting" => Some("feDiffuseLighting"),
"fedisplacementmap" => Some("feDisplacementMap"),
"fedistantlight" => Some("feDistantLight"),
"fedropshadow" => Some("feDropShadow"),
"feflood" => Some("feFlood"),
"fefunca" => Some("feFuncA"),
"fefuncb" => Some("feFuncB"),
"fefuncg" => Some("feFuncG"),
"fefuncr" => Some("feFuncR"),
"fegaussianblur" => Some("feGaussianBlur"),
"feimage" => Some("feImage"),
"femerge" => Some("feMerge"),
"femergenode" => Some("feMergeNode"),
"femorphology" => Some("feMorphology"),
"feoffset" => Some("feOffset"),
"fepointlight" => Some("fePointLight"),
"fespecularlighting" => Some("feSpecularLighting"),
"fespotlight" => Some("feSpotLight"),
"fetile" => Some("feTile"),
"feturbulence" => Some("feTurbulence"),
"foreignobject" => Some("foreignObject"),
"glyphref" => Some("glyphRef"),
"lineargradient" => Some("linearGradient"),
"radialgradient" => Some("radialGradient"),
"textpath" => Some("textPath"),
_ => None,
};
if let Some(new_tag_name) = new_tag_name {
token_and_info.token = Token::StartTag {
tag_name: new_tag_name.into(),
raw_tag_name: raw_tag_name.clone(),
is_self_closing,
attributes: attributes.clone(),
}
}
}
self.insert_foreign_element(token_and_info, namespace, adjust_attributes)?;
if is_self_closing {
if is_script
&& match self.open_elements_stack.items.last() {
Some(node) => get_namespace!(node) == Namespace::SVG,
_ => false,
}
{
token_and_info.acknowledged = true;
self.open_elements_stack.pop();
} else {
self.open_elements_stack.pop();
token_and_info.acknowledged = true;
}
}
}
// An end tag whose tag name is "script", if the current node is an SVG script element
//
// Pop the current node off the stack of open elements.
//
// Let the old insertion point have the same value as the current insertion point. Let
// the insertion point be just before the next input character.
//
// Increment the parser's script nesting level by one. Set the parser pause flag to
// true.
//
// If the active speculative HTML parser is null and the user agent supports SVG, then
// Process the SVG script element according to the SVG rules. [SVG]
//
// Even if this causes new characters to be inserted into the tokenizer, the parser will
// not be executed reentrantly, since the parser pause flag is true.
//
// Decrement the parser's script nesting level by one. If the parser's script nesting
// level is zero, then set the parser pause flag to false.
//
// Let the insertion point have the value of the old insertion point. (In other words,
// restore the insertion point to its previous value. This value might be the
// "undefined" value.)
Token::EndTag { tag_name, .. } if tag_name == "script" => {
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
// No need to handle other steps
}
// Any other end tag
//
// Run these steps:
//
// Initialize node to be the current node (the bottommost node of the stack).
//
// If node's tag name, converted to ASCII lowercase, is not the same as the tag name of
// the token, then this is a parse error.
//
// Loop: If node is the topmost element in the stack of open elements, then return.
// (fragment case)
//
// If node's tag name, converted to ASCII lowercase, is the same as the tag name of the
// token, pop elements from the stack of open elements until node has been popped from
// the stack, and then return.
//
// Set node to the previous entry in the stack of open elements.
//
// If node is not an element in the HTML namespace, return to the step labeled loop.
//
// Otherwise, process the token according to the rules given in the section
// corresponding to the current insertion mode in HTML content.
Token::EndTag { tag_name, .. } => {
let mut node = self.open_elements_stack.items.last();
let mut stack_idx = self.open_elements_stack.items.len() - 1;
if let Some(node) = &node {
let node_tag_name = get_tag_name!(node);
if node_tag_name.to_ascii_lowercase() != **tag_name {
if stack_idx == 0 {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EndTagDidNotMatchCurrentOpenElement(
tag_name.clone(),
node_tag_name.into(),
),
));
}
}
}
loop {
if stack_idx == 0 || node.is_none() {
return Ok(());
}
let inner_node = node.unwrap();
match &inner_node.data {
Data::Element {
tag_name: node_tag_name,
..
} if node_tag_name.to_ascii_lowercase() == **tag_name => {
let clone = inner_node.clone();
let popped = self.open_elements_stack.pop_until_node(&clone);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
return Ok(());
}
_ => {}
}
stack_idx -= 1;
node = self.open_elements_stack.items.get(stack_idx);
if let Some(node) = node {
if get_namespace!(node) == Namespace::HTML {
break;
}
}
}
self.process_token(token_and_info, None)?;
}
// EOF token is not reachable here
_ => {
unreachable!();
}
}
Ok(())
}
fn process_token(
&mut self,
token_and_info: &mut TokenAndInfo,
override_insertion_mode: Option<InsertionMode>,
) -> PResult<()> {
let TokenAndInfo { token, .. } = &token_and_info;
let insertion_mode = match override_insertion_mode {
Some(insertion_mode) => insertion_mode,
_ => self.insertion_mode.clone(),
};
/// Convenience: allow non-void HTML elements to self-close when
/// a relevant config flag is set. It is achieved by processing the
/// matching end tag right after the starting self-closing tag.
macro_rules! maybe_allow_self_closing {
($is_self_closing: ident, $tag_name: ident) => {
if self.config.allow_self_closing && *$is_self_closing {
let mut end_token_and_info = TokenAndInfo {
span: token_and_info.span,
acknowledged: false,
token: Token::EndTag {
tag_name: $tag_name.to_owned(),
raw_tag_name: None,
is_self_closing: false,
attributes: Vec::new(),
},
};
self.process_token(&mut end_token_and_info, None)?;
}
};
}
match insertion_mode {
// The "initial" insertion mode
InsertionMode::Initial => {
// A Document object has an associated parser cannot change the mode flag (a
// boolean). It is initially false.
// When the user agent is to apply the rules for the "initial" insertion mode,
// the user agent must handle the token as follows:
match token {
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Ignore the token.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
return Ok(());
}
// A comment token
//
// Insert a comment as the last child of the Document object.
Token::Comment { .. } => {
self.insert_comment_as_last_child_of_document(token_and_info)?;
}
// A DOCTYPE token
//
// If the DOCTYPE token's name is not "html", or the token's public identifier
// is not missing, or the token's system identifier is neither missing nor
// "about:legacy-compat", then there is a parse error.
//
// Append a DocumentType node to the Document node, with its name set to the
// name given in the DOCTYPE token, or the empty string if the name was missing;
// its public ID set to the public identifier given in the DOCTYPE token, or the
// empty string if the public identifier was missing; and its system ID set to
// the system identifier given in the DOCTYPE token, or the empty string if the
// system identifier was missing.
//
// Then, if the document is not an iframe srcdoc document, and the parser cannot
// change the mode flag is false, and the DOCTYPE token matches one of the
// conditions in the following list, then set the Document to quirks mode:
//
// The force-quirks flag is set to on.
//
// The name is not "html".
//
// The public identifier is set to: "-//W3O//DTD W3 HTML Strict 3.0//EN//"
//
// The public identifier is set to: "-/W3C/DTD HTML 4.0 Transitional/EN"
//
// The public identifier is set to: "HTML"
//
// The system identifier is set to: "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"
//
// The public identifier starts with: "+//Silmaril//dtd html Pro v0r11
// 19970101//"
//
// The public identifier starts with: "-//AS//DTD HTML 3.0 asWedit +
// extensions//"
//
// The public identifier starts with: "-//AdvaSoft Ltd//DTD HTML 3.0 asWedit +
// extensions//"
//
// The public identifier starts with: "-//IETF//DTD HTML 2.0 Level 1//"
//
// The public identifier starts with: "-//IETF//DTD HTML 2.0 Level 2//"
//
// The public identifier starts with: "-//IETF//DTD HTML 2.0 Strict Level 1//"
//
// The public identifier starts with: "-//IETF//DTD HTML 2.0 Strict Level 2//"
//
// The public identifier starts with: "-//IETF//DTD HTML 2.0 Strict//"
//
// The public identifier starts with: "-//IETF//DTD HTML 2.0//"
//
// The public identifier starts with: "-//IETF//DTD HTML 2.1E//"
//
// The public identifier starts with: "-//IETF//DTD HTML 3.0//"
//
// The public identifier starts with: "-//IETF//DTD HTML 3.2 Final//"
//
// The public identifier starts with: "-//IETF//DTD HTML 3.2//"
//
// The public identifier starts with: "-//IETF//DTD HTML 3//"
//
// The public identifier starts with: "-//IETF//DTD HTML Level 0//"
//
// The public identifier starts with: "-//IETF//DTD HTML Level 1//"
//
// The public identifier starts with: "-//IETF//DTD HTML Level 2//"
//
// The public identifier starts with: "-//IETF//DTD HTML Level 3//"
//
// The public identifier starts with: "-//IETF//DTD HTML Strict Level 0//"
//
// The public identifier starts with: "-//IETF//DTD HTML Strict Level 1//"
//
// The public identifier starts with: "-//IETF//DTD HTML Strict Level 2//"
//
// The public identifier starts with: "-//IETF//DTD HTML Strict Level 3//"
//
// The public identifier starts with: "-//IETF//DTD HTML Strict//"
//
// The public identifier starts with: "-//IETF//DTD HTML//"
//
// The public identifier starts with: "-//Metrius//DTD Metrius Presentational//"
//
// The public identifier starts with: "-//Microsoft//DTD Internet Explorer 2.0
// HTML Strict//"
//
// The public identifier starts with: "-//Microsoft//DTD Internet Explorer 2.0
// HTML//"
//
// The public identifier starts with: "-//Microsoft//DTD Internet Explorer 2.0
// Tables//"
//
// The public identifier starts with: "-//Microsoft//DTD Internet Explorer 3.0
// HTML Strict//"
//
// The public identifier starts with: "-//Microsoft//DTD Internet Explorer 3.0
// HTML//"
//
// The public identifier starts with: "-//Microsoft//DTD Internet Explorer 3.0
// Tables//"
//
// The public identifier starts with: "-//Netscape Comm. Corp.//DTD HTML//"
//
// The public identifier starts with: "-//Netscape Comm. Corp.//DTD Strict
// HTML//"
//
// The public identifier starts with: "-//O'Reilly and Associates//DTD HTML
// 2.0//"
//
// The public identifier starts with: "-//O'Reilly and Associates//DTD HTML
// Extended 1.0//"
//
// The public identifier starts with: "-//O'Reilly and Associates//DTD HTML
// Extended Relaxed 1.0//"
//
// The public identifier starts with: "-//SQ//DTD HTML 2.0 HoTMetaL +
// extensions//"
//
// The public identifier starts with: "-//SoftQuad Software//DTD HoTMetaL PRO
// 6.0::19990601::extensions to HTML 4.0//"
//
// The public identifier starts with: "-//SoftQuad//DTD HoTMetaL PRO
// 4.0::19971010::extensions to HTML 4.0//"
//
// The public identifier starts with: "-//Spyglass//DTD HTML 2.0 Extended//"
//
// The public identifier starts with: "-//Sun Microsystems Corp.//DTD HotJava
// HTML//"
//
// The public identifier starts with: "-//Sun Microsystems Corp.//DTD HotJava
// Strict HTML//"
//
// The public identifier starts with: "-//W3C//DTD HTML 3 1995-03-24//"
//
// The public identifier starts with: "-//W3C//DTD HTML 3.2 Draft//"
//
// The public identifier starts with: "-//W3C//DTD HTML 3.2 Final//"
//
// The public identifier starts with: "-//W3C//DTD HTML 3.2//"
//
// The public identifier starts with: "-//W3C//DTD HTML 3.2S Draft//"
//
// The public identifier starts with: "-//W3C//DTD HTML 4.0 Frameset//"
//
// The public identifier starts with: "-//W3C//DTD HTML 4.0 Transitional//"
//
// The public identifier starts with: "-//W3C//DTD HTML Experimental 19960712//"
//
// The public identifier starts with: "-//W3C//DTD HTML Experimental 970421//"
//
// The public identifier starts with: "-//W3C//DTD W3 HTML//"
//
// The public identifier starts with: "-//W3O//DTD W3 HTML 3.0//"
//
// The public identifier starts with: "-//WebTechs//DTD Mozilla HTML 2.0//"
//
// The public identifier starts with: "-//WebTechs//DTD Mozilla HTML//"
//
// The system identifier is missing and the public identifier starts with:
// "-//W3C//DTD HTML 4.01 Frameset//"
//
// The system identifier is missing and the public identifier starts with:
// "-//W3C//DTD HTML 4.01 Transitional//"
//
// Otherwise, if the document is not an iframe srcdoc document, and the parser
// cannot change the mode flag is false, and the DOCTYPE token matches one of
// the conditions in the following list, then then set the Document to
// limited-quirks mode:
//
// The public identifier starts with: "-//W3C//DTD XHTML 1.0 Frameset//"
//
// The public identifier starts with: "-//W3C//DTD XHTML 1.0 Transitional//"
//
// The system identifier is not missing and the public identifier starts with:
// "-//W3C//DTD HTML 4.01 Frameset//"
//
// The system identifier is not missing and the public identifier starts with:
// "-//W3C//DTD HTML 4.01 Transitional//"
//
// The system identifier and public identifier strings must be compared to the
// values given in the lists above in an ASCII case-insensitive manner. A system
// identifier whose value is the empty string is not considered missing for the
// purposes of the conditions above.
//
// Then, switch the insertion mode to "before html".
Token::Doctype {
name,
public_id,
system_id,
force_quirks,
raw,
..
} => {
let is_html_name =
matches!(name, Some(name) if name.eq_ignore_ascii_case("html"));
let is_conforming_doctype = is_html_name
&& public_id.is_none()
&& (system_id.is_none()
|| matches!(system_id, Some(system_id) if system_id == "about:legacy-compat"));
if !is_conforming_doctype {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonConformingDoctype,
));
}
let document_type = Node::new(
Data::DocumentType {
name: name.clone(),
public_id: public_id.clone(),
system_id: system_id.clone(),
raw: raw.clone(),
},
token_and_info.span,
);
self.append_node(self.document.as_ref().unwrap(), document_type);
if !self.config.iframe_srcdoc
&& (*force_quirks
|| !is_html_name
|| matches!(public_id, Some(public_id) if QUIRKY_PUBLIC_MATCHES
.contains(&&*public_id.to_ascii_lowercase()) || QUIRKY_PUBLIC_PREFIXES.contains(&&*public_id.to_ascii_lowercase()))
|| matches!(system_id, Some(system_id) if QUIRKY_SYSTEM_MATCHES
.contains(&&*system_id.to_ascii_lowercase()) || HTML4_PUBLIC_PREFIXES.contains(
&&*system_id.to_ascii_lowercase()
)))
{
self.set_document_mode(DocumentMode::Quirks);
} else if let Some(public_id) = public_id {
if LIMITED_QUIRKY_PUBLIC_PREFIXES
.contains(&&*public_id.as_ref().to_ascii_lowercase())
{
self.set_document_mode(DocumentMode::Quirks);
}
} else if let Some(system_id) = system_id {
if HTML4_PUBLIC_PREFIXES
.contains(&&*system_id.as_ref().to_ascii_lowercase())
{
self.set_document_mode(DocumentMode::Quirks);
}
}
self.insertion_mode = InsertionMode::BeforeHtml;
}
// Anything else
//
// If the document is not an iframe srcdoc document, then this is a parse error;
// if the parser cannot change the mode flag is false, set the Document to
// quirks mode.
//
// In any case, switch the insertion mode to "before html", then reprocess the
// token.
_ => {
if !self.config.iframe_srcdoc {
match &token {
Token::StartTag { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartTagWithoutDoctype,
));
}
Token::EndTag { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EndTagSeenWithoutDoctype,
));
}
Token::Character { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonSpaceCharacterWithoutDoctype,
));
}
Token::Eof => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EofWithoutDoctype,
));
}
_ => {
unreachable!();
}
}
self.set_document_mode(DocumentMode::Quirks);
}
self.insertion_mode = InsertionMode::BeforeHtml;
self.process_token(token_and_info, None)?;
}
}
}
// The "before html" insertion mode
InsertionMode::BeforeHtml => {
let anything_else =
|parser: &mut Parser<I>, token_and_info: &mut TokenAndInfo| -> PResult<()> {
let element = parser.create_fake_html_element();
parser.open_elements_stack.push(element.clone());
// Never be `None`
if let Some(document) = &parser.document {
parser.append_node(document, element);
}
parser.insertion_mode = InsertionMode::BeforeHead;
parser.process_token(token_and_info, None)?;
Ok(())
};
// When the user agent is to apply the rules for the "before html" insertion
// mode, the user agent must handle the token as follows:
match token {
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A comment token
//
// Insert a comment as the last child of the Document object.
Token::Comment { .. } => {
self.insert_comment_as_last_child_of_document(token_and_info)?;
}
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Ignore the token.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
return Ok(());
}
// A start tag whose tag name is "html"
//
// Create an element for the token in the HTML namespace, with the Document as
// the intended parent. Append it to the Document object. Put this element in
// the stack of open elements.
//
// Switch the insertion mode to "before head".
Token::StartTag {
tag_name,
attributes,
is_self_closing,
..
} if tag_name == "html" => {
let element = Node::new(
Data::Element {
namespace: Namespace::HTML,
tag_name: tag_name.clone(),
attributes: RefCell::new(
attributes
.iter()
.map(|token_attribute| Attribute {
span: token_attribute.span,
namespace: None,
prefix: None,
name: token_attribute.name.clone(),
raw_name: token_attribute.raw_name.clone(),
value: token_attribute.value.clone(),
raw_value: token_attribute.raw_value.clone(),
})
.collect(),
),
is_self_closing: *is_self_closing,
},
token_and_info.span,
);
self.open_elements_stack.push(element.clone());
// Never be `None`
if let Some(document) = &self.document {
self.append_node(document, element);
}
self.insertion_mode = InsertionMode::BeforeHead;
}
// An end tag whose tag name is one of: "head", "body", "html", "br"
//
// Act as described in the "anything else" entry below.
Token::EndTag { tag_name, .. }
if matches!(&**tag_name, "head" | "body" | "html" | "br") =>
{
anything_else(self, token_and_info)?;
}
// Any other end tag
//
// Parse error. Ignore the token.
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// Anything else
//
// Create an html element whose node document is the Document object. Append it
// to the Document object. Put this element in the stack of open elements.
//
// Switch the insertion mode to "before head", then reprocess the token.
_ => {
anything_else(self, token_and_info)?;
}
}
// The document element can end up being removed from the
// Document object, e.g. by scripts; nothing in particular
// happens in such cases, content continues being appended to
// the nodes as described in the next section.
}
// The "before head" insertion mode
InsertionMode::BeforeHead => {
let anything_else = |parser: &mut Parser<I>,
token_and_info: &mut TokenAndInfo|
-> PResult<()> {
let element = parser
.insert_html_element(&parser.create_fake_token_and_info("head", None))?;
parser.head_element_pointer = Some(element);
parser.insertion_mode = InsertionMode::InHead;
parser.process_token(token_and_info, None)?;
Ok(())
};
// When the user agent is to apply the rules for the "before head" insertion
// mode, the user agent must handle the token as follows:
match token {
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Ignore the token.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
return Ok(());
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// A start tag whose tag name is "head"
//
// Insert an HTML element for the token.
//
// Set the head element pointer to the newly created head element.
//
// Switch the insertion mode to "in head".
Token::StartTag { tag_name, .. } if tag_name == "head" => {
let element = self.insert_html_element(token_and_info)?;
self.head_element_pointer = Some(element);
self.insertion_mode = InsertionMode::InHead;
}
// An end tag whose tag name is one of: "head", "body", "html", "br"
//
// Act as described in the "anything else" entry below.
Token::EndTag { tag_name, .. }
if matches!(&**tag_name, "head" | "body" | "html" | "br") =>
{
anything_else(self, token_and_info)?;
}
// Any other end tag
//
// Parse error. Ignore the token.
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// Anything else
//
// Insert an HTML element for a "head" start tag token with no attributes.
//
// Set the head element pointer to the newly created head element.
//
// Switch the insertion mode to "in head".
//
// Reprocess the current token.
_ => {
anything_else(self, token_and_info)?;
}
}
}
// The "in head" insertion mode
InsertionMode::InHead => {
let anything_else =
|parser: &mut Parser<I>, token_and_info: &mut TokenAndInfo| -> PResult<()> {
parser.open_elements_stack.pop();
parser.insertion_mode = InsertionMode::AfterHead;
parser.process_token(token_and_info, None)?;
Ok(())
};
// When the user agent is to apply the rules for the "in head" insertion mode,
// the user agent must handle the token as follows:
match token {
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Insert the character.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.insert_character(token_and_info)?;
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// A start tag whose tag name is one of: "base", "basefont", "bgsound", "link"
//
// Insert an HTML element for the token. Immediately pop the current node off
// the stack of open elements.
//
// Acknowledge the token's self-closing flag, if it is set.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(&**tag_name, "base" | "basefont" | "bgsound" | "link") => {
let is_self_closing = *is_self_closing;
self.insert_html_element(token_and_info)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
}
// A start tag whose tag name is "meta"
//
// Insert an HTML element for the token. Immediately pop the current node off
// the stack of open elements.
//
// Acknowledge the token's self-closing flag, if it is set.
//
// If the active speculative HTML parser is null, then:
//
// If the element has a charset attribute, and getting an encoding from its
// value results in an encoding, and the confidence is currently tentative, then
// change the encoding to the resulting encoding.
//
// Otherwise, if the element has an http-equiv attribute whose value is an ASCII
// case-insensitive match for the string "Content-Type", and the element has a
// content attribute, and applying the algorithm for extracting a character
// encoding from a meta element to that attribute's value returns an encoding,
// and the confidence is currently tentative, then change the encoding to the
// extracted encoding.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "meta" => {
let is_self_closing = *is_self_closing;
self.insert_html_element(token_and_info)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
}
// A start tag whose tag name is "title"
//
// Follow the generic RCDATA element parsing algorithm.
Token::StartTag { tag_name, .. } if tag_name == "title" => {
self.parse_generic_text_element(token_and_info, false)?;
}
// A start tag whose tag name is "noscript", if the scripting flag is enabled
// A start tag whose tag name is one of: "noframes", "style"
//
// Follow the generic raw text element parsing algorithm.
Token::StartTag { tag_name, .. }
if tag_name == "noscript" && self.config.scripting_enabled =>
{
self.parse_generic_text_element(token_and_info, true)?;
}
Token::StartTag { tag_name, .. }
if matches!(&**tag_name, "noframes" | "style") =>
{
self.parse_generic_text_element(token_and_info, true)?;
}
// A start tag whose tag name is "noscript", if the scripting flag is disabled
//
// Insert an HTML element for the token.
//
// Switch the insertion mode to "in head noscript".
Token::StartTag { tag_name, .. }
if tag_name == "noscript" && !self.config.scripting_enabled =>
{
self.insert_html_element(token_and_info)?;
self.insertion_mode = InsertionMode::InHeadNoScript;
}
// A start tag whose tag name is "script"
//
// Run these steps:
//
// 1. Let the adjusted insertion location be the appropriate place for inserting
// a node.
//
// 2. Create an element for the token in the HTML namespace, with the intended
// parent being the element in which the adjusted insertion location finds
// itself.
//
// 3. Set the element's parser document to the Document, and unset the element's
// "non-blocking" flag.
//
// This ensures that, if the script is external, any document.write() calls in
// the script will execute in-line, instead of blowing the document away, as
// would happen in most other cases. It also prevents the script from executing
// until the end tag is seen.
//
// 4. If the parser was created as part of the HTML fragment parsing algorithm,
// then mark the script element as "already started". (fragment case)
//
// 5. If the parser was invoked via the document.write() or document.writeln()
// methods, then optionally mark the script element as "already started". (For
// example, the user agent might use this clause to prevent execution of
// cross-origin scripts inserted via document.write() under slow network
// conditions, or when the page has already taken a long time to load.)
//
// 6. Insert the newly created element at the adjusted insertion location.
//
// 7. Push the element onto the stack of open elements so that it is the new
// current node.
//
// 8. Switch the tokenizer to the script data state.
//
// 9. Let the original insertion mode be the current insertion mode.
//
// 10. Switch the insertion mode to "text".
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "script" => {
let adjusted_insertion_location =
self.get_appropriate_place_for_inserting_node(None)?;
let node = self.create_element_for_token(
token_and_info.token.clone(),
token_and_info.span,
Some(Namespace::HTML),
None,
);
// Skip script handling
self.insert_at_position(adjusted_insertion_location, node.clone());
self.open_elements_stack.push(node);
self.input.set_input_state(State::ScriptData);
self.original_insertion_mode = self.insertion_mode.clone();
self.insertion_mode = InsertionMode::Text;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// An end tag whose tag name is "head"
//
// Pop the current node (which will be the head element) off the stack of open
// elements.
//
// Switch the insertion mode to "after head".
Token::EndTag { tag_name, .. } if tag_name == "head" => {
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.insertion_mode = InsertionMode::AfterHead;
}
// An end tag whose tag name is one of: "body", "html", "br"
//
// Act as described in the "anything else" entry below.
Token::EndTag { tag_name, .. }
if matches!(&**tag_name, "body" | "html" | "br") =>
{
anything_else(self, token_and_info)?;
}
// A start tag whose tag name is "template"
//
// Insert an HTML element for the token.
//
// Insert a marker at the end of the list of active formatting elements.
//
// Set the frameset-ok flag to "not ok".
//
// Switch the insertion mode to "in template".
//
// Push "in template" onto the stack of template insertion modes so that it is
// the new current template insertion mode.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "template" => {
self.insert_html_element(token_and_info)?;
self.active_formatting_elements.insert_marker();
self.frameset_ok = false;
self.insertion_mode = InsertionMode::InTemplate;
self.template_insertion_mode_stack
.push(InsertionMode::InTemplate);
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// An end tag whose tag name is "template"
//
// If there is no template element on the stack of open elements, then this is a
// parse error; ignore the token.
//
// Otherwise, run these steps:
//
// Generate all implied end tags thoroughly.
//
// If the current node is not a template element, then this is a parse error.
//
// Pop elements from the stack of open elements until a template element has
// been popped from the stack.
//
// Clear the list of active formatting elements up to the last marker.
// Pop the current template insertion mode off the stack of template insertion
// modes.
//
// Reset the insertion mode appropriately.
Token::EndTag { tag_name, .. } if tag_name == "template" => {
if !self.open_elements_stack.contains_template_element() {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.open_elements_stack
.generate_implied_end_tags_thoroughly();
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "template") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
}
_ => {}
}
let popped = self
.open_elements_stack
.pop_until_tag_name_popped(&["template"]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.active_formatting_elements.clear_to_last_marker();
self.template_insertion_mode_stack.pop();
self.reset_insertion_mode();
}
}
// A start tag whose tag name is "head"
//
// Any other end tag
//
// Parse error. Ignore the token.
Token::StartTag { tag_name, .. } if tag_name == "head" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::SomethingSeenWhenSomethingOpen(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// Anything else
//
// Pop the current node (which will be the head element) off the stack of open
// elements.
//
// Switch the insertion mode to "after head".
//
// Reprocess the token.
_ => {
anything_else(self, token_and_info)?;
}
}
}
// The "in head noscript" insertion mode
InsertionMode::InHeadNoScript => {
let anything_else =
|parser: &mut Parser<I>, token_and_info: &mut TokenAndInfo| -> PResult<()> {
match &token_and_info.token {
Token::Character { .. } => {
parser.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonSpaceCharacterInNoscriptInHead,
));
}
Token::StartTag { tag_name, .. } => {
parser.errors.push(Error::new(
token_and_info.span,
ErrorKind::BadStartTagInNoscriptInHead(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
parser.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
Token::Eof => {
parser.errors.push(Error::new(
token_and_info.span,
ErrorKind::EofWithUnclosedElements,
));
}
_ => {
unreachable!()
}
}
parser.open_elements_stack.pop();
parser.insertion_mode = InsertionMode::InHead;
parser.process_token(token_and_info, None)?;
Ok(())
};
// When the user agent is to apply the rules for the "in head noscript"
// insertion mode, the user agent must handle the token as follows:
match token {
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// An end tag whose tag name is "noscript"
//
// Pop the current node (which will be a noscript element) from the stack of
// open elements; the new current node will be a head element.
//
// Switch the insertion mode to "in head".
Token::EndTag { tag_name, .. } if tag_name == "noscript" => {
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.insertion_mode = InsertionMode::InHead;
}
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// A comment token
//
// A start tag whose tag name is one of: "basefont", "bgsound", "link", "meta",
// "noframes", "style"
//
// Process the token using the rules for the "in head" insertion mode.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
Token::Comment { .. } => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"basefont" | "bgsound" | "link" | "meta" | "noframes" | "style"
) =>
{
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// An end tag whose tag name is "br"
//
// Act as described in the "anything else" entry below.
Token::EndTag { tag_name, .. } if tag_name == "br" => {
anything_else(self, token_and_info)?;
}
// A start tag whose tag name is one of: "head", "noscript"
//
// Any other end tag
//
// Parse error. Ignore the token.
Token::StartTag { tag_name, .. }
if matches!(&**tag_name, "head" | "noscript") =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::SomethingSeenWhenSomethingOpen(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// Anything else
//
// Parse error.
//
// Pop the current node (which will be a noscript element) from the stack of
// open elements; the new current node will be a head element.
//
// Switch the insertion mode to "in head".
//
// Reprocess the token.
_ => {
anything_else(self, token_and_info)?;
}
}
}
// The "after head" insertion mode
InsertionMode::AfterHead => {
let anything_else = |parser: &mut Parser<I>,
token_and_info: &mut TokenAndInfo|
-> PResult<()> {
let span = if matches!(&token_and_info.token, Token::EndTag { tag_name, .. } if tag_name == "body")
{
Some(token_and_info.span)
} else {
None
};
let body_token = parser.create_fake_token_and_info("body", span);
parser.insert_html_element(&body_token)?;
parser.insertion_mode = InsertionMode::InBody;
parser.process_token(token_and_info, None)?;
Ok(())
};
// When the user agent is to apply the rules for the "after head" insertion
// mode, the user agent must handle the token as follows:
match token {
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Insert the character.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.insert_character(token_and_info)?;
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// A start tag whose tag name is "body"
//
// Insert an HTML element for the token.
//
// Set the frameset-ok flag to "not ok".
//
// Switch the insertion mode to "in body".
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "body" => {
self.insert_html_element(token_and_info)?;
self.frameset_ok = false;
self.insertion_mode = InsertionMode::InBody;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "frameset"
//
// Insert an HTML element for the token.
//
// Switch the insertion mode to "in frameset".
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "frameset" => {
self.insert_html_element(token_and_info)?;
self.insertion_mode = InsertionMode::InFrameset;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "base", "basefont", "bgsound", "link",
// "meta", "noframes", "script", "style", "template", "title"
//
// Parse error.
//
// Push the node pointed to by the head element pointer onto the stack of open
// elements.
//
// Process the token using the rules for the "in head" insertion mode.
//
// Remove the node pointed to by the head element pointer from the stack of open
// elements. (It might not be the current node at this point.)
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"base"
| "basefont"
| "bgsound"
| "link"
| "meta"
| "noframes"
| "script"
| "style"
| "template"
| "title"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::SomethingBetweenHeadAndBody(tag_name.clone()),
));
let head = self
.head_element_pointer
.as_ref()
.expect("no head element")
.clone();
self.open_elements_stack.push(head.clone());
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
self.open_elements_stack.remove(&head);
}
// An end tag whose tag name is "template"
//
// Process the token using the rules for the "in head" insertion mode.
Token::EndTag { tag_name, .. } if tag_name == "template" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// An end tag whose tag name is one of: "body", "html", "br"
//
// Act as described in the "anything else" entry below.
Token::EndTag { tag_name, .. }
if matches!(&**tag_name, "body" | "html" | "br") =>
{
anything_else(self, token_and_info)?;
}
// A start tag whose tag name is "head"
//
// Any other end tag
//
// Parse error. Ignore the token.
Token::StartTag { tag_name, .. } if tag_name == "head" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// Anything else
//
// Insert an HTML element for a "body" start tag token with no attributes.
//
// Switch the insertion mode to "in body".
//
// Reprocess the current token.
_ => {
anything_else(self, token_and_info)?;
}
}
}
// The "in body" insertion mode
InsertionMode::InBody => {
// When the user agent is to apply the rules for the "in body" insertion mode,
// the user agent must handle the token as follows:
match token {
// A character token that is U+0000 NULL
//
// Parse error. Ignore the token.
Token::Character { value, .. } if *value == '\x00' => self.errors.push(
Error::new(token_and_info.span, ErrorKind::UnexpectedNullCharacter),
),
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Reconstruct the active formatting elements, if any.
//
// Insert the token's character.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.reconstruct_active_formatting_elements()?;
self.insert_character(token_and_info)?;
}
// Any other character token
//
// Reconstruct the active formatting elements, if any.
//
// Insert the token's character.
//
// Set the frameset-ok flag to "not ok".
Token::Character { .. } => {
self.reconstruct_active_formatting_elements()?;
self.insert_character(token_and_info)?;
self.frameset_ok = false;
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Parse error.
//
// If there is a template element on the stack of open elements, then ignore the
// token.
//
// Otherwise, for each attribute on the token, check to see if the attribute is
// already present on the top element of the stack of open elements. If it is
// not, add the attribute and its corresponding value to that element.
Token::StartTag {
tag_name,
attributes,
..
} if tag_name == "html" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
if self.open_elements_stack.contains_template_element() {
// Ignore
return Ok(());
}
if let Some(top) = self.open_elements_stack.items.first() {
let mut node_attributes = match &top.data {
Data::Element { attributes, .. } => attributes.borrow_mut(),
_ => {
unreachable!();
}
};
for token_attribute in attributes {
let mut found = false;
for attribute in node_attributes.iter() {
if attribute.name == token_attribute.name {
found = true;
break;
}
}
if !found {
node_attributes.push(Attribute {
span: token_attribute.span,
namespace: None,
prefix: None,
name: token_attribute.name.clone(),
raw_name: token_attribute.raw_name.clone(),
value: token_attribute.value.clone(),
raw_value: token_attribute.raw_value.clone(),
});
}
}
}
}
// A start tag whose tag name is one of: "base", "basefont", "bgsound", "link",
// "meta", "noframes", "script", "style", "template", "title"
//
// An end tag whose tag name is "template"
//
// Process the token using the rules for the "in head" insertion mode.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"base"
| "basefont"
| "bgsound"
| "link"
| "meta"
| "noframes"
| "script"
| "style"
| "template"
| "title"
) =>
{
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
Token::EndTag { tag_name, .. } if tag_name == "template" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// A start tag whose tag name is "body"
//
// Parse error.
//
// If the second element on the stack of open elements is not a body element, if
// the stack of open elements has only one node on it, or if there is a template
// element on the stack of open elements, then ignore the token. (fragment case)
//
// Otherwise, set the frameset-ok flag to "not ok"; then, for each attribute on
// the token, check to see if the attribute is already present on the body
// element (the second element) on the stack of open elements, and if it is not,
// add the attribute and its corresponding value to that element.
Token::StartTag {
tag_name,
attributes,
..
} if tag_name == "body" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::SomethingSeenWhenSomethingOpen(tag_name.clone()),
));
let is_second_body = matches!(self.open_elements_stack.items.get(1), Some(node) if is_html_element!(node, "body"));
if !is_second_body
|| self.open_elements_stack.items.len() == 1
|| self.open_elements_stack.contains_template_element()
{
// Ignore
// Fragment case
return Ok(());
}
self.frameset_ok = false;
if let Some(top) = self.open_elements_stack.items.get(1) {
let mut node_attributes = match &top.data {
Data::Element { attributes, .. } => attributes.borrow_mut(),
_ => {
unreachable!();
}
};
for token_attribute in attributes {
let mut found = false;
for attribute in node_attributes.iter() {
if attribute.name == token_attribute.name {
found = true;
break;
}
}
if !found {
node_attributes.push(Attribute {
span: token_attribute.span,
namespace: None,
prefix: None,
name: token_attribute.name.clone(),
raw_name: token_attribute.raw_name.clone(),
value: token_attribute.value.clone(),
raw_value: token_attribute.raw_value.clone(),
});
}
}
}
}
// A start tag whose tag name is "frameset"
//
// Parse error.
//
// If the stack of open elements has only one node on it, or if the second
// element on the stack of open elements is not a body element, then ignore the
// token. (fragment case)
//
// If the frameset-ok flag is set to "not ok", ignore the token.
//
// Otherwise, run the following steps:
//
// Remove the second element on the stack of open elements from its parent node,
// if it has one.
//
// Pop all the nodes from the bottom of the stack of open elements, from the
// current node up to, but not including, the root html element.
//
// Insert an HTML element for the token.
//
// Switch the insertion mode to "in frameset".
Token::StartTag { tag_name, .. } if tag_name == "frameset" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
let len = self.open_elements_stack.items.len();
let body = self.open_elements_stack.items.get(1);
let is_second_body =
matches!(body, Some(node) if is_html_element!(node, "body"));
if len == 1 || !is_second_body {
// Fragment case
// Ignore the token
return Ok(());
}
if !self.frameset_ok {
// Ignore
return Ok(());
}
if let Some(body) = &body {
if let Some((parent, i)) = self.get_parent_and_index(body) {
parent.children.borrow_mut().remove(i);
body.parent.set(None);
}
}
self.open_elements_stack.items.truncate(1);
self.insert_html_element(token_and_info)?;
self.insertion_mode = InsertionMode::InFrameset;
}
// An end-of-file token
//
// If the stack of template insertion modes is not empty, then process the token
// using the rules for the "in template" insertion mode.
//
// Otherwise, follow these steps:
//
// If there is a node in the stack of open elements that is not either a dd
// element, a dt element, an li element, an optgroup element, an option element,
// a p element, an rb element, an rp element, an rt element, an rtc element, a
// tbody element, a td element, a tfoot element, a th element, a thead element,
// a tr element, the body element, or the html element, then this is a parse
// error.
//
// Stop parsing.
Token::Eof => {
if !self.template_insertion_mode_stack.is_empty() {
self.process_token_using_rules(
token_and_info,
InsertionMode::InTemplate,
)?;
return Ok(());
}
self.update_end_tag_span(
self.open_elements_stack.items.last(),
token_and_info.span,
);
for node in &self.open_elements_stack.items {
if !is_html_element!(
node,
"dd" | "dt"
| "li"
| "optgroup"
| "option"
| "p"
| "rb"
| "rp"
| "rt"
| "rtc"
| "tbody"
| "td"
| "tfoot"
| "th"
| "thead"
| "tr"
| "body"
| "html"
) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EofWithUnclosedElements,
));
break;
}
}
self.stopped = true;
}
// An end tag whose tag name is "body"
//
// If the stack of open elements does not have a body element in scope, this is
// a parse error; ignore the token.
//
// Otherwise, if there is a node in the stack of open elements that is not
// either a dd element, a dt element, an li element, an optgroup element, an
// option element, a p element, an rb element, an rp element, an rt element, an
// rtc element, a tbody element, a td element, a tfoot element, a th element, a
// thead element, a tr element, the body element, or the html element, then this
// is a parse error.
//
// Switch the insertion mode to "after body".
Token::EndTag { tag_name, .. } if tag_name == "body" => {
if !self.open_elements_stack.has_in_scope("body") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
return Ok(());
} else {
self.update_end_tag_span(
self.open_elements_stack.items.get(1),
token_and_info.span,
);
}
for node in &self.open_elements_stack.items {
if !is_html_element!(
node,
"dd" | "dt"
| "li"
| "optgroup"
| "option"
| "p"
| "rb"
| "rp"
| "rt"
| "rtc"
| "tbody"
| "td"
| "tfoot"
| "th"
| "thead"
| "tr"
| "body"
| "html"
) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EndTagWithUnclosedElements("body".into()),
));
break;
}
}
self.insertion_mode = InsertionMode::AfterBody;
}
// An end tag whose tag name is "html"
//
// If the stack of open elements does not have a body element in scope, this is
// a parse error; ignore the token.
//
// Otherwise, if there is a node in the stack of open elements that is not
// either a dd element, a dt element, an li element, an optgroup element, an
// option element, a p element, an rb element, an rp element, an rt element, an
// rtc element, a tbody element, a td element, a tfoot element, a th element, a
// thead element, a tr element, the body element, or the html element, then this
// is a parse error.
//
// Switch the insertion mode to "after body".
//
// Reprocess the token.
Token::EndTag { tag_name, .. } if tag_name == "html" => {
if !self.open_elements_stack.has_in_scope("body") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
return Ok(());
} else {
self.update_end_tag_span(
self.open_elements_stack.items.first(),
token_and_info.span,
);
}
for node in &self.open_elements_stack.items {
if !is_html_element!(
node,
"dd" | "dt"
| "li"
| "optgroup"
| "option"
| "p"
| "rb"
| "rp"
| "rt"
| "rtc"
| "tbody"
| "td"
| "tfoot"
| "th"
| "thead"
| "tr"
| "body"
| "html"
) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EndTagWithUnclosedElements("html".into()),
));
break;
}
}
self.insertion_mode = InsertionMode::AfterBody;
self.process_token(token_and_info, None)?;
}
// A start tag whose tag name is one of: "address", "article", "aside",
// "blockquote", "center", "details", "dialog", "dir", "div", "dl", "fieldset",
// "figcaption", "figure", "footer", "header", "hgroup", "main", "menu", "nav",
// "ol", "p", "section", "summary", "ul"
//
// If the stack of open elements has a p element in button scope, then close a p
// element.
//
// Insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(
&**tag_name,
"address"
| "article"
| "aside"
| "blockquote"
| "center"
| "details"
| "dialog"
| "dir"
| "div"
| "dl"
| "fieldset"
| "figcaption"
| "figure"
| "footer"
| "header"
| "hgroup"
| "main"
| "menu"
| "nav"
| "ol"
| "p"
| "section"
| "summary"
| "ul"
) =>
{
if self.open_elements_stack.has_in_button_scope("p") {
self.close_p_element(token_and_info, false);
}
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6"
//
// If the stack of open elements has a p element in button scope, then close a p
// element.
//
// If the current node is an HTML element whose tag name is one of "h1", "h2",
// "h3", "h4", "h5", or "h6", then this is a parse error; pop the current node
// off the stack of open elements.
//
// Insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(&**tag_name, "h1" | "h2" | "h3" | "h4" | "h5" | "h6") => {
if self.open_elements_stack.has_in_button_scope("p") {
self.close_p_element(token_and_info, false);
}
match self.open_elements_stack.items.last() {
Some(node)
if is_html_element!(
node,
"h1" | "h2" | "h3" | "h4" | "h5" | "h6"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::HeadingWhenHeadingOpen,
));
self.open_elements_stack.pop();
}
_ => {}
}
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "pre", "listing"
//
// If the stack of open elements has a p element in button scope, then close a p
// element.
//
// Insert an HTML element for the token.
//
// If the next token is a U+000A LINE FEED (LF) character token, then ignore
// that token and move on to the next one. (Newlines at the start of pre blocks
// are ignored as an authoring convenience.)
//
// Set the frameset-ok flag to "not ok".
Token::StartTag { tag_name, .. }
if matches!(&**tag_name, "pre" | "listing") =>
{
if self.open_elements_stack.has_in_button_scope("p") {
self.close_p_element(token_and_info, false);
}
self.insert_html_element(token_and_info)?;
match self.input.cur()? {
Some(Token::Character { value, .. }) if *value == '\n' => {
bump!(self);
}
_ => {}
}
self.frameset_ok = false;
}
// A start tag whose tag name is "form"
//
// If the form element pointer is not null, and there is no template element on
// the stack of open elements, then this is a parse error; ignore the token.
//
// Otherwise:
//
// If the stack of open elements has a p element in button scope, then close a p
// element.
//
// Insert an HTML element for the token, and, if there is no template element on
// the stack of open elements, set the form element pointer to point to the
// element created.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "form" => {
if self.form_element_pointer.is_some()
&& !self.open_elements_stack.contains_template_element()
{
self.errors
.push(Error::new(token_and_info.span, ErrorKind::FormWhenFormOpen));
return Ok(());
}
if self.open_elements_stack.has_in_button_scope("p") {
self.close_p_element(token_and_info, false);
}
let element = self.insert_html_element(token_and_info)?;
if !self.open_elements_stack.contains_template_element() {
self.form_element_pointer = Some(element);
}
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "li"
//
// Run these steps:
//
// Set the frameset-ok flag to "not ok".
//
// Initialize node to be the current node (the bottommost node of the stack).
//
// Loop: If node is an li element, then run these substeps:
//
// Generate implied end tags, except for li elements.
//
// If the current node is not an li element, then this is a parse error.
//
// Pop elements from the stack of open elements until an li element has been
// popped from the stack.
//
// Jump to the step labeled done below.
//
// If node is in the special category, but is not an address, div, or p element,
// then jump to the step labeled done below.
//
// Otherwise, set node to the previous entry in the stack of open elements and
// return to the step labeled loop.
//
// Done: If the stack of open elements has a p element in button scope, then
// close a p element.
//
// Finally, insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "li" => {
self.frameset_ok = false;
// Initialise node to be the current node (the bottommost node of
// the stack).
// Step "Loop".
for node in self.open_elements_stack.items.iter().rev() {
if is_html_element!(node, "li") {
// Generate implied end tags, except for li elements.
self.open_elements_stack
.generate_implied_end_tags_with_exclusion("li");
// If the current node is not an li element, then this is a
// parse error.
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "li") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElementsImplied("li".into()),
));
}
_ => {}
}
// Pop elements from the stack of open elements until an li
// element has been popped from the stack.
self.open_elements_stack.pop_until_tag_name_popped(&["li"]);
// Jump to the step labeled done below.
break;
}
// If node is in the special category, but is not an address,
// div, or p element, then jump to the step labeled done below.
// Otherwise, set node to the previous entry in the stack
// of open elements and return to the step labeled loop.
if self.is_special_element(node)
&& !is_html_element!(node, "address" | "div" | "p")
{
break;
}
}
// Step "Done".
// If the stack of open elements has a p element in button scope,
// then close a p element.
if self.open_elements_stack.has_in_button_scope("p") {
self.close_p_element(token_and_info, false);
}
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "dd", "dt"
//
// Run these steps:
//
// Set the frameset-ok flag to "not ok".
//
// Initialize node to be the current node (the bottommost node of the stack).
//
// Loop: If node is a dd element, then run these substeps:
//
// Generate implied end tags, except for dd elements.
//
// If the current node is not a dd element, then this is a parse error.
//
// Pop elements from the stack of open elements until a dd element has been
// popped from the stack.
//
// Jump to the step labeled done below.
//
// If node is a dt element, then run these substeps:
//
// Generate implied end tags, except for dt elements.
//
// If the current node is not a dt element, then this is a parse error.
//
// Pop elements from the stack of open elements until a dt element has been
// popped from the stack.
//
// Jump to the step labeled done below.
//
// If node is in the special category, but is not an address, div, or p element,
// then jump to the step labeled done below.
//
// Otherwise, set node to the previous entry in the stack of open elements and
// return to the step labeled loop.
//
// Done: If the stack of open elements has a p element in button scope, then
// close a p element.
//
// Finally, insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(&**tag_name, "dd" | "dt") => {
self.frameset_ok = false;
// Initialise node to be the current node (the bottommost node of
// the stack).
// Step "Loop".
for node in self.open_elements_stack.items.iter().rev() {
if is_html_element!(node, "dd") {
// Generate implied end tags, except for dd elements.
self.open_elements_stack
.generate_implied_end_tags_with_exclusion("dd");
// If the current node is not an dd element, then this is a
// parse error.
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "dd") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElementsImplied("dd".into()),
));
}
_ => {}
}
// Pop elements from the stack of open elements until an dd
// element has been popped from the stack.
self.open_elements_stack.pop_until_tag_name_popped(&["dd"]);
// Jump to the step labeled done below.
break;
} else if is_html_element!(node, "dt") {
// Generate implied end tags, except for li elements.
self.open_elements_stack
.generate_implied_end_tags_with_exclusion("dt");
// If the current node is not an dt element, then this is a
// parse error.
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "dt") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElementsImplied("dt".into()),
));
}
_ => {}
}
// Pop elements from the stack of open elements until an dt
// element has been popped from the stack.
self.open_elements_stack.pop_until_tag_name_popped(&["dt"]);
// Jump to the step labeled done below.
break;
}
// If node is in the special category, but is not an address,
// div, or p element, then jump to the step labeled done below.
// Otherwise, set node to the previous entry in the stack of
// open elements and return to the step labeled loop.
if self.is_special_element(node)
&& !is_html_element!(node, "address" | "div" | "p")
{
break;
}
}
// Step "Done".
// If the stack of open elements has a p element in button scope,
// then close a p element.
if self.open_elements_stack.has_in_button_scope("p") {
self.close_p_element(token_and_info, false);
}
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "plaintext"
//
// If the stack of open elements has a p element in button scope, then close a p
// element.
//
// Insert an HTML element for the token.
//
// Switch the tokenizer to the PLAINTEXT state.
Token::StartTag { tag_name, .. } if tag_name == "plaintext" => {
if self.open_elements_stack.has_in_button_scope("p") {
self.close_p_element(token_and_info, false);
}
self.insert_html_element(token_and_info)?;
self.input.set_input_state(State::PlainText);
}
// A start tag whose tag name is "button"
//
// 1. If the stack of open elements has a button element in scope, then run
// these substeps:
//
// 1. Parse error.
//
// 2. Generate implied end tags.
//
// 3. Pop elements from the stack of open elements until a button element has
// been popped from the stack.
//
// 2. Reconstruct the active formatting elements, if any.
//
// 3. Insert an HTML element for the token.
//
// 4. Set the frameset-ok flag to "not ok".
Token::StartTag { tag_name, .. } if tag_name == "button" => {
if self.open_elements_stack.has_in_scope("button") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::SomethingSeenWhenSomethingOpen(tag_name.clone()),
));
self.open_elements_stack.generate_implied_end_tags();
self.open_elements_stack
.pop_until_tag_name_popped(&["button"]);
}
self.reconstruct_active_formatting_elements()?;
self.insert_html_element(token_and_info)?;
self.frameset_ok = false;
}
// An end tag whose tag name is one of: "address", "article", "aside",
// "blockquote", "button", "center", "details", "dialog", "dir", "div", "dl",
// "fieldset", "figcaption", "figure", "footer", "header", "hgroup", "listing",
// "main", "menu", "nav", "ol", "pre", "section", "summary", "ul"
//
// If the stack of open elements does not have an element in scope that is an
// HTML element with the same tag name as that of the token, then this is a
// parse error; ignore the token.
//
// Otherwise, run these steps:
//
// Generate implied end tags.
//
// If the current node is not an HTML element with the same tag name as that of
// the token, then this is a parse error.
//
// Pop elements from the stack of open elements until an HTML element with the
// same tag name as the token has been popped from the stack.
Token::EndTag { tag_name, .. }
if matches!(
&**tag_name,
"address"
| "article"
| "aside"
| "blockquote"
| "button"
| "center"
| "details"
| "dialog"
| "dir"
| "div"
| "dl"
| "fieldset"
| "figcaption"
| "figure"
| "footer"
| "header"
| "hgroup"
| "listing"
| "main"
| "menu"
| "nav"
| "ol"
| "pre"
| "section"
| "summary"
| "ul"
) =>
{
if !self.open_elements_stack.has_in_scope(tag_name) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.open_elements_stack.generate_implied_end_tags();
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element_with_tag_name!(node, tag_name) => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
}
_ => {}
}
let popped = self
.open_elements_stack
.pop_until_tag_name_popped(&[tag_name]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
}
}
// An end tag whose tag name is "form"
//
// If there is no template element on the stack of open elements, then run these
// substeps:
//
// 1. Let node be the element that the form element pointer is set to, or null
// if it is not set to an element.
//
// 2. Set the form element pointer to null.
//
// 3. If node is null or if the stack of open elements does not have node in
// scope, then this is a parse error; return and ignore the
// token.
//
// 4. Generate implied end tags.
//
// 5. If the current node is not node, then this is a parse error.
//
// 6. Remove node from the stack of open elements.
//
// If there is a template element on the stack of open elements, then run these
// substeps instead:
//
// 1. If the stack of open elements does not have a form element in scope, then
// this is a parse error; return and ignore the token.
//
// 2, Generate implied end tags.
//
// 3. If the current node is not a form element, then this is a parse error.
//
// 4. Pop elements from the stack of open elements until a form element has been
// popped from the stack.
Token::EndTag { tag_name, .. } if tag_name == "form" => {
if !self.open_elements_stack.contains_template_element() {
let node = match self.form_element_pointer.take() {
None => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
return Ok(());
}
Some(x) => Some(x),
};
self.form_element_pointer = None;
if node.is_none()
|| !self
.open_elements_stack
.has_node_in_scope(node.as_ref().unwrap())
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
return Ok(());
}
let node = node.unwrap();
self.open_elements_stack.generate_implied_end_tags();
let current = self.open_elements_stack.items.last();
if !is_same_node(&node, current.unwrap()) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
} else {
self.update_end_tag_span(Some(&node), token_and_info.span);
}
self.open_elements_stack.remove(&node);
} else {
if !self.open_elements_stack.has_in_scope("form") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
return Ok(());
}
self.open_elements_stack.generate_implied_end_tags();
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "form") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
}
_ => {}
}
let popped = self
.open_elements_stack
.pop_until_tag_name_popped(&["form"]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
}
}
// An end tag whose tag name is "p"
//
// If the stack of open elements does not have a p element in button scope, then
// this is a parse error; insert an HTML element for a "p" start tag token with
// no attributes.
//
// Close a p element.
Token::EndTag { tag_name, .. } if tag_name == "p" => {
if !self.open_elements_stack.has_in_button_scope("p") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NoElementToCloseButEndTagSeen(tag_name.clone()),
));
self.insert_html_element(
&self.create_fake_token_and_info("p", Some(token_and_info.span)),
)?;
}
self.close_p_element(token_and_info, true);
}
// An end tag whose tag name is "li"
//
// If the stack of open elements does not have an li element in list item scope,
// then this is a parse error; ignore the token.
//
// Otherwise, run these steps:
//
// Generate implied end tags, except for li elements.
//
// If the current node is not an li element, then this is a parse error.
//
// Pop elements from the stack of open elements until an li element has been
// popped from the stack.
Token::EndTag { tag_name, .. } if tag_name == "li" => {
if !self.open_elements_stack.has_in_list_item_scope("li") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NoElementToCloseButEndTagSeen(tag_name.clone()),
));
} else {
self.open_elements_stack
.generate_implied_end_tags_with_exclusion("li");
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "li") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
}
_ => {}
}
let popped =
self.open_elements_stack.pop_until_tag_name_popped(&["li"]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
}
}
// An end tag whose tag name is one of: "dd", "dt"
//
// If the stack of open elements does not have an element in scope that is an
// HTML element with the same tag name as that of the token, then this is a
// parse error; ignore the token.
//
// Otherwise, run these steps:
//
// Generate implied end tags, except for HTML elements with the same tag name as
// the token.
//
// If the current node is not an HTML element with the same tag name as that of
// the token, then this is a parse error.
//
// Pop elements from the stack of open elements until an HTML element with the
// same tag name as the token has been popped from the stack.
Token::EndTag { tag_name, .. } if matches!(&**tag_name, "dd" | "dt") => {
if !self.open_elements_stack.has_in_scope(tag_name) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NoElementToCloseButEndTagSeen(tag_name.clone()),
));
} else {
self.open_elements_stack
.generate_implied_end_tags_with_exclusion(tag_name);
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element_with_tag_name!(node, tag_name) => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
}
_ => {}
}
let popped = self
.open_elements_stack
.pop_until_tag_name_popped(&[tag_name]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
}
}
// An end tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6"
//
// If the stack of open elements does not have an element in scope that is an
// HTML element and whose tag name is one of "h1", "h2", "h3", "h4", "h5", or
// "h6", then this is a parse error; ignore the token.
//
// Otherwise, run these steps:
//
// Generate implied end tags.
//
// If the current node is not an HTML element with the same tag name as that of
// the token, then this is a parse error.
//
// Pop elements from the stack of open elements until an HTML element whose tag
// name is one of "h1", "h2", "h3", "h4", "h5", or "h6" has been popped from the
// stack.
Token::EndTag { tag_name, .. }
if matches!(&**tag_name, "h1" | "h2" | "h3" | "h4" | "h5" | "h6") =>
{
if !self.open_elements_stack.has_in_scope("h1")
&& !self.open_elements_stack.has_in_scope("h2")
&& !self.open_elements_stack.has_in_scope("h3")
&& !self.open_elements_stack.has_in_scope("h4")
&& !self.open_elements_stack.has_in_scope("h5")
&& !self.open_elements_stack.has_in_scope("h6")
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.open_elements_stack.generate_implied_end_tags();
if let Some(node) = self.open_elements_stack.items.last() {
if !is_html_element_with_tag_name!(node, tag_name) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
} else {
self.update_end_tag_span(Some(node), token_and_info.span);
}
}
self.open_elements_stack
.pop_until_tag_name_popped(&["h1", "h2", "h3", "h4", "h5", "h6"]);
}
}
// An end tag whose tag name is "sarcasm"
//
// Take a deep breath, then act as described in the "any other end tag" entry
// below.
//
// Skip, we will be in `Token::EndTag` branch with the same logic
//
//
//
// A start tag whose tag name is "a"
//
// If the list of active formatting elements contains an a element between the
// end of the list and the last marker on the list (or the start of the list if
// there is no marker on the list), then this is a parse error; run the adoption
// agency algorithm for the token, then remove that element from the list of
// active formatting elements and the stack of open elements if the adoption
// agency algorithm didn't already remove it (it might not have if the element
// is not in table scope).
//
// Reconstruct the active formatting elements, if any.
//
// Insert an HTML element for the token. Push onto the list of active formatting
// elements that element.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "a" => {
if !self.active_formatting_elements.items.is_empty() {
let mut node = None;
for element in self.active_formatting_elements.items.iter().rev() {
match element {
ActiveFormattingElement::Marker => {
break;
}
ActiveFormattingElement::Element(item, _) => {
if is_html_element!(item, "a") {
node = Some(item);
break;
}
}
}
}
if let Some(element) = node {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::SomethingSeenWhenSomethingOpen(tag_name.clone()),
));
let remove = element.clone();
self.run_the_adoption_agency_algorithm(token_and_info, false)?;
self.active_formatting_elements.remove(&remove);
self.open_elements_stack.remove(&remove);
}
}
self.reconstruct_active_formatting_elements()?;
let element = self.insert_html_element(token_and_info)?;
self.active_formatting_elements
.push(ActiveFormattingElement::Element(
element,
token_and_info.clone(),
));
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "b", "big", "code", "em", "font", "i",
// "s", "small", "strike", "strong", "tt", "u"
//
// Reconstruct the active formatting elements, if any.
//
// Insert an HTML element for the token. Push onto the list of active formatting
// elements that element.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(
&**tag_name,
"b" | "big"
| "code"
| "em"
| "font"
| "i"
| "s"
| "small"
| "strike"
| "strong"
| "tt"
| "u"
) =>
{
self.reconstruct_active_formatting_elements()?;
let element = self.insert_html_element(token_and_info)?;
self.active_formatting_elements
.push(ActiveFormattingElement::Element(
element,
token_and_info.clone(),
));
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "nobr"
//
// Reconstruct the active formatting elements, if any.
//
// If the stack of open elements has a nobr element in scope, then this is a
// parse error; run the adoption agency algorithm for the token, then once again
// reconstruct the active formatting elements, if any.
//
// Insert an HTML element for the token. Push onto the list of active formatting
// elements that element.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "nobr" => {
self.reconstruct_active_formatting_elements()?;
if self.open_elements_stack.has_in_scope("nobr") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::SomethingSeenWhenSomethingOpen(tag_name.clone()),
));
self.run_the_adoption_agency_algorithm(token_and_info, false)?;
self.reconstruct_active_formatting_elements()?;
}
let element = self.insert_html_element(token_and_info)?;
self.active_formatting_elements
.push(ActiveFormattingElement::Element(
element,
token_and_info.clone(),
));
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// An end tag whose tag name is one of: "a", "b", "big", "code", "em", "font",
// "i", "nobr", "s", "small", "strike", "strong", "tt", "u"
//
// Run the adoption agency algorithm for the token.
Token::EndTag { tag_name, .. }
if matches!(
&**tag_name,
"a" | "b"
| "big"
| "code"
| "em"
| "font"
| "i"
| "nobr"
| "s"
| "small"
| "strike"
| "strong"
| "tt"
| "u"
) =>
{
self.run_the_adoption_agency_algorithm(token_and_info, true)?;
}
// A start tag whose tag name is one of: "applet", "marquee", "object"
//
// Reconstruct the active formatting elements, if any.
//
// Insert an HTML element for the token.
//
// Insert a marker at the end of the list of active formatting elements.
//
// Set the frameset-ok flag to "not ok".
Token::StartTag { tag_name, .. }
if matches!(&**tag_name, "applet" | "marquee" | "object") =>
{
self.reconstruct_active_formatting_elements()?;
self.insert_html_element(token_and_info)?;
self.active_formatting_elements.insert_marker();
self.frameset_ok = false;
}
// An end tag token whose tag name is one of: "applet", "marquee", "object"
//
// If the stack of open elements does not have an element in scope that is an
// HTML element with the same tag name as that of the token, then this is a
// parse error; ignore the token.
//
// Otherwise, run these steps:
//
// Generate implied end tags.
//
// If the current node is not an HTML element with the same tag name as that of
// the token, then this is a parse error.
//
// Pop elements from the stack of open elements until an HTML element with the
// same tag name as the token has been popped from the stack.
//
// Clear the list of active formatting elements up to the last marker.
Token::EndTag { tag_name, .. }
if matches!(&**tag_name, "applet" | "marquee" | "object") =>
{
if !self.open_elements_stack.has_in_scope(tag_name) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.open_elements_stack.generate_implied_end_tags();
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element_with_tag_name!(node, tag_name) => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
}
_ => {}
}
let popped = self
.open_elements_stack
.pop_until_tag_name_popped(&[tag_name]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.active_formatting_elements.clear_to_last_marker();
}
}
// A start tag whose tag name is "table"
//
// If the Document is not set to quirks mode, and the stack of open elements has
// a p element in button scope, then close a p element.
//
// Insert an HTML element for the token.
//
// Set the frameset-ok flag to "not ok".
//
// Switch the insertion mode to "in table".
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "table" => {
if get_document_mode!(self.document.as_ref().unwrap())
!= DocumentMode::Quirks
&& self.open_elements_stack.has_in_button_scope("p")
{
self.close_p_element(token_and_info, false);
}
self.insert_html_element(token_and_info)?;
self.frameset_ok = false;
self.insertion_mode = InsertionMode::InTable;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// An end tag whose tag name is "br"
//
// Parse error. Drop the attributes from the token, and act as described in the
// next entry; i.e. act as if this was a "br" start tag token with no
// attributes, rather than the end tag token that it actually is.
Token::EndTag {
tag_name,
is_self_closing,
..
} if tag_name == "br" => {
let is_self_closing = *is_self_closing;
self.errors
.push(Error::new(token_and_info.span, ErrorKind::EndTagBr));
self.reconstruct_active_formatting_elements()?;
self.insert_html_element(
&self.create_fake_token_and_info("br", Some(token_and_info.span)),
)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
self.frameset_ok = false;
}
// A start tag whose tag name is one of: "area", "br", "embed", "img", "keygen",
// "wbr"
//
// Reconstruct the active formatting elements, if any.
//
// Insert an HTML element for the token. Immediately pop the current node off
// the stack of open elements.
//
// Acknowledge the token's self-closing flag, if it is set.
//
// Set the frameset-ok flag to "not ok".
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(
&**tag_name,
"area" | "br" | "embed" | "img" | "keygen" | "wbr"
) =>
{
let is_self_closing = *is_self_closing;
self.reconstruct_active_formatting_elements()?;
self.insert_html_element(token_and_info)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
self.frameset_ok = false;
}
// A start tag whose tag name is "input"
//
// Reconstruct the active formatting elements, if any.
//
// Insert an HTML element for the token. Immediately pop the current node off
// the stack of open elements.
//
// Acknowledge the token's self-closing flag, if it is set.
//
// If the token does not have an attribute with the name "type", or if it does,
// but that attribute's value is not an ASCII case-insensitive match for the
// string "hidden", then: set the frameset-ok flag to "not ok".
Token::StartTag {
tag_name,
is_self_closing,
attributes,
..
} if tag_name == "input" => {
let is_self_closing = *is_self_closing;
let input_type =
attributes.iter().find(|attribute| attribute.name == "type");
let is_hidden = match &input_type {
Some(input_type) => match &input_type.value {
Some(value) if value.as_ref().eq_ignore_ascii_case("hidden") => {
true
}
_ => false,
},
_ => false,
};
self.reconstruct_active_formatting_elements()?;
// To avoid extra cloning, it doesn't have effect on logic
if input_type.is_none() || !is_hidden {
self.frameset_ok = false;
}
self.insert_html_element(token_and_info)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
}
// A start tag whose tag name is one of: "param", "source", "track"
//
// Insert an HTML element for the token. Immediately pop the current node off
// the stack of open elements.
//
// Acknowledge the token's self-closing flag, if it is set.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(&**tag_name, "param" | "source" | "track") => {
let is_self_closing = *is_self_closing;
self.insert_html_element(token_and_info)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
}
// A start tag whose tag name is "hr"
//
// If the stack of open elements has a p element in button scope, then close a p
// element.
//
// Insert an HTML element for the token. Immediately pop the current node off
// the stack of open elements.
//
// Acknowledge the token's self-closing flag, if it is set.
//
// Set the frameset-ok flag to "not ok".
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "hr" => {
let is_self_closing = *is_self_closing;
if self.open_elements_stack.has_in_button_scope("p") {
self.close_p_element(token_and_info, false);
}
self.insert_html_element(token_and_info)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
self.frameset_ok = false;
}
// A start tag whose tag name is "image"
//
// Parse error. Change the token's tag name to "img" and reprocess it. (Don't
// ask.)
Token::StartTag { tag_name, .. } if tag_name == "image" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnexpectedImageStartTag,
));
match token_and_info {
TokenAndInfo {
token: Token::StartTag { tag_name, .. },
..
} => {
*tag_name = "img".into();
}
_ => {
unreachable!();
}
}
self.process_token(token_and_info, None)?;
}
// A start tag whose tag name is "textarea"
//
// Run these steps:
//
// Insert an HTML element for the token.
//
// If the next token is a U+000A LINE FEED (LF) character token, then ignore
// that token and move on to the next one. (Newlines at the start of textarea
// elements are ignored as an authoring convenience.)
//
// Switch the tokenizer to the RCDATA state.
//
// Let the original insertion mode be the current insertion mode.
//
// Set the frameset-ok flag to "not ok".
//
// Switch the insertion mode to "text".
Token::StartTag { tag_name, .. } if tag_name == "textarea" => {
self.insert_html_element(token_and_info)?;
// To prevent parsing more tokens in lexer we set state before taking
self.input.set_input_state(State::Rcdata);
match self.input.cur()? {
Some(Token::Character { value, .. }) if *value == '\x0A' => {
bump!(self);
}
_ => {}
};
self.original_insertion_mode = self.insertion_mode.clone();
self.frameset_ok = false;
self.insertion_mode = InsertionMode::Text;
}
// A start tag whose tag name is "xmp"
//
// If the stack of open elements has a p element in button scope, then close a p
// element.
//
// Reconstruct the active formatting elements, if any.
//
// Set the frameset-ok flag to "not ok".
//
// Follow the generic raw text element parsing algorithm.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "xmp" => {
if self.open_elements_stack.has_in_button_scope("p") {
self.close_p_element(token_and_info, false);
}
self.reconstruct_active_formatting_elements()?;
self.frameset_ok = false;
self.parse_generic_text_element(token_and_info, true)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "iframe"
//
// Set the frameset-ok flag to "not ok".
//
// Follow the generic raw text element parsing algorithm.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "iframe" => {
self.frameset_ok = false;
self.parse_generic_text_element(token_and_info, true)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "noembed"
//
// A start tag whose tag name is "noscript", if the scripting flag is enabled
//
// Follow the generic raw text element parsing algorithm.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "noembed"
|| (tag_name == "noscript" && self.config.scripting_enabled) =>
{
self.parse_generic_text_element(token_and_info, true)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "select"
//
// Reconstruct the active formatting elements, if any.
//
// Insert an HTML element for the token.
//
// Set the frameset-ok flag to "not ok".
//
// If the insertion mode is one of "in table", "in caption", "in table body",
// "in row", or "in cell", then switch the insertion mode to "in select in
// table". Otherwise, switch the insertion mode to "in select".
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "select" => {
self.reconstruct_active_formatting_elements()?;
self.insert_html_element(token_and_info)?;
self.frameset_ok = false;
match self.insertion_mode {
InsertionMode::InTable
| InsertionMode::InCaption
| InsertionMode::InTableBody
| InsertionMode::InRow
| InsertionMode::InCell => {
self.insertion_mode = InsertionMode::InSelectInTable;
}
_ => {
self.insertion_mode = InsertionMode::InSelect;
}
}
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "optgroup", "option"
//
// If the current node is an option element, then pop the current node off the
// stack of open elements.
//
// Reconstruct the active formatting elements, if any.
//
// Insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(&**tag_name, "optgroup" | "option") => {
match self.open_elements_stack.items.last() {
Some(node) if is_html_element!(node, "option") => {
self.open_elements_stack.pop();
}
_ => {}
}
self.reconstruct_active_formatting_elements()?;
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "rb", "rtc"
//
// If the stack of open elements has a ruby element in scope, then generate
// implied end tags. If the current node is not now a ruby element, this is a
// parse error.
//
// Insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(&**tag_name, "rb" | "rtc") => {
let is_scope = self.open_elements_stack.has_in_scope("ruby");
if is_scope {
self.open_elements_stack.generate_implied_end_tags();
}
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "ruby") => {
if !is_scope {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartTagSeenWithoutRuby(tag_name.clone()),
));
} else {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedChildrenInRuby,
));
}
}
_ => {}
}
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "rp", "rt"
//
// If the stack of open elements has a ruby element in scope, then generate
// implied end tags, except for rtc elements. If the current node is not now a
// rtc element or a ruby element, this is a parse error.
//
// Insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(&**tag_name, "rp" | "rt") => {
let in_scope = self.open_elements_stack.has_in_scope("ruby");
if in_scope {
self.open_elements_stack
.generate_implied_end_tags_with_exclusion("rtc");
}
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "rtc" | "ruby") => {
if !in_scope {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartTagSeenWithoutRuby(tag_name.clone()),
));
} else {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedChildrenInRuby,
));
}
}
_ => {}
}
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "math"
//
// Reconstruct the active formatting elements, if any.
//
// Adjust MathML attributes for the token. (This fixes the case of MathML
// attributes that are not all lowercase.)
//
// Adjust foreign attributes for the token. (This fixes the use of namespaced
// attributes, in particular XLink.)
//
// Insert a foreign element for the token, in the MathML namespace.
//
// If the token has its self-closing flag set, pop the current node off the
// stack of open elements and acknowledge the token's self-closing flag.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "math" => {
let is_self_closing = *is_self_closing;
self.reconstruct_active_formatting_elements()?;
self.insert_foreign_element(
token_and_info,
Namespace::MATHML,
Some(AdjustAttributes::MathML),
)?;
if is_self_closing {
self.open_elements_stack.pop();
token_and_info.acknowledged = true;
}
}
// A start tag whose tag name is "svg"
//
// Reconstruct the active formatting elements, if any.
//
// Adjust SVG attributes for the token. (This fixes the case of SVG attributes
// that are not all lowercase.)
//
// Adjust foreign attributes for the token. (This fixes the use of namespaced
// attributes, in particular XLink in SVG.)
//
// Insert a foreign element for the token, in the SVG namespace.
//
// If the token has its self-closing flag set, pop the current node off the
// stack of open elements and acknowledge the token's self-closing flag.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "svg" => {
let is_self_closing = *is_self_closing;
self.reconstruct_active_formatting_elements()?;
self.insert_foreign_element(
token_and_info,
Namespace::SVG,
Some(AdjustAttributes::Svg),
)?;
if is_self_closing {
self.open_elements_stack.pop();
token_and_info.acknowledged = true;
}
}
// A start tag whose tag name is one of: "caption", "col", "colgroup", "frame",
// "head", "tbody", "td", "tfoot", "th", "thead", "tr"
//
// Parse error. Ignore the token.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"caption"
| "col"
| "colgroup"
| "frame"
| "head"
| "tbody"
| "td"
| "tfoot"
| "th"
| "thead"
| "tr"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
}
// Any other start tag
//
// Reconstruct the active formatting elements, if any.
//
// Insert an HTML element for the token.
Token::StartTag {
is_self_closing,
tag_name,
..
} => {
self.reconstruct_active_formatting_elements()?;
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// Any other end tag
Token::EndTag { .. } => {
self.any_other_end_tag_for_in_body_insertion_mode(token_and_info);
}
}
// When the steps above say the user agent is to close a p
// element, it means that the user agent must run the following
// steps:
//
// Generate implied end tags, except for p elements.
//
// If the current node is not a p element, then this is a parse
// error.
//
// Pop elements from the stack of open elements until a p
// element has been popped from the stack.
//
// The adoption agency algorithm, which takes as its only
// argument a token token for which the algorithm is being run,
// consists of the following steps:
//
// Let subject be token's tag name.
//
// If the current node is an HTML element whose tag name is
// subject, and the current node is not in the list of active
// formatting elements, then pop the current node off the stack
// of open elements and return.
//
// Let outer loop counter be 0.
//
// While true:
//
// If outer loop counter is greater than or equal to 8, then
// return.
//
// Increment outer loop counter by 1.
//
// Let formatting element be the last element in the list of
// active formatting elements that:
//
// is between the end of the list and the last marker in the
// list, if any, or the start of the list otherwise, and
// has the tag name subject.
// If there is no such element, then return and instead act as
// described in the "any other end tag" entry above.
//
// If formatting element is not in the stack of open elements,
// then this is a parse error; remove the element from the list,
// and return.
//
// If formatting element is in the stack of open elements, but
// the element is not in scope, then this is a parse error;
// return.
//
// If formatting element is not the current node, this is a
// parse error. (But do not return.)
//
// Let furthest block be the topmost node in the stack of open
// elements that is lower in the stack than formatting element,
// and is an element in the special category. There might not be
// one.
//
// If there is no furthest block, then the UA must first pop all
// the nodes from the bottom of the stack of open elements, from
// the current node up to and including formatting element, then
// remove formatting element from the list of active formatting
// elements, and finally return.
//
// Let common ancestor be the element immediately above
// formatting element in the stack of open elements.
//
// Let a bookmark note the position of formatting element in the
// list of active formatting elements relative to the elements
// on either side of it in the list.
//
// Let node and last node be furthest block.
//
// Let inner loop counter be 0.
//
// While true:
//
// Increment inner loop counter by 1.
//
// Let node be the element immediately above node in the stack
// of open elements, or if node is no longer in the stack of
// open elements (e.g. because it got removed by this
// algorithm), the element that was immediately above node in
// the stack of open elements before node was removed.
//
// If node is formatting element, then break.
//
// If inner loop counter is greater than 3 and node is in the
// list of active formatting elements, then remove node from the
// list of active formatting elements.
//
// If node is not in the list of active formatting elements,
// then remove node from the stack of open elements and
// continue.
//
// Create an element for the token for which the element node
// was created, in the HTML namespace, with common ancestor as
// the intended parent; replace the entry for node in the list
// of active formatting elements with an entry for the new
// element, replace the entry for node in the stack of open
// elements with an entry for the new element, and let node be
// the new element.
//
// If last node is furthest block, then move the aforementioned
// bookmark to be immediately after the new node in the list of
// active formatting elements.
//
// Append last node to node.
//
// Set last node to node.
//
// Insert whatever last node ended up being in the previous step
// at the appropriate place for inserting a node, but using
// common ancestor as the override target.
//
// Create an element for the token for which formatting element
// was created, in the HTML namespace, with furthest block as
// the intended parent.
//
// Take all of the child nodes of furthest block and append them
// to the element created in the last step.
//
// Append that new element to furthest block.
//
// Remove formatting element from the list of active formatting
// elements, and insert the new element into the list of active
// formatting elements at the position of the aforementioned
// bookmark.
//
// Remove formatting element from the stack of open elements,
// and insert the new element into the stack of open elements
// immediately below the position of furthest block in that
// stack.
}
// The "text" insertion mode
InsertionMode::Text => {
// When the user agent is to apply the rules for the "text" insertion mode, the
// user agent must handle the token as follows:
match token {
// A character token
//
// Insert the token's character.
Token::Character { .. } => {
self.insert_character(token_and_info)?;
}
// An end-of-file token
//
// Parse error.
//
// If the current node is a script element, mark the script element as "already
// started".
//
// Pop the current node off the stack of open elements.
//
// Switch the insertion mode to the original insertion mode and reprocess the
// token.
Token::Eof => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::EofInText));
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.insertion_mode = self.original_insertion_mode.clone();
self.process_token(token_and_info, None)?;
}
// An end tag whose tag name is "script"
//
// If the active speculative HTML parser is null and the JavaScript execution
// context stack is empty, then perform a microtask checkpoint.
//
// Let script be the current node (which will be a script element).
//
// Pop the current node off the stack of open elements.
//
// Switch the insertion mode to the original insertion mode.
//
// Let the old insertion point have the same value as the current insertion
// point. Let the insertion point be just before the next input character.
//
// Increment the parser's script nesting level by one.
//
// If the active speculative HTML parser is null, then prepare the script. This
// might cause some script to execute, which might cause new characters to be
// inserted into the tokenizer, and might cause the tokenizer to output more
// tokens, resulting in a reentrant invocation of the parser.
//
// Decrement the parser's script nesting level by one. If the parser's script
// nesting level is zero, then set the parser pause flag to false.
//
// Let the insertion point have the value of the old insertion point. (In other
// words, restore the insertion point to its previous value. This value might be
// the "undefined" value.)
//
// At this stage, if there is a pending parsing-blocking script, then:
//
// If the script nesting level is not zero:
// Set the parser pause flag to true, and abort the processing of any nested
// invocations of the tokenizer, yielding control back to the caller.
// (Tokenization will resume when the caller returns to the "outer" tree
// construction stage.)
//
// The tree construction stage of this particular parser is being called
// reentrantly, say from a call to document.write().
//
// Otherwise:
// Run these steps:
//
// Let the script be the pending parsing-blocking script. There is no longer a
// pending parsing-blocking script.
//
// Start the speculative HTML parser for this instance of the HTML parser.
//
// Block the tokenizer for this instance of the HTML parser, such that the event
// loop will not run tasks that invoke the tokenizer.
//
// If the parser's Document has a style sheet that is blocking scripts or the
// script's "ready to be parser-executed" flag is not set: spin the event loop
// until the parser's Document has no style sheet that is blocking scripts and
// the script's "ready to be parser-executed" flag is set.
//
// If this parser has been aborted in the meantime, return.
//
// This could happen if, e.g., while the spin the event loop algorithm is
// running, the browsing context gets closed, or the document.open() method gets
// invoked on the Document.
//
// Stop the speculative HTML parser for this instance of the HTML parser.
//
// Unblock the tokenizer for this instance of the HTML parser, such that tasks
// that invoke the tokenizer can again be run.
//
// Let the insertion point be just before the next input character.
//
// Increment the parser's script nesting level by one (it should be zero before
// this step, so this sets it to one).
//
// Execute the script.
//
// Decrement the parser's script nesting level by one. If the parser's script
// nesting level is zero (which it always should be at this point), then set the
// parser pause flag to false.
//
// Let the insertion point be undefined again.
//
// If there is once again a pending parsing-blocking script, then repeat these
// steps from step 1.
Token::EndTag { tag_name, .. } if tag_name == "script" => {
// More things can be implemented to intercept script execution
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.insertion_mode = self.original_insertion_mode.clone();
}
// Any other end tag
//
// Pop the current node off the stack of open elements.
//
// Switch the insertion mode to the original insertion mode.
_ => {
if let Token::EndTag { .. } = token {
self.update_end_tag_span(
self.open_elements_stack.items.last(),
token_and_info.span,
);
}
self.open_elements_stack.pop();
self.insertion_mode = self.original_insertion_mode.clone();
}
}
}
// The "in table" insertion mode
InsertionMode::InTable => {
// When the user agent is to apply the rules for the "in table" insertion mode,
// the user agent must handle the token as follows:
match token {
// A character token, if the current node is table, tbody, tfoot, thead, or tr
// element
//
// Let the pending table character tokens be an empty list of tokens.
//
// Let the original insertion mode be the current insertion mode.
//
// Switch the insertion mode to "in table text" and reprocess the token.
Token::Character { .. }
if match self.open_elements_stack.items.last() {
Some(node)
if is_html_element!(
node,
"table" | "tbody" | "tfoot" | "thead" | "tr" | "template"
) =>
{
true
}
_ => false,
} =>
{
self.pending_character_tokens.clear();
self.original_insertion_mode = self.insertion_mode.clone();
self.insertion_mode = InsertionMode::InTableText;
self.process_token(token_and_info, None)?;
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "caption"
//
// Clear the stack back to a table context. (See below.)
//
// Insert a marker at the end of the list of active formatting elements.
//
// Insert an HTML element for the token, then switch the insertion mode to "in
// caption".
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "caption" => {
self.open_elements_stack.clear_back_to_table_context();
self.active_formatting_elements.insert_marker();
self.insert_html_element(token_and_info)?;
self.insertion_mode = InsertionMode::InCaption;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "colgroup"
//
// Clear the stack back to a table context. (See below.)
//
// Insert an HTML element for the token, then switch the insertion mode to "in
// column group".
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "colgroup" => {
self.open_elements_stack.clear_back_to_table_context();
self.insert_html_element(token_and_info)?;
self.insertion_mode = InsertionMode::InColumnGroup;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "col"
//
// Clear the stack back to a table context. (See below.)
//
// Insert an HTML element for a "colgroup" start tag token with no attributes,
// then switch the insertion mode to "in column group".
//
// Reprocess the current token.
Token::StartTag { tag_name, .. } if tag_name == "col" => {
self.open_elements_stack.clear_back_to_table_context();
self.insert_html_element(
&self.create_fake_token_and_info("colgroup", None),
)?;
self.insertion_mode = InsertionMode::InColumnGroup;
self.process_token(token_and_info, None)?;
}
// A start tag whose tag name is one of: "tbody", "tfoot", "thead"
//
// Clear the stack back to a table context. (See below.)
//
// Insert an HTML element for the token, then switch the insertion mode to "in
// table body".
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(&**tag_name, "tbody" | "tfoot" | "thead") => {
self.open_elements_stack.clear_back_to_table_context();
self.insert_html_element(token_and_info)?;
self.insertion_mode = InsertionMode::InTableBody;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "td", "th", "tr"
//
// Clear the stack back to a table context. (See below.)
//
// Insert an HTML element for a "tbody" start tag token with no attributes, then
// switch the insertion mode to "in table body".
//
// Reprocess the current token.
Token::StartTag { tag_name, .. }
if matches!(&**tag_name, "td" | "th" | "tr") =>
{
self.open_elements_stack.clear_back_to_table_context();
self.insert_html_element(&self.create_fake_token_and_info("tbody", None))?;
self.insertion_mode = InsertionMode::InTableBody;
self.process_token(token_and_info, None)?;
}
// A start tag whose tag name is "table"
//
// Parse error.
//
// If the stack of open elements does not have a table element in table scope,
// ignore the token.
//
// Otherwise:
//
// Pop elements from this stack until a table element has been popped from the
// stack.
//
// Reset the insertion mode appropriately.
//
// Reprocess the token.
Token::StartTag { tag_name, .. } if tag_name == "table" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::TableSeenWhileTableOpen,
));
if !self.open_elements_stack.has_in_table_scope("table") {
// Ignore
return Ok(());
}
self.open_elements_stack
.pop_until_tag_name_popped(&["table"]);
self.reset_insertion_mode();
self.process_token(token_and_info, None)?;
}
// An end tag whose tag name is "table"
//
// If the stack of open elements does not have a table element in table scope,
// this is a parse error; ignore the token.
//
// Otherwise:
//
// Pop elements from this stack until a table element has been popped from the
// stack.
//
// Reset the insertion mode appropriately.
Token::EndTag { tag_name, .. } if tag_name == "table" => {
if !self.open_elements_stack.has_in_table_scope("table") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
let popped = self
.open_elements_stack
.pop_until_tag_name_popped(&["table"]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.reset_insertion_mode();
}
}
// An end tag whose tag name is one of: "body", "caption", "col", "colgroup",
// "html", "tbody", "td", "tfoot", "th", "thead", "tr"
//
// Parse error. Ignore the token.
Token::EndTag { tag_name, .. }
if matches!(
&**tag_name,
"body"
| "caption"
| "col"
| "colgroup"
| "html"
| "tbody"
| "td"
| "tfoot"
| "th"
| "thead"
| "tr"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// A start tag whose tag name is one of: "style", "script", "template"
//
// An end tag whose tag name is "template"
//
// Process the token using the rules for the "in head" insertion mode.
Token::StartTag { tag_name, .. }
if matches!(&**tag_name, "style" | "script" | "template") =>
{
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
Token::EndTag { tag_name, .. } if tag_name == "template" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// A start tag whose tag name is "input"
//
// If the token does not have an attribute with the name "type", or if it does,
// but that attribute's value is not an ASCII case-insensitive match for the
// string "hidden", then: act as described in the "anything else" entry below.
//
// Otherwise:
//
// Parse error.
//
// Insert an HTML element for the token.
//
// Pop that input element off the stack of open elements.
//
// Acknowledge the token's self-closing flag, if it is set.
Token::StartTag {
tag_name,
attributes,
is_self_closing,
..
} if tag_name == "input" => {
let is_self_closing = *is_self_closing;
let input_type =
attributes.iter().find(|attribute| attribute.name == "type");
let is_hidden = match &input_type {
Some(input_type) => match &input_type.value {
Some(value) if value.as_ref().eq_ignore_ascii_case("hidden") => {
true
}
_ => false,
},
_ => false,
};
if input_type.is_none() || !is_hidden {
self.process_token_in_table_insertion_mode_anything_else(
token_and_info,
)?;
} else {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartTagInTable(tag_name.clone()),
));
self.insert_html_element(token_and_info)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
}
}
// A start tag whose tag name is "form"
//
// Parse error.
//
// If there is a template element on the stack of open elements, or if the form
// element pointer is not null, ignore the token.
//
// Otherwise:
//
// Insert an HTML element for the token, and set the form element pointer to
// point to the element created.
//
// Pop that form element off the stack of open elements.
Token::StartTag { tag_name, .. } if tag_name == "form" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartTagInTable(tag_name.clone()),
));
if self.open_elements_stack.contains_template_element()
|| self.form_element_pointer.is_some()
{
// Ignore
return Ok(());
}
let element = self.insert_html_element(token_and_info)?;
self.form_element_pointer = Some(element);
self.open_elements_stack.pop();
}
// An end-of-file token
//
// Process the token using the rules for the "in body" insertion mode.
Token::Eof => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// Anything else
//
// Parse error. Enable foster parenting, process the token using the rules for
// the "in body" insertion mode, and then disable foster parenting.
_ => {
self.process_token_in_table_insertion_mode_anything_else(token_and_info)?;
}
}
}
// The "in table text" insertion mode
InsertionMode::InTableText => {
// When the user agent is to apply the rules for the "in table text" insertion
// mode, the user agent must handle the token as follows:
match token {
// A character token that is U+0000 NULL
//
// Parse error. Ignore the token.
Token::Character { value, .. } if *value == '\x00' => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnexpectedNullCharacter,
));
}
// Any other character token
//
// Append the character token to the pending table character tokens list.
Token::Character { .. } => {
self.pending_character_tokens.push(token_and_info.clone());
}
// Anything else
//
// If any of the tokens in the pending table character tokens list are character
// tokens that are not ASCII whitespace, then this is a parse error: reprocess
// the character tokens in the pending table character tokens list using the
// rules given in the "anything else" entry in the "in table" insertion mode.
//
// Otherwise, insert the characters given by the pending table character tokens
// list.
//
// Switch the insertion mode to the original insertion mode and reprocess the
// token.
_ => {
let mut has_non_ascii_whitespace = false;
for character_token in &self.pending_character_tokens {
match character_token.token {
Token::Character { value, .. }
if !matches!(
value,
'\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20'
) =>
{
has_non_ascii_whitespace = true;
break;
}
_ => {}
}
}
if has_non_ascii_whitespace {
for mut character_token in mem::take(&mut self.pending_character_tokens)
{
self.process_token_in_table_insertion_mode_anything_else(
&mut character_token,
)?;
}
} else {
for mut character_token in mem::take(&mut self.pending_character_tokens)
{
self.insert_character(&mut character_token)?;
}
}
self.insertion_mode = self.original_insertion_mode.clone();
self.process_token(token_and_info, None)?;
}
}
}
// The "in caption" insertion mode
InsertionMode::InCaption => {
match token {
// An end tag whose tag name is "caption"
//
// If the stack of open elements does not have a caption element in table scope,
// this is a parse error; ignore the token. (fragment case)
//
// Otherwise:
//
// Generate implied end tags.
//
// Now, if the current node is not a caption element, then this is a parse
// error.
//
// Pop elements from this stack until a caption element has been popped from the
// stack.
//
// Clear the list of active formatting elements up to the last marker.
//
// Switch the insertion mode to "in table".
Token::EndTag { tag_name, .. } if tag_name == "caption" => {
if !self.open_elements_stack.has_in_table_scope("caption") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.open_elements_stack.generate_implied_end_tags();
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "caption") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
}
_ => {}
}
let popped = self
.open_elements_stack
.pop_until_tag_name_popped(&["caption"]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.active_formatting_elements.clear_to_last_marker();
self.insertion_mode = InsertionMode::InTable;
}
}
// A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody",
// "td", "tfoot", "th", "thead", "tr"
//
// An end tag whose tag name is "table"
//
// If the stack of open elements does not have a caption element in table scope,
// this is a parse error; ignore the token. (fragment case)
//
// Otherwise:
//
// Generate implied end tags.
//
// Now, if the current node is not a caption element, then this is a parse
// error.
//
// Pop elements from this stack until a caption element has been popped from the
// stack.
//
// Clear the list of active formatting elements up to the last marker.
//
// Switch the insertion mode to "in table".
//
// Reprocess the token.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"caption"
| "col"
| "colgroup"
| "tbody"
| "td"
| "tfoot"
| "th"
| "thead"
| "tr"
) =>
{
if !self.open_elements_stack.has_in_table_scope("caption") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
} else {
self.open_elements_stack.generate_implied_end_tags();
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "caption") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElementsOnStack,
));
}
_ => {}
}
self.open_elements_stack
.pop_until_tag_name_popped(&["caption"]);
self.active_formatting_elements.clear_to_last_marker();
self.insertion_mode = InsertionMode::InTable;
self.process_token(token_and_info, None)?;
}
}
Token::EndTag { tag_name, .. } if tag_name == "table" => {
if !self.open_elements_stack.has_in_table_scope("caption") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.open_elements_stack.generate_implied_end_tags();
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "caption") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElementsOnStack,
));
}
_ => {}
}
self.open_elements_stack
.pop_until_tag_name_popped(&["caption"]);
self.active_formatting_elements.clear_to_last_marker();
self.insertion_mode = InsertionMode::InTable;
self.process_token(token_and_info, None)?;
}
}
// An end tag whose tag name is one of: "body", "col", "colgroup", "html",
// "tbody", "td", "tfoot", "th", "thead", "tr"
//
// Parse error. Ignore the token.
Token::EndTag { tag_name, .. }
if matches!(
&**tag_name,
"body"
| "col"
| "colgroup"
| "html"
| "tbody"
| "td"
| "tfoot"
| "th"
| "thead"
| "tr"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// Anything else
//
// Process the token using the rules for the "in body" insertion mode.
_ => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
}
}
// The "in column group" insertion mode
InsertionMode::InColumnGroup => {
// When the user agent is to apply the rules for the "in column group" insertion
// mode, the user agent must handle the token as follows:
match token {
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Insert the character.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.insert_character(token_and_info)?;
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// A start tag whose tag name is "col"
//
// Insert an HTML element for the token. Immediately pop the current node off
// the stack of open elements.
//
// Acknowledge the token's self-closing flag, if it is set.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "col" => {
let is_self_closing = *is_self_closing;
self.insert_html_element(token_and_info)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
}
// An end tag whose tag name is "colgroup"
//
// If the current node is not a colgroup element, then this is a parse error;
// ignore the token.
//
// Otherwise, pop the current node from the stack of open elements. Switch the
// insertion mode to "in table".
Token::EndTag { tag_name, .. } if tag_name == "colgroup" => {
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "colgroup") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
}
_ => {
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.insertion_mode = InsertionMode::InTable;
}
}
}
// An end tag whose tag name is "col"
//
// Parse error. Ignore the token.
Token::EndTag { tag_name, .. } if tag_name == "col" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// A start tag whose tag name is "template"
//
// An end tag whose tag name is "template"
//
// Process the token using the rules for the "in head" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "template" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
Token::EndTag { tag_name, .. } if tag_name == "template" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// An end-of-file token
// Process the token using the rules for the "in body" insertion mode.
Token::Eof => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// Anything else
//
// If the current node is not a colgroup element, then this is a parse error;
// ignore the token.
//
// Otherwise, pop the current node from the stack of open elements.
//
// Switch the insertion mode to "in table".
//
// Reprocess the token.
_ => match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "colgroup") => match token {
Token::Character { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonSpaceCharacterInColumnGroup,
));
}
_ => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::GarbageInColumnGroup,
));
}
},
_ => {
self.open_elements_stack.pop();
self.insertion_mode = InsertionMode::InTable;
self.process_token(token_and_info, None)?;
}
},
}
}
// The "in table body" insertion mode
InsertionMode::InTableBody => {
// When the user agent is to apply the rules for the "in table body" insertion
// mode, the user agent must handle the token as follows:
match token {
// A start tag whose tag name is "tr"
//
// Clear the stack back to a table body context. (See below.)
//
// Insert an HTML element for the token, then switch the insertion mode to "in
// row".
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "tr" => {
self.open_elements_stack.clear_back_to_table_body_context();
self.insert_html_element(token_and_info)?;
self.insertion_mode = InsertionMode::InRow;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is one of: "th", "td"
//
// Parse error.
//
// Clear the stack back to a table body context. (See below.)
//
// Insert an HTML element for a "tr" start tag token with no attributes, then
// switch the insertion mode to "in row".
//
// Reprocess the current token.
Token::StartTag { tag_name, .. } if matches!(&**tag_name, "th" | "td") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartTagInTableBody(tag_name.clone()),
));
self.open_elements_stack.clear_back_to_table_body_context();
self.insert_html_element(&self.create_fake_token_and_info("tr", None))?;
self.insertion_mode = InsertionMode::InRow;
self.process_token(token_and_info, None)?;
}
// An end tag whose tag name is one of: "tbody", "tfoot", "thead"
//
// If the stack of open elements does not have an element in table scope that is
// an HTML element with the same tag name as the token, this is a parse error;
// ignore the token.
//
// Otherwise:
//
// Clear the stack back to a table body context. (See below.)
//
// Pop the current node from the stack of open elements. Switch the insertion
// mode to "in table".
Token::EndTag { tag_name, .. }
if matches!(&**tag_name, "tbody" | "tfoot" | "thead") =>
{
if !self.open_elements_stack.has_in_table_scope(tag_name) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.open_elements_stack.clear_back_to_table_body_context();
self.update_end_tag_span(
self.open_elements_stack.items.last(),
token_and_info.span,
);
self.open_elements_stack.pop();
self.insertion_mode = InsertionMode::InTable;
}
}
// A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody",
// "tfoot", "thead"
//
// An end tag whose tag name is "table"
//
// If the stack of open elements does not have a tbody, thead, or tfoot element
// in table scope, this is a parse error; ignore the token.
//
// Otherwise:
//
// Clear the stack back to a table body context. (See below.)
//
// Pop the current node from the stack of open elements. Switch the insertion
// mode to "in table".
//
// Reprocess the token.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"caption" | "col" | "colgroup" | "tbody" | "tfoot" | "thead"
) =>
{
if !(self.open_elements_stack.has_in_table_scope("tbody")
|| self.open_elements_stack.has_in_table_scope("thead")
|| self.open_elements_stack.has_in_table_scope("tfoot"))
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
} else {
self.open_elements_stack.clear_back_to_table_body_context();
self.open_elements_stack.pop();
self.insertion_mode = InsertionMode::InTable;
self.process_token(token_and_info, None)?;
}
}
Token::EndTag { tag_name, .. } if tag_name == "table" => {
if !(self.open_elements_stack.has_in_table_scope("tbody")
|| self.open_elements_stack.has_in_table_scope("thead")
|| self.open_elements_stack.has_in_table_scope("tfoot"))
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.open_elements_stack.clear_back_to_table_body_context();
self.open_elements_stack.pop();
self.insertion_mode = InsertionMode::InTable;
self.process_token(token_and_info, None)?;
}
}
// An end tag whose tag name is one of: "body", "caption", "col", "colgroup",
// "html", "td", "th", "tr"
//
// Parse error. Ignore the token.
Token::EndTag { tag_name, .. }
if matches!(
&**tag_name,
"body" | "caption" | "col" | "colgroup" | "html" | "td" | "th" | "tr"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// Anything else
//
// Process the token using the rules for the "in table" insertion mode.
_ => {
self.process_token_using_rules(token_and_info, InsertionMode::InTable)?;
}
}
}
// The "in row" insertion mode
InsertionMode::InRow => {
// When the user agent is to apply the rules for the "in row" insertion mode,
// the user agent must handle the token as follows:
match token {
// A start tag whose tag name is one of: "th", "td"
//
// Clear the stack back to a table row context. (See below.)
//
// Insert an HTML element for the token, then switch the insertion mode to "in
// cell".
//
// Insert a marker at the end of the list of active formatting elements.
Token::StartTag {
tag_name,
is_self_closing,
..
} if matches!(&**tag_name, "th" | "td") => {
self.open_elements_stack.clear_back_to_table_row_context();
self.insert_html_element(token_and_info)?;
self.insertion_mode = InsertionMode::InCell;
self.active_formatting_elements.insert_marker();
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// An end tag whose tag name is "tr"
//
// If the stack of open elements does not have a tr element in table scope, this
// is a parse error; ignore the token.
//
// Otherwise:
//
// Clear the stack back to a table row context. (See below.)
//
// Pop the current node (which will be a tr element) from the stack of open
// elements. Switch the insertion mode to "in table body".
Token::EndTag { tag_name, .. } if tag_name == "tr" => {
if !self.open_elements_stack.has_in_table_scope("tr") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NoTableRowToClose,
));
} else {
self.open_elements_stack.clear_back_to_table_row_context();
self.update_end_tag_span(
self.open_elements_stack.items.last(),
token_and_info.span,
);
self.open_elements_stack.pop();
self.insertion_mode = InsertionMode::InTableBody;
}
}
// A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody",
// "tfoot", "thead", "tr"
//
// An end tag whose tag name is "table"
//
// If the stack of open elements does not have a tr element in table scope, this
// is a parse error; ignore the token.
//
// Otherwise:
//
// Clear the stack back to a table row context. (See below.)
//
// Pop the current node (which will be a tr element) from the stack of open
// elements. Switch the insertion mode to "in table body".
//
// Reprocess the token.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"caption" | "col" | "colgroup" | "tbody" | "tfoot" | "thead" | "tr"
) =>
{
if !self.open_elements_stack.has_in_table_scope("tr") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NoTableRowToClose,
));
} else {
self.open_elements_stack.clear_back_to_table_row_context();
self.open_elements_stack.pop();
self.insertion_mode = InsertionMode::InTableBody;
self.process_token(token_and_info, None)?;
}
}
Token::EndTag { tag_name, .. } if tag_name == "table" => {
if !self.open_elements_stack.has_in_table_scope("tr") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NoTableRowToClose,
));
} else {
self.open_elements_stack.clear_back_to_table_row_context();
self.open_elements_stack.pop();
self.insertion_mode = InsertionMode::InTableBody;
self.process_token(token_and_info, None)?;
}
}
// An end tag whose tag name is one of: "tbody", "tfoot", "thead"
//
// If the stack of open elements does not have an element in table scope that is
// an HTML element with the same tag name as the token, this is a parse error;
// ignore the token.
//
// If the stack of open elements does not have a tr element in table scope,
// ignore the token.
//
// Otherwise:
//
// Clear the stack back to a table row context. (See below.)
//
// Pop the current node (which will be a tr element) from the stack of open
// elements. Switch the insertion mode to "in table body".
//
// Reprocess the token.
Token::EndTag { tag_name, .. }
if matches!(&**tag_name, "tbody" | "tfoot" | "thead") =>
{
if !self.open_elements_stack.has_in_table_scope(tag_name) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else if !self.open_elements_stack.has_in_table_scope("tr") {
// Ignore
return Ok(());
} else {
self.open_elements_stack.clear_back_to_table_row_context();
self.open_elements_stack.pop();
self.insertion_mode = InsertionMode::InTableBody;
self.process_token(token_and_info, None)?;
}
}
// An end tag whose tag name is one of: "body", "caption", "col", "colgroup",
// "html", "td", "th"
//
// Parse error. Ignore the token.
Token::EndTag { tag_name, .. }
if matches!(
&**tag_name,
"body" | "caption" | "col" | "colgroup" | "html" | "td" | "th"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// Anything else
//
// Process the token using the rules for the "in table" insertion mode.
_ => {
self.process_token_using_rules(token_and_info, InsertionMode::InTable)?;
}
}
}
// The "in cell" insertion mode
InsertionMode::InCell => {
// When the user agent is to apply the rules for the "in cell" insertion mode,
// the user agent must handle the token as follows:
match token {
// An end tag whose tag name is one of: "td", "th"
//
// If the stack of open elements does not have an element in table scope that is
// an HTML element with the same tag name as that of the token, then this is a
// parse error; ignore the token.
//
// Otherwise:
//
// Generate implied end tags.
//
// Now, if the current node is not an HTML element with the same tag name as the
// token, then this is a parse error.
//
// Pop elements from the stack of open elements stack until an HTML element with
// the same tag name as the token has been popped from the stack.
//
// Clear the list of active formatting elements up to the last marker.
//
// Switch the insertion mode to "in row".
Token::EndTag { tag_name, .. } if matches!(&**tag_name, "td" | "th") => {
if !self.open_elements_stack.has_in_table_scope(tag_name) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.open_elements_stack.generate_implied_end_tags();
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element_with_tag_name!(node, tag_name) => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
}
_ => {}
}
let popped = self
.open_elements_stack
.pop_until_tag_name_popped(&[tag_name]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.active_formatting_elements.clear_to_last_marker();
self.insertion_mode = InsertionMode::InRow;
}
}
// A start tag whose tag name is one of: "caption", "col", "colgroup", "tbody",
// "td", "tfoot", "th", "thead", "tr"
//
// If the stack of open elements does not have a td or th element in table
// scope, then this is a parse error; ignore the token. (fragment case)
//
// Otherwise, close the cell (see below) and reprocess the token.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"caption"
| "col"
| "colgroup"
| "tbody"
| "td"
| "tfoot"
| "th"
| "thead"
| "tr"
) =>
{
if !self.open_elements_stack.has_in_table_scope("td")
&& !self.open_elements_stack.has_in_table_scope("th")
{
self.errors
.push(Error::new(token_and_info.span, ErrorKind::NoCellToClose));
} else {
self.close_the_cell();
self.process_token(token_and_info, None)?;
}
}
// An end tag whose tag name is one of: "body", "caption", "col", "colgroup",
// "html"
//
// Parse error. Ignore the token.
Token::EndTag { tag_name, .. }
if matches!(
&**tag_name,
"body" | "caption" | "col" | "colgroup" | "html"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// An end tag whose tag name is one of: "table", "tbody", "tfoot", "thead", "tr"
//
// If the stack of open elements does not have an element in table scope that is
// an HTML element with the same tag name as that of the token, then this is a
// parse error; ignore the token.
//
// Otherwise, close the cell (see below) and reprocess the token.
Token::EndTag { tag_name, .. }
if matches!(&**tag_name, "table" | "tbody" | "tfoot" | "thead" | "tr") =>
{
if !self.open_elements_stack.has_in_table_scope(tag_name) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
))
} else {
self.close_the_cell();
self.process_token(token_and_info, None)?;
}
}
// Anything else
//
// Process the token using the rules for the "in body" insertion mode.
_ => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
}
// Where the steps above say to close the cell, they mean to run
// the following algorithm:
//
// Generate implied end tags.
//
// If the current node is not now a td element or a th element,
// then this is a parse error.
//
// Pop elements from the stack of open elements stack until a td
// element or a th element has been popped from the stack.
//
// Clear the list of active formatting elements up to the last
// marker.
//
// Switch the insertion mode to "in row".
}
// The "in select" insertion mode
InsertionMode::InSelect => {
match token {
// A character token that is U+0000 NULL
//
// Parse error. Ignore the token.
Token::Character { value, .. } if *value == '\x00' => self.errors.push(
Error::new(token_and_info.span, ErrorKind::UnexpectedNullCharacter),
),
// Any other character token
//
// Insert the token's character.
Token::Character { .. } => {
self.insert_character(token_and_info)?;
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// A start tag whose tag name is "option"
//
// If the current node is an option element, pop that node from the stack of
// open elements.
//
// Insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "option" => {
match self.open_elements_stack.items.last() {
Some(node) if is_html_element!(node, "option") => {
self.open_elements_stack.pop();
}
_ => {}
}
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// A start tag whose tag name is "optgroup"
//
// If the current node is an option element, pop that node from the stack of
// open elements.
//
// If the current node is an optgroup element, pop that node from the stack of
// open elements.
//
// Insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "optgroup" => {
match self.open_elements_stack.items.last() {
Some(node) if is_html_element!(node, "option") => {
self.open_elements_stack.pop();
}
_ => {}
}
match self.open_elements_stack.items.last() {
Some(node) if is_html_element!(node, "optgroup") => {
self.open_elements_stack.pop();
}
_ => {}
}
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// An end tag whose tag name is "optgroup"
//
// First, if the current node is an option element, and the node immediately
// before it in the stack of open elements is an optgroup element, then pop the
// current node from the stack of open elements.
//
// If the current node is an optgroup element, then pop that node from the stack
// of open elements. Otherwise, this is a parse error; ignore the token.
Token::EndTag { tag_name, .. } if tag_name == "optgroup" => {
match self.open_elements_stack.items.last() {
Some(node) if is_html_element!(node, "option") => {
match self
.open_elements_stack
.items
// `-1` is `current node`, because `The current node is the
// bottommost node in this stack of open elements.`
// `-2` is node immediately before it in the stack of open
// elements
.get(self.open_elements_stack.items.len() - 2)
{
Some(node) if is_html_element!(node, "optgroup") => {
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(
popped.as_ref(),
token_and_info.span,
);
}
_ => {}
}
}
_ => {}
}
match self.open_elements_stack.items.last() {
Some(node) if is_html_element!(node, "optgroup") => {
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
}
_ => self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
)),
}
}
// An end tag whose tag name is "option"
//
// If the current node is an option element, then pop that node from the stack
// of open elements. Otherwise, this is a parse error; ignore the token.
Token::EndTag { tag_name, .. } if tag_name == "option" => {
match self.open_elements_stack.items.last() {
Some(node) if is_html_element!(node, "option") => {
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
}
_ => self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
)),
}
}
// An end tag whose tag name is "select"
//
// If the stack of open elements does not have a select element in select scope,
// this is a parse error; ignore the token. (fragment case)
//
// Otherwise:
//
// Pop elements from the stack of open elements until a select element has been
// popped from the stack.
//
// Reset the insertion mode appropriately.
Token::EndTag { tag_name, .. } if tag_name == "select" => {
if !self.open_elements_stack.has_in_select_scope("select") {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
let popped = self
.open_elements_stack
.pop_until_tag_name_popped(&["select"]);
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
self.reset_insertion_mode();
}
}
// A start tag whose tag name is "select"
//
// Parse error.
//
// If the stack of open elements does not have a select element in select scope,
// ignore the token. (fragment case)
//
// Otherwise:
//
// Pop elements from the stack of open elements until a select element has been
// popped from the stack.
//
// Reset the insertion mode appropriately.
Token::StartTag { tag_name, .. } if tag_name == "select" => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartSelectWhereEndSelectExpected,
));
if !self.open_elements_stack.has_in_select_scope("select") {
// Ignore
return Ok(());
}
self.open_elements_stack
.pop_until_tag_name_popped(&["select"]);
self.reset_insertion_mode();
}
// A start tag whose tag name is one of: "input", "keygen", "textarea"
//
// Parse error.
//
// If the stack of open elements does not have a select element in select scope,
// ignore the token. (fragment case)
//
// Otherwise:
//
// Pop elements from the stack of open elements until a select element has been
// popped from the stack.
//
// Reset the insertion mode appropriately.
//
// Reprocess the token.
Token::StartTag { tag_name, .. }
if matches!(&**tag_name, "input" | "keygen" | "textarea") =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartTagWithSelectOpen(tag_name.clone()),
));
if !self.open_elements_stack.has_in_select_scope("select") {
// Ignore
return Ok(());
}
self.open_elements_stack
.pop_until_tag_name_popped(&["select"]);
self.reset_insertion_mode();
self.process_token(token_and_info, None)?;
}
// A start tag whose tag name is one of: "script", "template"
//
// An end tag whose tag name is "template"
//
// Process the token using the rules for the "in head" insertion mode.
Token::StartTag { tag_name, .. }
if matches!(&**tag_name, "script" | "template") =>
{
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
Token::EndTag { tag_name, .. } if tag_name == "template" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// An end-of-file token
//
// Process the token using the rules for the "in body" insertion mode.
Token::Eof => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// Anything else
//
// Parse error. Ignore the token.
_ => match token {
Token::StartTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
_ => {
unreachable!()
}
},
}
}
// The "in select in table" insertion mode
InsertionMode::InSelectInTable => {
// When the user agent is to apply the rules for the "in select in table"
// insertion mode, the user agent must handle the token as follows:
match token {
// A start tag whose tag name is one of: "caption", "table", "tbody", "tfoot",
// "thead", "tr", "td", "th"
//
// Parse error.
//
// Pop elements from the stack of open elements until a select element has been
// popped from the stack.
//
// Reset the insertion mode appropriately.
//
// Reprocess the token.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"caption" | "table" | "tbody" | "tfoot" | "thead" | "tr" | "td" | "th"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartTagWithSelectOpen(tag_name.clone()),
));
self.open_elements_stack
.pop_until_tag_name_popped(&["select"]);
self.reset_insertion_mode();
self.process_token(token_and_info, None)?;
}
// An end tag whose tag name is one of: "caption", "table", "tbody", "tfoot",
// "thead", "tr", "td", "th"
//
// Parse error.
//
// If the stack of open elements does not have an element in table scope that is
// an HTML element with the same tag name as that of the token, then ignore the
// token.
//
// Otherwise:
//
// Pop elements from the stack of open elements until a select element has been
// popped from the stack.
//
// Reset the insertion mode appropriately.
//
// Reprocess the token.
Token::EndTag { tag_name, .. }
if matches!(
&**tag_name,
"caption" | "table" | "tbody" | "tfoot" | "thead" | "tr" | "td" | "th"
) =>
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EndTagSeenWithSelectOpen(tag_name.clone()),
));
if !self.open_elements_stack.has_in_table_scope(tag_name) {
// Ignore
return Ok(());
}
self.open_elements_stack
.pop_until_tag_name_popped(&["select"]);
self.reset_insertion_mode();
self.process_token(token_and_info, None)?;
}
// Anything else
//
// Process the token using the rules for the "in select" insertion mode.
_ => {
self.process_token_using_rules(token_and_info, InsertionMode::InSelect)?;
}
}
}
// The "in template" insertion mode
InsertionMode::InTemplate => {
// When the user agent is to apply the rules for the "in template" insertion
// mode, the user agent must handle the token as follows:
match token {
// A character token
// A comment token
// A DOCTYPE token
//
// Process the token using the rules for the "in body" insertion mode.
Token::Character { .. } | Token::Comment { .. } | Token::Doctype { .. } => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// A start tag whose tag name is one of: "base", "basefont", "bgsound", "link",
// "meta", "noframes", "script", "style", "template", "title"
//
// An end tag whose tag name is "template"
//
// Process the token using the rules for the "in head" insertion mode.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"base"
| "basefont"
| "bgsound"
| "link"
| "meta"
| "noframes"
| "script"
| "style"
| "template"
| "title"
) =>
{
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
Token::EndTag { tag_name, .. } if tag_name == "template" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// A start tag whose tag name is one of: "caption", "colgroup", "tbody",
// "tfoot", "thead"
//
// Pop the current template insertion mode off the stack of template insertion
// modes.
//
// Push "in table" onto the stack of template insertion modes so that it is the
// new current template insertion mode.
//
// Switch the insertion mode to "in table", and reprocess the token.
Token::StartTag { tag_name, .. }
if matches!(
&**tag_name,
"caption" | "colgroup" | "tbody" | "tfoot" | "thead"
) =>
{
self.template_insertion_mode_stack.pop();
self.template_insertion_mode_stack
.push(InsertionMode::InTable);
self.insertion_mode = InsertionMode::InTable;
self.process_token(token_and_info, None)?;
}
// A start tag whose tag name is "col"
//
// Pop the current template insertion mode off the stack of template insertion
// modes.
//
// Push "in column group" onto the stack of template insertion modes so that it
// is the new current template insertion mode.
//
// Switch the insertion mode to "in column group", and reprocess the token.
Token::StartTag { tag_name, .. } if tag_name == "col" => {
self.template_insertion_mode_stack.pop();
self.template_insertion_mode_stack
.push(InsertionMode::InColumnGroup);
self.insertion_mode = InsertionMode::InColumnGroup;
self.process_token(token_and_info, None)?;
}
// A start tag whose tag name is "tr"
//
// Pop the current template insertion mode off the stack of template insertion
// modes.
//
// Push "in table body" onto the stack of template insertion modes so that it is
// the new current template insertion mode.
//
// Switch the insertion mode to "in table body", and reprocess the token.
Token::StartTag { tag_name, .. } if tag_name == "tr" => {
self.template_insertion_mode_stack.pop();
self.template_insertion_mode_stack
.push(InsertionMode::InTableBody);
self.insertion_mode = InsertionMode::InTableBody;
self.process_token(token_and_info, None)?;
}
// A start tag whose tag name is one of: "td", "th"
//
// Pop the current template insertion mode off the stack of template insertion
// modes.
//
// Push "in row" onto the stack of template insertion modes so that it is the
// new current template insertion mode.
//
// Switch the insertion mode to "in row", and reprocess the token.
Token::StartTag { tag_name, .. } if matches!(&**tag_name, "td" | "th") => {
self.template_insertion_mode_stack.pop();
self.template_insertion_mode_stack
.push(InsertionMode::InRow);
self.insertion_mode = InsertionMode::InRow;
self.process_token(token_and_info, None)?;
}
// Any other start tag
//
// Pop the current template insertion mode off the stack of template insertion
// modes.
//
// Push "in body" onto the stack of template insertion modes so that it is the
// new current template insertion mode.
//
// Switch the insertion mode to "in body", and reprocess the token.
Token::StartTag { .. } => {
self.template_insertion_mode_stack.pop();
self.template_insertion_mode_stack
.push(InsertionMode::InBody);
self.insertion_mode = InsertionMode::InBody;
self.process_token(token_and_info, None)?;
}
// Any other end tag
//
// Parse error. Ignore the token.
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
// An end-of-file token
//
// If there is no template element on the stack of open elements, then stop
// parsing. (fragment case)
//
// Otherwise, this is a parse error.
//
// Pop elements from the stack of open elements until a template element has
// been popped from the stack.
//
// Clear the list of active formatting elements up to the last marker.
//
// Pop the current template insertion mode off the stack of template insertion
// modes.
//
// Reset the insertion mode appropriately.
//
// Reprocess the token.
Token::Eof => {
if !self.open_elements_stack.contains_template_element() {
self.stopped = true;
} else {
self.update_end_tag_span(
self.open_elements_stack.items.last(),
token_and_info.span,
);
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EofWithUnclosedElements,
));
self.open_elements_stack
.pop_until_tag_name_popped(&["template"]);
self.active_formatting_elements.clear_to_last_marker();
self.template_insertion_mode_stack.pop();
self.reset_insertion_mode();
self.process_token(token_and_info, None)?;
}
}
}
}
// The "after body" insertion mode
InsertionMode::AfterBody => {
// When the user agent is to apply the rules for the "after body" insertion
// mode, the user agent must handle the token as follows:
match token {
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Process the token using the rules for the "in body" insertion mode.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// A comment token
//
// Insert a comment as the last child of the first element in the stack of open
// elements (the html element).
Token::Comment { .. } => {
self.insert_comment_as_last_child_of_first_element(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// An end tag whose tag name is "html"
//
// If the parser was created as part of the HTML fragment parsing algorithm,
// this is a parse error; ignore the token. (fragment case)
//
// Otherwise, switch the insertion mode to "after after body".
Token::EndTag { tag_name, .. } if tag_name == "html" => {
if self.is_fragment_case {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
self.update_end_tag_span(
self.open_elements_stack.items.first(),
token_and_info.span,
);
self.insertion_mode = InsertionMode::AfterAfterBody;
}
}
// An end-of-file token
//
// Stop parsing.
Token::Eof => {
self.update_end_tag_span(
self.open_elements_stack.items.last(),
token_and_info.span,
);
self.stopped = true;
}
// Anything else
//
// Parse error. Switch the insertion mode to "in body" and reprocess the token.
_ => {
match token {
// Doctype handled above
// Comment handled above
// EOF handled above
Token::Character { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonSpaceCharacterAfterBody,
));
}
Token::StartTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
}
Token::EndTag { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EndTagAfterBody,
));
}
_ => {
unreachable!();
}
}
self.insertion_mode = InsertionMode::InBody;
self.process_token(token_and_info, None)?;
}
}
}
// The "in frameset" insertion mode
InsertionMode::InFrameset => {
// When the user agent is to apply the rules for the "in frameset" insertion
// mode, the user agent must handle the token as follows:
match token {
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Insert the character.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.insert_character(token_and_info)?;
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// A start tag whose tag name is "frameset"
//
// Insert an HTML element for the token.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "frameset" => {
self.insert_html_element(token_and_info)?;
maybe_allow_self_closing!(is_self_closing, tag_name);
}
// An end tag whose tag name is "frameset"
//
// If the current node is the root html element, then this is a parse error;
// ignore the token. (fragment case)
//
// Otherwise, pop the current node from the stack of open elements.
//
// If the parser was not created as part of the HTML fragment parsing algorithm
// (fragment case), and the current node is no longer a frameset element, then
// switch the insertion mode to "after frameset".
Token::EndTag { tag_name, .. } if tag_name == "frameset" => {
let is_root_html_document = match self.open_elements_stack.items.last() {
Some(node)
if is_html_element!(node, "html")
&& self.open_elements_stack.items.len() == 1 =>
{
true
}
_ => false,
};
if is_root_html_document {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
} else {
let popped = self.open_elements_stack.pop();
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
if !self.is_fragment_case {
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "frameset") => {
self.insertion_mode = InsertionMode::AfterFrameset;
}
_ => {}
}
}
}
}
// A start tag whose tag name is "frame"
//
// Insert an HTML element for the token. Immediately pop the current node off
// the stack of open elements.
//
// Acknowledge the token's self-closing flag, if it is set.
Token::StartTag {
tag_name,
is_self_closing,
..
} if tag_name == "frame" => {
let is_self_closing = *is_self_closing;
self.insert_html_element(token_and_info)?;
self.open_elements_stack.pop();
if is_self_closing {
token_and_info.acknowledged = true;
}
}
// A start tag whose tag name is "noframes"
//
// Process the token using the rules for the "in head" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "noframes" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// An end-of-file token
//
// If the current node is not the root html element, then this is a parse error.
//
// Note: The current node can only be the root html element in the fragment
// case.
//
// Stop parsing.
Token::Eof => {
self.update_end_tag_span(
self.open_elements_stack.items.last(),
token_and_info.span,
);
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "html") => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EofWithUnclosedElements,
));
}
_ => {}
}
self.stopped = true;
}
// Anything else
//
// Parse error. Ignore the token.
_ => match token {
// Doctype handled above
// Comment handled above
// EOF handled above
Token::Character { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonSpaceCharacterInFrameset,
));
}
Token::StartTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
_ => {
unreachable!()
}
},
}
}
// The "after frameset" insertion mode
InsertionMode::AfterFrameset => {
// When the user agent is to apply the rules for the "after frameset" insertion
// mode, the user agent must handle the token as follows:
match token {
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// Insert the character.
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.insert_character(token_and_info)?;
}
// A comment token
//
// Insert a comment.
Token::Comment { .. } => {
self.insert_comment(token_and_info)?;
}
// A DOCTYPE token
//
// Parse error. Ignore the token.
Token::Doctype { .. } => {
self.errors
.push(Error::new(token_and_info.span, ErrorKind::StrayDoctype));
}
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// An end tag whose tag name is "html"
//
// Switch the insertion mode to "after after frameset".
Token::EndTag { tag_name, .. } if tag_name == "html" => {
self.update_end_tag_span(
self.open_elements_stack.items.last(),
token_and_info.span,
);
self.insertion_mode = InsertionMode::AfterAfterFrameset;
}
// A start tag whose tag name is "noframes"
//
// Process the token using the rules for the "in head" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "noframes" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// An end-of-file token
//
// Stop parsing.
Token::Eof => {
self.stopped = true;
}
// Anything else
//
// Parse error. Ignore the token.
_ => match token {
// Doctype handled above
// Comment handled above
// EOF handled above
Token::Character { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonSpaceCharacterAfterFrameset,
));
}
Token::StartTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
_ => {
unreachable!()
}
},
}
}
// The "after after body" insertion mode
InsertionMode::AfterAfterBody => {
// When the user agent is to apply the rules for the "after after body"
// insertion mode, the user agent must handle the token as follows:
match token {
// A comment token
//
// Insert a comment as the last child of the Document object.
Token::Comment { .. } => {
self.insert_comment_as_last_child_of_document(token_and_info)?;
}
// A DOCTYPE token
//
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::Doctype { .. } => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// An end-of-file token
//
// Stop parsing.
Token::Eof => {
self.stopped = true;
}
// Anything else
//
// Parse error. Switch the insertion mode to "in body" and reprocess the token.
_ => {
match token {
// Doctype handled above
// Comment handled above
// EOF handled above
Token::Character { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonSpaceCharacterInTrailer,
));
}
Token::StartTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
_ => {
unreachable!();
}
}
self.insertion_mode = InsertionMode::InBody;
self.process_token(token_and_info, None)?;
}
}
}
// The "after after frameset" insertion mode
InsertionMode::AfterAfterFrameset => {
// When the user agent is to apply the rules for the "after after frameset"
// insertion mode, the user agent must handle the token as follows:
match token {
// A comment token
//
// Insert a comment as the last child of the Document object.
Token::Comment { .. } => {
self.insert_comment_as_last_child_of_document(token_and_info)?;
}
// A DOCTYPE token
//
// A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE
// FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020
// SPACE
//
// A start tag whose tag name is "html"
//
// Process the token using the rules for the "in body" insertion mode.
Token::Doctype { .. } => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
Token::Character {
value: '\x09' | '\x0A' | '\x0C' | '\x0D' | '\x20',
..
} => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
Token::StartTag { tag_name, .. } if tag_name == "html" => {
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
}
// An end-of-file token
//
// Stop parsing.
Token::Eof => {
self.update_end_tag_span(
self.open_elements_stack.items.last(),
token_and_info.span,
);
self.stopped = true;
}
// A start tag whose tag name is "noframes"
//
// Process the token using the rules for the "in head" insertion mode.
Token::StartTag { tag_name, .. } if tag_name == "noframes" => {
self.process_token_using_rules(token_and_info, InsertionMode::InHead)?;
}
// Anything else
//
// Parse error. Ignore the token.
// Anything else
//
// Parse error. Ignore the token.
_ => match token {
// Doctype handled above
// Comment handled above
// EOF handled above
Token::Character { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonSpaceCharacterInTrailer,
));
}
Token::StartTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayStartTag(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
_ => {
unreachable!();
}
},
}
}
}
Ok(())
}
fn process_token_in_table_insertion_mode_anything_else(
&mut self,
token_and_info: &mut TokenAndInfo,
) -> PResult<()> {
match &token_and_info.token {
Token::StartTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StartTagInTable(tag_name.clone()),
));
}
Token::EndTag { tag_name, .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
}
Token::Character { .. } => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NonSpaceCharacterInTable,
));
}
_ => {
unreachable!();
}
}
let saved_foster_parenting_state = self.foster_parenting_enabled;
self.foster_parenting_enabled = true;
self.process_token_using_rules(token_and_info, InsertionMode::InBody)?;
self.foster_parenting_enabled = saved_foster_parenting_state;
Ok(())
}
// Any other end tag
//
// Run these steps:
//
// 1. Initialize node to be the current node (the bottommost node of the stack).
//
// 2. Loop: If node is an HTML element with the same tag name as the token,
// then:
//
// 1. Generate implied end tags, except for HTML elements with the same tag
// name as the token.
//
// 2. If node is not the current node, then this is a parse error.
//
// 3. Pop all the nodes from the current node up to node, including node, then
// stop these steps.
//
// 3. Otherwise, if node is in the special category, then this is a parse error;
// ignore the token, and return.
//
// 4. Set node to the previous entry in the stack of open elements.
//
// 5. Return to the step labeled loop.
fn any_other_end_tag_for_in_body_insertion_mode(&mut self, token_and_info: &TokenAndInfo) {
let mut match_idx = None;
let tag_name = match &token_and_info.token {
Token::StartTag { tag_name, .. } | Token::EndTag { tag_name, .. } => tag_name,
_ => {
unreachable!();
}
};
// 1., 2., 4. and 5.
for (i, node) in self.open_elements_stack.items.iter().enumerate().rev() {
if is_html_element_with_tag_name!(node, tag_name) {
match_idx = Some(i);
break;
}
// 3.
if self.is_special_element(node) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
return;
}
}
let match_idx = match match_idx {
None => {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::StrayEndTag(tag_name.clone()),
));
return;
}
Some(x) => x,
};
// 2. - 1.
self.open_elements_stack
.generate_implied_end_tags_with_exclusion(tag_name);
// 2. - 2.
if match_idx != self.open_elements_stack.items.len() - 1 {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElements(tag_name.clone()),
));
} else {
let node = self.open_elements_stack.items.last();
self.update_end_tag_span(node, token_and_info.span);
}
// 2.- 3.
self.open_elements_stack.items.truncate(match_idx);
}
fn process_token_using_rules(
&mut self,
token_and_info: &mut TokenAndInfo,
insertion_mode: InsertionMode,
) -> PResult<()> {
self.process_token(token_and_info, Some(insertion_mode))?;
Ok(())
}
// When the steps below require the user agent to adjust MathML attributes for a
// token, then, if the token has an attribute named definitionurl, change its
// name to definitionURL (note the case difference).
fn adjust_math_ml_attribute(&self, attribute: &mut Attribute) {
if attribute.name == "definitionurl" {
attribute.name = "definitionURL".into();
}
}
// When the steps below require the user agent to adjust SVG attributes for a
// token, then, for each attribute on the token whose attribute name is one of
// the ones in the first column of the following table, change the attribute's
// name to the name given in the corresponding cell in the second column. (This
// fixes the case of SVG attributes that are not all lowercase.)
//
// Attribute name on token Attribute name on element
// attributename attributeName
// attributetype attributeType
// basefrequency baseFrequency
// baseprofile baseProfile
// calcmode calcMode
// clippathunits clipPathUnits
// diffuseconstant diffuseConstant
// edgemode edgeMode
// filterunits filterUnits
// glyphref glyphRef
// gradienttransform gradientTransform
// gradientunits gradientUnits
// kernelmatrix kernelMatrix
// kernelunitlength kernelUnitLength
// keypoints keyPoints
// keysplines keySplines
// keytimes keyTimes
// lengthadjust lengthAdjust
// limitingconeangle limitingConeAngle
// markerheight markerHeight
// markerunits markerUnits
// markerwidth markerWidth
// maskcontentunits maskContentUnits
// maskunits maskUnits
// numoctaves numOctaves
// pathlength pathLength
// patterncontentunits patternContentUnits
// patterntransform patternTransform
// patternunits patternUnits
// pointsatx pointsAtX
// pointsaty pointsAtY
// pointsatz pointsAtZ
// preservealpha preserveAlpha
// preserveaspectratio preserveAspectRatio
// primitiveunits primitiveUnits
// refx refX
// refy refY
// repeatcount repeatCount
// repeatdur repeatDur
// requiredextensions requiredExtensions
// requiredfeatures requiredFeatures
// specularconstant specularConstant
// specularexponent specularExponent
// spreadmethod spreadMethod
// startoffset startOffset
// stddeviation stdDeviation
// stitchtiles stitchTiles
// surfacescale surfaceScale
// systemlanguage systemLanguage
// tablevalues tableValues
// targetx targetX
// targety targetY
// textlength textLength
// viewbox viewBox
// viewtarget viewTarget
// xchannelselector xChannelSelector
// ychannelselector yChannelSelector
// zoomandpan zoomAndPan
fn adjust_svg_attribute(&self, attribute: &mut Attribute) {
match &*attribute.name {
"attributename" => attribute.name = "attributeName".into(),
"attributetype" => attribute.name = "attributeType".into(),
"basefrequency" => attribute.name = "baseFrequency".into(),
"baseprofile" => attribute.name = "baseProfile".into(),
"calcmode" => attribute.name = "calcMode".into(),
"clippathunits" => attribute.name = "clipPathUnits".into(),
"diffuseconstant" => attribute.name = "diffuseConstant".into(),
"edgemode" => attribute.name = "edgeMode".into(),
"filterunits" => attribute.name = "filterUnits".into(),
"glyphref" => attribute.name = "glyphRef".into(),
"gradienttransform" => attribute.name = "gradientTransform".into(),
"gradientunits" => attribute.name = "gradientUnits".into(),
"kernelmatrix" => attribute.name = "kernelMatrix".into(),
"kernelunitlength" => attribute.name = "kernelUnitLength".into(),
"keypoints" => attribute.name = "keyPoints".into(),
"keysplines" => attribute.name = "keySplines".into(),
"keytimes" => attribute.name = "keyTimes".into(),
"lengthadjust" => attribute.name = "lengthAdjust".into(),
"limitingconeangle" => attribute.name = "limitingConeAngle".into(),
"markerheight" => attribute.name = "markerHeight".into(),
"markerunits" => attribute.name = "markerUnits".into(),
"markerwidth" => attribute.name = "markerWidth".into(),
"maskcontentunits" => attribute.name = "maskContentUnits".into(),
"maskunits" => attribute.name = "maskUnits".into(),
"numoctaves" => attribute.name = "numOctaves".into(),
"pathlength" => attribute.name = "pathLength".into(),
"patterncontentunits" => attribute.name = "patternContentUnits".into(),
"patterntransform" => attribute.name = "patternTransform".into(),
"patternunits" => attribute.name = "patternUnits".into(),
"pointsatx" => attribute.name = "pointsAtX".into(),
"pointsaty" => attribute.name = "pointsAtY".into(),
"pointsatz" => attribute.name = "pointsAtZ".into(),
"preservealpha" => attribute.name = "preserveAlpha".into(),
"preserveaspectratio" => attribute.name = "preserveAspectRatio".into(),
"primitiveunits" => attribute.name = "primitiveUnits".into(),
"refx" => attribute.name = "refX".into(),
"refy" => attribute.name = "refY".into(),
"repeatcount" => attribute.name = "repeatCount".into(),
"repeatdur" => attribute.name = "repeatDur".into(),
"requiredextensions" => attribute.name = "requiredExtensions".into(),
"requiredfeatures" => attribute.name = "requiredFeatures".into(),
"specularconstant" => attribute.name = "specularConstant".into(),
"specularexponent" => attribute.name = "specularExponent".into(),
"spreadmethod" => attribute.name = "spreadMethod".into(),
"startoffset" => attribute.name = "startOffset".into(),
"stddeviation" => attribute.name = "stdDeviation".into(),
"stitchtiles" => attribute.name = "stitchTiles".into(),
"surfacescale" => attribute.name = "surfaceScale".into(),
"systemlanguage" => attribute.name = "systemLanguage".into(),
"tablevalues" => attribute.name = "tableValues".into(),
"targetx" => attribute.name = "targetX".into(),
"targety" => attribute.name = "targetY".into(),
"textlength" => attribute.name = "textLength".into(),
"viewbox" => attribute.name = "viewBox".into(),
"viewtarget" => attribute.name = "viewTarget".into(),
"xchannelselector" => attribute.name = "xChannelSelector".into(),
"ychannelselector" => attribute.name = "yChannelSelector".into(),
"zoomandpan" => attribute.name = "zoomAndPan".into(),
_ => {}
}
}
// When the steps below require the user agent to adjust foreign attributes for
// a token, then, if any of the attributes on the token match the strings given
// in the first column of the following table, let the attribute be a namespaced
// attribute, with the prefix being the string given in the corresponding cell
// in the second column, the local name being the string given in the
// corresponding cell in the third column, and the namespace being the namespace
// given in the corresponding cell in the fourth column. (This fixes the use of
// namespaced attributes, in particular lang attributes in the XML namespace.)
//
//
// Attribute name Prefix Local name Namespace
//
// xlink:actuate xlink actuate XLink namespace
// xlink:arcrole xlink arcrole XLink namespace
// xlink:href xlink href XLink namespace
// xlink:role xlink role XLink namespace
// xlink:show xlink show XLink namespace
// xlink:title xlink title XLink namespace
// xlink:type xlink type XLink namespace
// xml:lang xml lang XML namespace
// xml:space xml space XML namespace
// xmlns (none) xmlns XMLNS namespace
// xmlns:xlink xmlns xlink XMLNS namespace
fn adjust_foreign_attribute(&self, attribute: &mut Attribute) {
match &*attribute.name {
"xlink:actuate" => {
attribute.namespace = Some(Namespace::XLINK);
attribute.prefix = Some("xlink".into());
attribute.name = "actuate".into();
}
"xlink:arcrole" => {
attribute.namespace = Some(Namespace::XLINK);
attribute.prefix = Some("xlink".into());
attribute.name = "arcrole".into();
}
"xlink:href" => {
attribute.namespace = Some(Namespace::XLINK);
attribute.prefix = Some("xlink".into());
attribute.name = "href".into();
}
"xlink:role" => {
attribute.namespace = Some(Namespace::XLINK);
attribute.prefix = Some("xlink".into());
attribute.name = "role".into();
}
"xlink:show" => {
attribute.namespace = Some(Namespace::XLINK);
attribute.prefix = Some("xlink".into());
attribute.name = "show".into();
}
"xlink:title" => {
attribute.namespace = Some(Namespace::XLINK);
attribute.prefix = Some("xlink".into());
attribute.name = "title".into();
}
"xlink:type" => {
attribute.namespace = Some(Namespace::XLINK);
attribute.prefix = Some("xlink".into());
attribute.name = "type".into();
}
"xml:lang" => {
attribute.namespace = Some(Namespace::XML);
attribute.prefix = Some("xml".into());
attribute.name = "lang".into();
}
"xml:space" => {
attribute.namespace = Some(Namespace::XML);
attribute.prefix = Some("xml".into());
attribute.name = "space".into();
}
"xmlns" => {
attribute.namespace = Some(Namespace::XMLNS);
attribute.prefix = None;
attribute.name = "xmlns".into();
}
"xmlns:xlink" => {
attribute.namespace = Some(Namespace::XMLNS);
attribute.prefix = Some("xmlns".into());
attribute.name = "xlink".into();
}
_ => {}
}
}
fn create_element_for_token(
&self,
token: Token,
span: Span,
namespace: Option<Namespace>,
adjust_attributes: Option<AdjustAttributes>,
) -> RcNode {
let element = match token {
Token::StartTag {
tag_name,
attributes,
is_self_closing,
..
}
| Token::EndTag {
tag_name,
attributes,
is_self_closing,
..
} => {
let attributes = attributes
.into_iter()
.map(|attribute_token| {
let mut attribute = Attribute {
span: attribute_token.span,
namespace: None,
prefix: None,
name: attribute_token.name,
raw_name: attribute_token.raw_name,
value: attribute_token.value,
raw_value: attribute_token.raw_value,
};
match adjust_attributes {
Some(AdjustAttributes::MathML) => {
self.adjust_math_ml_attribute(&mut attribute);
self.adjust_foreign_attribute(&mut attribute);
}
Some(AdjustAttributes::Svg) => {
self.adjust_svg_attribute(&mut attribute);
self.adjust_foreign_attribute(&mut attribute);
}
None => {}
}
attribute
})
.collect();
Data::Element {
tag_name,
namespace: namespace.unwrap(),
attributes: RefCell::new(attributes),
is_self_closing,
}
}
_ => {
unreachable!();
}
};
Node::new(element, span)
}
// The adoption agency algorithm, which takes as its only argument a token token
// for which the algorithm is being run, consists of the following steps:
//
// 1. Let subject be token's tag name.
//
// 2. If the current node is an HTML element whose tag name is subject, and the
// current node is not in the list of active formatting elements, then pop the
// current node off the stack of open elements and return.
//
// 3. Let outer loop counter be 0.
//
// 4. While true:
//
// 1. If outer loop counter is greater than or equal to 8, then return.
//
// 2. Increment outer loop counter by 1.
//
// 3. Let formatting element be the last element in the list of active
// formatting elements that:
//
// is between the end of the list and the last marker in the list, if
// any, or the start of the list otherwise, and has the tag name subject.
//
// If there is no such element, then return and instead act as described
// in the "any other end tag" entry above.
//
// 4. If formatting element is not in the stack of open elements, then this
// is a parse error; remove the element from the list, and return.
//
// 5. If formatting element is in the stack of open elements, but the element
// is not in scope, then this is a parse error; return.
//
// 6. If formatting element is not the current node, this is a parse error.
// (But do not return.)
//
// 7. Let furthest block be the topmost node in the stack of open elements
// that is lower in the stack than formatting element, and is an element
// in the special category. There might not be one.
//
// 8. If there is no furthest block, then the UA must first pop all the nodes
// from the bottom of the stack of open elements, from the current node
// up to and including formatting element, then remove formatting element
// from the list of active formatting elements, and finally return.
//
// 9. Let common ancestor be the element immediately above formatting element
// in the stack of open elements.
//
// 10. Let a bookmark note the position of formatting element in the list of
// active formatting elements relative to the elements on either side of
// it in the list.
//
// 11. Let node and last node be furthest block.
//
// 12. Let inner loop counter be 0.
//
// 13. While true:
//
// 1. Increment inner loop counter by 1.
//
// 2. Let node be the element immediately above node in the stack of open
// elements, or if node is no longer in the stack of open
// elements (e.g. because it got removed by this algorithm), the
// element that was immediately above node in the stack of open
// elements before node was removed.
//
// 3. If node is formatting element, then break.
//
// 4. If inner loop counter is greater than 3 and node is in the list of
// active formatting elements, then remove node from the list of
// active formatting elements.
//
// 5. If node is not in the list of active formatting elements, then
// remove node from the stack of open elements and continue.
//
// 6. Create an element for the token for which the element node was
// created, in the HTML namespace, with common ancestor as the
// intended parent; replace the entry for node in the list of active
// formatting elements with an entry for the new element, replace the
// entry for node in the stack of open elements with an entry for the
// new element, and let node be the new element.
//
// 7. If last node is furthest block, then move the aforementioned
// bookmark to be immediately after the new node in the list of
// active formatting elements.
//
// 8. Append last node to node.
//
// 9. Set last node to node.
//
// 14. Insert whatever last node ended up being in the previous step at the
// appropriate place for inserting a node, but using common ancestor as the
// override target.
//
// 15, Create an element for the token for which formatting element was created,
// in the HTML namespace, with furthest block as the intended parent.
//
// 16. Take all of the child nodes of furthest block and append them to the
// element created in the last step.
//
// 17. Append that new element to furthest block.
//
// 18. Remove formatting element from the list of active formatting elements,
// and insert the new element into the list of active formatting elements at
// the position of the aforementioned bookmark.
//
// 19. Remove formatting element from the stack of open elements, and insert the
// new element into the stack of open elements immediately below the
// position of furthest block in that stack.
//
// This algorithm's name, the "adoption agency algorithm", comes from the way it
// causes elements to change parents, and is in contrast with other possible
// algorithms for dealing with misnested content.
fn run_the_adoption_agency_algorithm(
&mut self,
token_and_info: &TokenAndInfo,
is_closing: bool,
) -> PResult<()> {
// 1.
let subject = match &token_and_info.token {
Token::StartTag { tag_name, .. } | Token::EndTag { tag_name, .. } => tag_name.clone(),
_ => {
unreachable!();
}
};
// 2.
let last = self.open_elements_stack.items.last();
if let Some(last) = last {
if is_html_element_with_tag_name!(last, &subject)
&& self.active_formatting_elements.get_position(last).is_none()
{
let popped = self.open_elements_stack.pop();
if is_closing {
self.update_end_tag_span(popped.as_ref(), token_and_info.span);
}
return Ok(());
}
}
// 3.
let mut counter = 0;
// 4.
loop {
// 1.
if counter >= 8 {
return Ok(());
}
// 2.
counter += 1;
// 3.
let formatting_element = self
.active_formatting_elements
.items
.iter()
.enumerate()
.rev()
.find(|info| match &info.1 {
ActiveFormattingElement::Element(element, _) => {
is_html_element_with_tag_name!(element, &subject)
}
_ => false,
})
.map(|(i, e)| match e {
ActiveFormattingElement::Element(node, token_and_info) => {
(i, node.clone(), token_and_info.clone())
}
_ => {
unreachable!()
}
});
if formatting_element.is_none() {
self.any_other_end_tag_for_in_body_insertion_mode(token_and_info);
return Ok(());
}
let formatting_element = formatting_element.unwrap();
// 4.
let formatting_element_stack_index = self
.open_elements_stack
.items
.iter()
.rposition(|n| is_same_node(n, &formatting_element.1));
if formatting_element_stack_index.is_none() {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NoElementToCloseButEndTagSeen(subject),
));
self.active_formatting_elements
.remove(&formatting_element.1);
return Ok(());
}
// 5.
if formatting_element_stack_index.is_some()
&& !self
.open_elements_stack
.has_node_in_scope(&formatting_element.1)
{
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::NoElementToCloseButEndTagSeen(subject),
));
return Ok(());
}
let formatting_element_stack_index = formatting_element_stack_index.unwrap();
// 6.
if let Some(node) = self.open_elements_stack.items.last() {
if !is_same_node(node, &formatting_element.1) {
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::EndTagViolatesNestingRules(subject.clone()),
));
}
}
// 7.
let furthest_block = self
.open_elements_stack
.items
.iter()
.enumerate()
.skip(formatting_element_stack_index)
.find(|&(_, open_element)| self.is_special_element(open_element))
.map(|(i, h)| (i, h.clone()));
// 8.
if furthest_block.is_none() {
while let Some(node) = self.open_elements_stack.pop() {
if is_same_node(&node, &formatting_element.1) {
if is_closing {
self.update_end_tag_span(Some(&node), token_and_info.span);
}
break;
}
}
self.active_formatting_elements
.remove(&formatting_element.1);
return Ok(());
}
// 9.
let common_ancestor =
self.open_elements_stack.items[formatting_element_stack_index - 1].clone();
// 10.
let mut bookmark = Bookmark::Replace(formatting_element.1.clone());
// 11.
let furthest_block = furthest_block.unwrap();
let mut node;
let mut node_index = furthest_block.0;
let mut last_node = furthest_block.1.clone();
// 12.
let mut inner_loop_counter = 0;
// 13.
loop {
// 13.1
inner_loop_counter += 1;
// 13.2
node_index -= 1;
node = self.open_elements_stack.items[node_index].clone();
// 13.3
if is_same_node(&node, &formatting_element.1) {
break;
}
// 13.4
let node_formatting_index = self.active_formatting_elements.get_position(&node);
let mut node_in_list = node_formatting_index.is_some();
if inner_loop_counter > 3 && node_in_list {
self.active_formatting_elements.remove(&node);
node_in_list = false;
}
// 13.5
if !node_in_list {
self.open_elements_stack.remove(&node);
continue;
}
// 13.6
let node_formatting_index = node_formatting_index.unwrap();
let token_and_info =
match self.active_formatting_elements.items[node_formatting_index] {
ActiveFormattingElement::Element(ref h, ref t) => {
assert!(is_same_node(h, &node));
t.clone()
}
ActiveFormattingElement::Marker => {
panic!("Found marker during adoption agency")
}
};
let new_element = self.create_element_for_token(
token_and_info.token.clone(),
token_and_info.span,
Some(Namespace::HTML),
None,
);
self.active_formatting_elements.items[node_formatting_index] =
ActiveFormattingElement::Element(new_element.clone(), token_and_info);
self.open_elements_stack
.replace(node_index, new_element.clone());
node = new_element;
// 13.7
if is_same_node(&last_node, &furthest_block.1) {
bookmark = Bookmark::InsertAfter(node.clone());
}
// 13.8
if let Some((parent, i)) = self.get_parent_and_index(&last_node) {
parent.children.borrow_mut().remove(i);
last_node.parent.set(None);
}
self.append_node(&node, last_node);
// 13.9
last_node = node;
}
// 14.
if let Some((parent, i)) = self.get_parent_and_index(&last_node) {
parent.children.borrow_mut().remove(i);
last_node.parent.set(None);
}
let appropriate_place =
self.get_appropriate_place_for_inserting_node(Some(common_ancestor))?;
self.insert_at_position(appropriate_place, last_node.clone());
// 15.
let start_span = match &furthest_block.1.children.borrow().first() {
Some(first) => first.start_span.borrow().lo,
_ => token_and_info.span.lo(),
};
let new_element = self.create_element_for_token(
formatting_element.2.token.clone(),
Span::new(start_span, token_and_info.span.hi()),
Some(Namespace::HTML),
None,
);
// 16.
self.reparent_children(&furthest_block.1, &new_element);
// 17.
self.append_node(&furthest_block.1, new_element.clone());
// 18.
match bookmark {
Bookmark::Replace(to_replace) => {
let index = self
.active_formatting_elements
.get_position(&to_replace)
.expect("bookmark not found in active formatting elements");
self.active_formatting_elements.items[index] =
ActiveFormattingElement::Element(new_element.clone(), formatting_element.2);
}
Bookmark::InsertAfter(previous) => {
let index = self
.active_formatting_elements
.get_position(&previous)
.expect("bookmark not found in active formatting elements")
+ 1;
self.active_formatting_elements.items.insert(
index,
ActiveFormattingElement::Element(new_element.clone(), formatting_element.2),
);
let old_index = self
.active_formatting_elements
.get_position(&formatting_element.1)
.expect("formatting element not found in active formatting elements");
self.active_formatting_elements.items.remove(old_index);
}
}
// 19.
self.open_elements_stack.remove(&formatting_element.1);
let new_furthest_block_index = self
.open_elements_stack
.items
.iter()
.position(|n| is_same_node(n, &furthest_block.1))
.expect("furthest block missing from open element stack");
self.open_elements_stack
.insert(new_furthest_block_index + 1, new_element);
}
}
fn reparent_children(&mut self, node: &RcNode, new_parent: &RcNode) {
let mut children = node.children.borrow_mut();
let mut new_children = new_parent.children.borrow_mut();
for child in children.iter() {
let previous_parent = child.parent.replace(Some(Rc::downgrade(new_parent)));
// It is possible when new created element doesn't have parent
if let Some(previous_parent) = previous_parent {
assert!(is_same_node(
node,
&previous_parent.upgrade().expect("dangling weak")
));
}
}
new_children.extend(std::mem::take(&mut *children));
}
// When the steps below require the UA to reconstruct the active formatting
// elements, the UA must perform the following steps:
//
// 1. If there are no entries in the list of active formatting elements, then
// there is nothing to reconstruct; stop this algorithm.
//
// 2. If the last (most recently added) entry in the list of active formatting
// elements is a marker, or if it is an element that is in the stack of open
// elements, then there is nothing to reconstruct; stop this algorithm.
//
// 3. Let entry be the last (most recently added) element in the list of active
// formatting elements.
//
// 4. Rewind: If there are no entries before entry in the list of active
// formatting elements, then jump to the step labeled create.
//
// 5. Let entry be the entry one earlier than entry in the list of active
// formatting elements.
//
// 6. If entry is neither a marker nor an element that is also in the stack of
// open elements, go to the step labeled rewind.
//
// 7. Advance: Let entry be the element one later than entry in the list of
// active formatting elements.
//
// 8. Create: Insert an HTML element for the token for which the element entry
// was created, to obtain new element.
//
// 9. Replace the entry for entry in the list with an entry for new element.
//
// 10. If the entry for new element in the list of active formatting elements is
// not the last entry in the list, return to the step labeled advance.
//
// This has the effect of reopening all the formatting elements that were opened
// in the current body, cell, or caption (whichever is youngest) that haven't
// been explicitly closed.
fn reconstruct_active_formatting_elements(&mut self) -> PResult<()> {
let last = match self.active_formatting_elements.items.last() {
None => {
return Ok(());
}
Some(x) => x,
};
if self.is_marker_or_open(last) {
return Ok(());
}
let mut entry_index = self.active_formatting_elements.items.len() - 1;
loop {
if entry_index == 0 {
break;
}
entry_index -= 1;
if self.is_marker_or_open(&self.active_formatting_elements.items[entry_index]) {
entry_index += 1;
break;
}
}
loop {
let token_and_info = match self.active_formatting_elements.items[entry_index] {
ActiveFormattingElement::Element(_, ref t) => t.clone(),
ActiveFormattingElement::Marker => {
panic!("Found marker during formatting element reconstruction")
}
};
let new_element = self.insert_html_element(&token_and_info)?;
self.active_formatting_elements.items[entry_index] =
ActiveFormattingElement::Element(new_element, token_and_info);
if entry_index == self.active_formatting_elements.items.len() - 1 {
break Ok(());
}
entry_index += 1;
}
}
fn is_marker_or_open(&self, entry: &ActiveFormattingElement) -> bool {
match *entry {
ActiveFormattingElement::Marker => true,
ActiveFormattingElement::Element(ref node, _) => self
.open_elements_stack
.items
.iter()
.rev()
.any(|n| is_same_node(n, node)),
}
}
fn create_fake_html_element(&self) -> RcNode {
Node::new(
Data::Element {
tag_name: "html".into(),
namespace: Namespace::HTML,
attributes: RefCell::new(Vec::new()),
is_self_closing: false,
},
DUMMY_SP,
)
}
fn create_fake_token_and_info(&self, tag_name: &str, span: Option<Span>) -> TokenAndInfo {
TokenAndInfo {
span: match span {
Some(span) => span,
_ => DUMMY_SP,
},
acknowledged: false,
token: Token::StartTag {
tag_name: tag_name.into(),
raw_tag_name: None,
is_self_closing: false,
attributes: Vec::new(),
},
}
}
// Parsing elements that contain only text
// The generic raw text element parsing algorithm and the generic RCDATA element
// parsing algorithm consist of the following steps. These algorithms are always
// invoked in response to a start tag token.
fn parse_generic_text_element(
&mut self,
token_and_info: &TokenAndInfo,
is_raw_text_element_algorithm: bool,
) -> PResult<()> {
// Insert an HTML element for the token.
self.insert_html_element(token_and_info)?;
// If the algorithm that was invoked is the generic raw text element
// parsing algorithm, switch the tokenizer to the RAWTEXT state;
// otherwise the algorithm invoked was the generic RCDATA element
// parsing algorithm, switch the tokenizer to the RCDATA state.
if is_raw_text_element_algorithm {
self.input.set_input_state(State::Rawtext);
} else {
self.input.set_input_state(State::Rcdata);
}
// Let the original insertion mode be the current insertion mode.
self.original_insertion_mode = self.insertion_mode.clone();
// Then, switch the insertion mode to "text".
self.insertion_mode = InsertionMode::Text;
Ok(())
}
fn close_p_element(&mut self, token_and_info: &TokenAndInfo, is_close_p: bool) {
// When the steps above say the user agent is to close a p element, it means
// that the user agent must run the following steps:
// 1. Generate implied end tags, except for p elements.
self.open_elements_stack
.generate_implied_end_tags_with_exclusion("p");
// 2. If the current node is not a p element, then this is a parse error.
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "p") => {
let tag_name = match &token_and_info.token {
Token::StartTag { tag_name, .. } | Token::EndTag { tag_name, .. } => {
tag_name.clone()
}
_ => {
unreachable!();
}
};
self.errors.push(Error::new(
token_and_info.span,
ErrorKind::UnclosedElementsImplied(tag_name),
));
}
_ => {}
}
// 3. Pop elements from the stack of open elements until a p element has been
// popped from the stack.
let popped = self.open_elements_stack.pop_until_tag_name_popped(&["p"]);
if is_close_p {
self.update_end_tag_span(popped.as_ref(), token_and_info.span)
}
}
fn close_the_cell(&mut self) {
// Generate implied end tags.
self.open_elements_stack.generate_implied_end_tags();
// If the current node is not now a td element or a th element, then this is a
// parse error.
match self.open_elements_stack.items.last() {
Some(node) if !is_html_element!(node, "td" | "th") => {
self.errors.push(Error::new(
*node.start_span.borrow(),
ErrorKind::UnclosedElementsCell,
));
}
_ => {}
}
// Pop elements from the stack of open elements stack until a td
// element or a th element has been popped from the stack.
self.open_elements_stack
.pop_until_tag_name_popped(&["td", "th"]);
// Clear the list of active formatting elements up to the last marker.
self.active_formatting_elements.clear_to_last_marker();
// Switch the insertion mode to "in row".
self.insertion_mode = InsertionMode::InRow;
// NOTE: The stack of open elements cannot have both a td and a th
// element in table scope at the same time, nor can it have neither
// when the close the cell algorithm is invoked.
}
fn reset_insertion_mode(&mut self) {
// 1. Let last be false.
let mut last = false;
let mut iter = self.open_elements_stack.items.iter().rev();
let first = self.open_elements_stack.items.first();
// 2. Let node be the last node in the stack of open elements.
while let Some(mut inner_node) = iter.next() {
// 3. Loop: If node is the first node in the stack of open elements, then set
// last to true, and, if the parser was created as part of the HTML fragment
// parsing algorithm (fragment case), set node to the context element passed to
// that algorithm.
if let Some(first) = first {
if is_same_node(first, inner_node) {
last = true;
if self.is_fragment_case {
// Fragment case
if let Some(context_element) = &self.context_element {
inner_node = context_element;
}
}
}
}
// Optimization - logic below only works with HTML namespaces, so we can skip
// extra checks
if get_namespace!(inner_node) != Namespace::HTML {
if last {
self.insertion_mode = InsertionMode::InBody;
return;
}
continue;
}
let tag_name = get_tag_name!(inner_node);
// 4. If node is a select element, run these substeps:
//
// 1. If last is true, jump to the step below labeled done.
//
// 2. Let ancestor be node.
//
// 3. Loop: If ancestor is the first node in the stack of open elements, jump
// to the step below labeled done.
//
// 4. Let ancestor be the node before ancestor in the stack of open elements.
//
// 5. If ancestor is a template node, jump to the step below labeled done.
//
// 6. If ancestor is a table node, switch the insertion mode to "in select in
// table" and return.
//
// 7. Jump back to the step labeled loop.
//
// 8. Done: Switch the insertion mode to "in select" and return.
if tag_name == "select" {
if !last {
let mut ancestor = Some(inner_node);
while ancestor.is_some() {
if let Some(ancestor) = ancestor {
if let Some(first) = first {
if is_same_node(ancestor, first) {
break;
}
}
}
ancestor = iter.next();
if let Some(ancestor) = ancestor {
if is_html_element!(ancestor, "template") {
break;
} else if is_html_element!(ancestor, "table") {
self.insertion_mode = InsertionMode::InSelectInTable;
return;
}
}
}
}
self.insertion_mode = InsertionMode::InSelect;
return;
}
// 5. If node is a td or th element and last is false, then switch the insertion
// mode to "in cell" and return.
if (tag_name == "td" || tag_name == "th") && !last {
self.insertion_mode = InsertionMode::InCell;
return;
}
// 6. If node is a tr element, then switch the insertion mode to "in row" and
// return.
if tag_name == "tr" {
self.insertion_mode = InsertionMode::InRow;
return;
}
// 7. If node is a tbody, thead, or tfoot element, then switch the insertion
// mode to "in table body" and return.
if tag_name == "tbody" || tag_name == "thead" || tag_name == "tfoot" {
self.insertion_mode = InsertionMode::InTableBody;
return;
}
// 8. If node is a caption element, then switch the insertion mode to "in
// caption" and return.
if tag_name == "caption" {
self.insertion_mode = InsertionMode::InCaption;
return;
}
// 9. If node is a colgroup element, then switch the insertion mode to "in
// column group" and return.
if tag_name == "colgroup" {
self.insertion_mode = InsertionMode::InColumnGroup;
return;
}
// // 10. If node is a table element, then switch the insertion mode to "in
// table" and return.
if tag_name == "table" {
self.insertion_mode = InsertionMode::InTable;
return;
}
// 11. If node is a template element, then switch the insertion mode to the
// current template insertion mode and return.
if tag_name == "template" {
if let Some(last) = self.template_insertion_mode_stack.last() {
self.insertion_mode = last.clone();
return;
}
}
// 12. If node is a head element and last is false, then switch the insertion
// mode to "in head" and return.
if tag_name == "head" && !last {
self.insertion_mode = InsertionMode::InHead;
return;
}
// 13. If node is a body element, then switch the insertion mode to "in body"
// and return.
if tag_name == "body" {
self.insertion_mode = InsertionMode::InBody;
return;
}
// 14. If node is a frameset element, then switch the insertion mode to "in
// frameset" and return. (fragment case)
if tag_name == "frameset" {
self.insertion_mode = InsertionMode::InFrameset;
return;
}
// 15. If node is an html element, run these substeps:
//
// 1. If the head element pointer is null, switch the insertion mode to
// "before head" and return. (fragment case)
//
// 2. Otherwise, the head element pointer is not null, switch the insertion
// mode to "after head" and return.
if tag_name == "html" {
if self.head_element_pointer.is_none() {
// Fragment case
self.insertion_mode = InsertionMode::BeforeHead;
} else {
self.insertion_mode = InsertionMode::AfterHead;
}
return;
}
// 16. If last is true, then switch the insertion mode to "in body" and return.
// (fragment case)
if last {
self.insertion_mode = InsertionMode::InBody;
return;
}
// 17. Let node now be the node before node in the stack of open
// elements.
//
// 18. Return to the step labeled loop.
}
}
fn set_document_mode(&mut self, document_mode: DocumentMode) {
if let Some(document) = &self.document {
match &document.data {
Data::Document { mode, .. } => {
let mut mode = mode.borrow_mut();
*mode = document_mode;
}
_ => {
unreachable!();
}
}
}
}
fn is_special_element(&self, node: &RcNode) -> bool {
if is_html_element!(
node,
"address"
| "applet"
| "area"
| "article"
| "aside"
| "base"
| "basefont"
| "bgsound"
| "blockquote"
| "body"
| "br"
| "button"
| "caption"
| "center"
| "col"
| "colgroup"
| "dd"
| "details"
| "dir"
| "div"
| "dl"
| "dt"
| "embed"
| "fieldset"
| "figcaption"
| "figure"
| "footer"
| "form"
| "frame"
| "frameset"
| "h1"
| "h2"
| "h3"
| "h4"
| "h5"
| "h6"
| "head"
| "header"
| "hgroup"
| "hr"
| "html"
| "iframe"
| "img"
| "input"
| "keygen"
| "li"
| "link"
| "listing"
| "main"
| "marquee"
| "menu"
| "meta"
| "nav"
| "noembed"
| "noframes"
| "noscript"
| "object"
| "ol"
| "p"
| "param"
| "plaintext"
| "pre"
| "script"
| "section"
| "select"
| "source"
| "style"
| "summary"
| "table"
| "tbody"
| "td"
| "template"
| "textarea"
| "tfoot"
| "th"
| "thead"
| "title"
| "tr"
| "track"
| "ul"
| "wbr"
| "xmp"
) || is_mathml_element!(node, "mi" | "mo" | "mn" | "ms" | "mtext" | "annotation-xml")
|| is_svg_element!(node, "title" | "foreignObject" | "desc")
{
return true;
}
false
}
// While the parser is processing a token, it can enable or disable foster
// parenting. This affects the following algorithm.
//
// The appropriate place for inserting a node, optionally using a particular
// override target, is the position in an element returned by running the
// following steps:
//
// 1. If there was an override target specified, then let target be the override
// target.
//
// Otherwise, let target be the current node.
//
// 2. Determine the adjusted insertion location using the first matching steps
// from the following list:
//
// If foster parenting is enabled and target is a table, tbody, tfoot, thead, or
// tr element Foster parenting happens when content is misnested in tables.
//
// Run these substeps:
//
// 1. Let last template be the last template element in the stack of open
// elements, if any.
//
// 2. Let last table be the last table element in the stack of open elements, if
// any.
//
// 3. If there is a last template and either there is no last table, or there is
// one, but last template is lower (more recently added) than last table in the
// stack of open elements, then: let adjusted insertion location be inside last
// template's template contents, after its last child (if any), and abort these
// steps.
//
// 4. If there is no last table, then let adjusted insertion location be inside
// the first element in the stack of open elements (the html element), after
// its last child (if any), and abort these steps. (fragment case)
//
// 5. If last table has a parent node, then let adjusted insertion location be
// inside last table's parent node, immediately before last table, and abort
// these steps.
//
// 6. Let previous element be the element immediately above last table in the
// stack of open elements.
//
// 7. Let adjusted insertion location be inside previous element, after its last
// child (if any).
//
// These steps are involved in part because it's possible for elements, the
// table element in this case in particular, to have been moved by a script
// around in the DOM, or indeed removed from the DOM entirely, after the element
// was inserted by the parser.
//
// Otherwise
// Let adjusted insertion location be inside target, after its last child (if
// any).
//
// 3. If the adjusted insertion location is inside a template element, let it
// instead be inside the template element's template contents, after its last
// child (if any).
//
// 4. Return the adjusted insertion location.
fn get_appropriate_place_for_inserting_node(
&mut self,
override_target: Option<RcNode>,
) -> PResult<InsertionPosition> {
// 1.
let target = override_target.unwrap_or_else(|| {
if let Some(last) = self.open_elements_stack.items.last() {
last.clone()
} else {
// Unreachable, because we always have `html` element on top
unreachable!();
}
});
// 2.
let mut adjusted_insertion_location = if self.foster_parenting_enabled
&& is_html_element!(target, "table" | "tbody" | "tfoot" | "thead" | "tr")
{
// 2.1
let mut last_template = None;
let mut last_template_index = 0;
// 2.2
let mut last_table = None;
let mut last_table_index = 0;
for (i, node) in self.open_elements_stack.items.iter().enumerate().rev() {
if is_html_element!(node, "template") && last_template.is_none() {
last_template = Some(node);
last_template_index = i;
if last_table.is_some() {
break;
}
} else if is_html_element!(node, "table") && last_table.is_none() {
last_table = Some(node);
last_table_index = i;
if last_template.is_some() {
break;
}
}
}
// 2.3
if (last_table.is_none()
|| (last_table.is_some() && last_template_index > last_table_index))
&& last_template.is_some()
{
let last_template = if let Some(last_template) = last_template {
last_template.clone()
} else {
unreachable!();
};
InsertionPosition::LastChild(last_template)
}
// 2.4
// Fragment case
else if last_table.is_none() && !self.open_elements_stack.items.is_empty() {
let first = if let Some(first) = self.open_elements_stack.items.first() {
first.clone()
} else {
unreachable!();
};
InsertionPosition::LastChild(first)
}
// 2.5
else if match last_table {
Some(last_table) => {
let parent = last_table.parent.take();
let has_parent = parent.is_some();
last_table.parent.set(parent);
has_parent
}
_ => false,
} {
let sibling =
if let Some(sibling) = self.open_elements_stack.items.get(last_table_index) {
sibling.clone()
} else {
unreachable!()
};
InsertionPosition::BeforeSibling(sibling)
} else {
// 2.6
let previous_element = if let Some(previous_element) =
self.open_elements_stack.items.get(last_table_index - 1)
{
previous_element.clone()
} else {
unreachable!()
};
// 2.7
InsertionPosition::LastChild(previous_element)
}
} else {
InsertionPosition::LastChild(target)
};
// 3.
adjusted_insertion_location = match &adjusted_insertion_location {
InsertionPosition::LastChild(node) | InsertionPosition::BeforeSibling(node) => {
match &node.data {
Data::Element {
namespace,
tag_name,
..
} if tag_name == "template" && *namespace == Namespace::HTML => {
adjusted_insertion_location
}
_ => adjusted_insertion_location,
}
}
};
// 4.
Ok(adjusted_insertion_location)
}
// Inserts a comment node in to the document while processing a comment token.
fn insert_comment(&mut self, token_and_info: &mut TokenAndInfo) -> PResult<()> {
// Let data be the data given in the comment token being processed.
// If position was specified, then let the adjusted insertion location
// be position. Otherwise, let adjusted insertion location be the
// appropriate place for inserting a node.
let adjusted_insertion_location = self.get_appropriate_place_for_inserting_node(None)?;
// Create a Comment node whose data attribute is set to data and whose
// node document is the same as that of the node in which the adjusted
// insertion location finds itself.
let (data, raw) = match &token_and_info.token {
Token::Comment { data, raw } => (data.clone(), raw.clone()),
_ => {
unreachable!()
}
};
let comment = Node::new(Data::Comment { data, raw }, token_and_info.span);
// Insert the newly created node at the adjusted insertion location.
self.insert_at_position(adjusted_insertion_location, comment);
Ok(())
}
fn insert_comment_as_last_child_of_document(
&mut self,
token_and_info: &mut TokenAndInfo,
) -> PResult<()> {
let (data, raw) = match &token_and_info.token {
Token::Comment { data, raw } => (data.clone(), raw.clone()),
_ => {
unreachable!()
}
};
let comment = Node::new(Data::Comment { data, raw }, token_and_info.span);
if let Some(document) = &self.document {
self.append_node(document, comment);
}
Ok(())
}
fn insert_comment_as_last_child_of_first_element(
&mut self,
token_and_info: &mut TokenAndInfo,
) -> PResult<()> {
let (data, raw) = match &token_and_info.token {
Token::Comment { data, raw } => (data.clone(), raw.clone()),
_ => {
unreachable!()
}
};
let comment = Node::new(Data::Comment { data, raw }, token_and_info.span);
if let Some(html) = &self.open_elements_stack.items.first() {
self.append_node(html, comment);
}
Ok(())
}
// Inserts a sequence of characters in to a preexisting text node or creates
// a new text node if one does not exist in the expected insertion location.
fn insert_character(&mut self, token_and_info: &mut TokenAndInfo) -> PResult<()> {
// Let data be the characters passed to the algorithm, or, if no
// characters were explicitly specified, the character of the character
// token being processed.
// Let the adjusted insertion location be the appropriate place for
// inserting a node.
let adjusted_insertion_location = self.get_appropriate_place_for_inserting_node(None)?;
// If the adjusted insertion location is in a Document node, then abort
// these steps.
// NOTE: The DOM will not let Document nodes have Text node children, so
// they are dropped on the floor.
// Note: we don't use document in stack elements, so we can't have Document here
// If there is a Text node immediately before the adjusted insertion location,
// then append data to that Text node's data. Otherwise, create
// a new Text node whose data is data and whose node document is the
// same as that of the element in which the adjusted insertion location
// finds itself, and insert the newly created node at the adjusted
// insertion location.
match &adjusted_insertion_location {
InsertionPosition::LastChild(parent) => {
let children = parent.children.borrow();
if let Some(last) = children.last() {
if let Data::Text {
data,
raw: raw_data,
} = &last.data
{
match &token_and_info.token {
Token::Character {
value: c,
raw: raw_c,
} => {
data.borrow_mut().push(*c);
if let Some(Raw::Same) = raw_c {
raw_data.borrow_mut().push(*c);
} else if let Some(Raw::Atom(raw_c)) = raw_c {
raw_data.borrow_mut().push_str(raw_c);
}
}
_ => {
unreachable!();
}
}
let mut span = last.end_span.borrow_mut();
*span = Some(token_and_info.span);
return Ok(());
}
}
}
InsertionPosition::BeforeSibling(node) => {
if let Some((parent, i)) = self.get_parent_and_index(node) {
if i > 0 {
let children = parent.children.borrow();
if let Some(previous) = children.get(i - 1) {
if let Data::Text {
data,
raw: raw_data,
} = &previous.data
{
match &token_and_info.token {
Token::Character {
value: c,
raw: raw_c,
} => {
data.borrow_mut().push(*c);
if let Some(Raw::Same) = raw_c {
raw_data.borrow_mut().push(*c);
} else if let Some(Raw::Atom(raw_c)) = raw_c {
raw_data.borrow_mut().push_str(raw_c);
}
}
_ => {
unreachable!();
}
}
let mut span = previous.end_span.borrow_mut();
*span = Some(token_and_info.span);
return Ok(());
}
}
}
}
}
}
// Otherwise, create a new Text node whose data is data and whose node document
// is the same as that of the element in which the adjusted insertion location
// finds itself, and insert the newly created node at the adjusted insertion
// location.
let (data, raw) = match &token_and_info.token {
Token::Character {
value: c,
raw: raw_c,
} => {
let mut data = String::with_capacity(64);
data.push(*c);
let mut raw = String::with_capacity(64);
if let Some(Raw::Same) = raw_c {
raw.push(*c);
} else if let Some(Raw::Atom(raw_c)) = raw_c {
raw.push_str(raw_c);
}
(RefCell::new(data), RefCell::new(raw))
}
_ => {
unreachable!()
}
};
let text = Node::new(Data::Text { data, raw }, token_and_info.span);
self.insert_at_position(adjusted_insertion_location, text);
Ok(())
}
fn insert_html_element(&mut self, token_and_info: &TokenAndInfo) -> PResult<RcNode> {
self.insert_foreign_element(token_and_info, Namespace::HTML, None)
}
fn insert_foreign_element(
&mut self,
token_and_info: &TokenAndInfo,
namespace: Namespace,
adjust_attributes: Option<AdjustAttributes>,
) -> PResult<RcNode> {
// Let the adjusted insertion location be the appropriate place for
// inserting a node.
let adjusted_insertion_location = self.get_appropriate_place_for_inserting_node(None)?;
// Create an element for the token in the given namespace, with the
// intended parent being the element in which the adjusted insertion
// location finds itself.
let node = self.create_element_for_token(
token_and_info.token.clone(),
token_and_info.span,
Some(namespace),
adjust_attributes,
);
// If it is possible to insert an element at the adjusted insertion
// location, then insert the newly created element at the adjusted
// insertion location.
// NOTE: If the adjusted insertion location cannot accept more
// elements, e.g. because it's a Document that already has an
// element child, then the newly created element is dropped on the
// floor.
self.insert_at_position(adjusted_insertion_location, node.clone());
// Push the element onto the stack of open elements so that it is the
// new current node.
self.open_elements_stack.push(node.clone());
// Return the newly created element.
Ok(node)
}
fn append_node(&self, parent: &RcNode, child: RcNode) {
let previous_parent = child.parent.replace(Some(Rc::downgrade(parent)));
// Invariant: child cannot have existing parent
assert!(previous_parent.is_none());
parent.children.borrow_mut().push(child);
}
fn get_parent_and_index(&self, node: &RcNode) -> Option<(RcNode, usize)> {
if let Some(weak) = node.parent.take() {
let parent = weak.upgrade().expect("dangling weak pointer");
node.parent.set(Some(weak));
let i = match parent
.children
.borrow()
.iter()
.enumerate()
.find(|&(_, child)| is_same_node(child, node))
{
Some((i, _)) => i,
None => {
// Unreachable, otherwise node has a parent but couldn't found in parent's
// children
unreachable!();
}
};
Some((parent, i))
} else {
None
}
}
fn append_node_before_sibling(&self, parent: &RcNode, child: RcNode) {
let (parent, i) = self
.get_parent_and_index(parent)
.expect("append_node_before_sibling called on node without parent");
if let Some((parent, i)) = self.get_parent_and_index(&child) {
parent.children.borrow_mut().remove(i);
child.parent.set(None);
}
child.parent.set(Some(Rc::downgrade(&parent)));
parent.children.borrow_mut().insert(i, child);
}
fn insert_at_position(&mut self, insertion_point: InsertionPosition, node: RcNode) {
match insertion_point {
InsertionPosition::LastChild(parent) => {
self.append_node(&parent, node);
}
InsertionPosition::BeforeSibling(sibling) => {
self.append_node_before_sibling(&sibling, node)
}
}
}
fn update_end_tag_span(&self, node: Option<&RcNode>, span: Span) {
if let Some(node) = node {
if node.start_span.borrow().is_dummy() {
return;
}
let mut end_tag_span = node.end_span.borrow_mut();
*end_tag_span = Some(span);
}
}
}
fn is_same_node(a: &RcNode, b: &RcNode) -> bool {
Rc::ptr_eq(a, b)
}
// The HTML namespace is "http://www.w3.org/1999/xhtml".
fn is_element_in_html_namespace(node: Option<&RcNode>) -> bool {
if let Some(node) = node {
match &node.data {
Data::Element { namespace, .. } if *namespace == Namespace::HTML => {
return true;
}
_ => {
return false;
}
}
}
false
}
// A node is a MathML text integration point if it is one of the following
// elements:
//
// A MathML mi element
// A MathML mo element
// A MathML mn element
// A MathML ms element
// A MathML mtext element
fn is_mathml_text_integration_point(node: Option<&RcNode>) -> bool {
if let Some(node) = node {
match &node.data {
Data::Element {
namespace,
tag_name,
..
} if *namespace == Namespace::MATHML
&& matches!(&**tag_name, "mi" | "mo" | "mn" | "ms" | "mtext") =>
{
return true;
}
_ => {
return false;
}
}
}
false
}
fn is_mathml_annotation_xml(node: Option<&RcNode>) -> bool {
if let Some(node) = node {
match &node.data {
Data::Element {
namespace,
tag_name,
..
} if *namespace == Namespace::MATHML && tag_name == "annotation-xml" => {
return true;
}
_ => {
return false;
}
}
}
false
}
// A node is an HTML integration point if it is one of the following elements:
//
// A MathML annotation-xml element whose start tag token had an attribute with
// the name "encoding" whose value was an ASCII case-insensitive match for the
// string "text/html" A MathML annotation-xml element whose start tag token
// had an attribute with the name "encoding" whose value was an ASCII
// case-insensitive match for the string "application/xhtml+xml"
// An SVG foreignObject element
// An SVG desc element
// An SVG title element
fn is_html_integration_point(node: Option<&RcNode>) -> bool {
if let Some(node) = node {
match &node.data {
Data::Element {
namespace,
tag_name,
attributes,
..
} if *namespace == Namespace::MATHML && tag_name == "annotation-xml" => {
for attribute in &*attributes.borrow() {
if &*attribute.name == "encoding"
&& (attribute.value.is_some()
&& matches!(
&*attribute.value.as_ref().unwrap().to_ascii_lowercase(),
"text/html" | "application/xhtml+xml"
))
{
return true;
}
}
return false;
}
Data::Element {
namespace,
tag_name,
..
} if *namespace == Namespace::SVG
&& matches!(&**tag_name, "foreignObject" | "desc" | "title") =>
{
return true;
}
_ => {
return false;
}
}
}
false
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/parser/node.rs | Rust | use std::{
cell::{Cell, RefCell},
fmt, mem,
rc::{Rc, Weak},
};
use swc_atoms::Atom;
use swc_common::Span;
use swc_html_ast::*;
#[derive(Debug, Clone)]
pub struct TokenAndInfo {
pub span: Span,
pub acknowledged: bool,
pub token: Token,
}
#[derive(Debug, Clone)]
pub enum Data {
Document {
mode: RefCell<DocumentMode>,
},
DocumentType {
name: Option<Atom>,
public_id: Option<Atom>,
system_id: Option<Atom>,
raw: Option<Atom>,
},
Element {
namespace: Namespace,
tag_name: Atom,
attributes: RefCell<Vec<Attribute>>,
is_self_closing: bool,
},
Text {
data: RefCell<String>,
raw: RefCell<String>,
},
Comment {
data: Atom,
raw: Option<Atom>,
},
}
pub struct Node {
pub parent: Cell<Option<WeakNode>>,
pub children: RefCell<Vec<RcNode>>,
pub data: Data,
pub start_span: RefCell<Span>,
pub end_span: RefCell<Option<Span>>,
}
impl Node {
/// Create a new node from its contents
pub fn new(data: Data, span: Span) -> Rc<Self> {
Rc::new(Node {
parent: Cell::new(None),
children: RefCell::new(Vec::new()),
start_span: RefCell::new(span),
end_span: RefCell::new(None),
data,
})
}
}
impl Drop for Node {
fn drop(&mut self) {
let mut nodes = mem::take(&mut *self.children.borrow_mut());
while let Some(node) = nodes.pop() {
let children = mem::take(&mut *node.children.borrow_mut());
nodes.extend(children);
}
}
}
impl fmt::Debug for Node {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt.debug_struct("Node")
.field("data", &self.data)
.field("children", &self.children)
.finish()
}
}
pub type RcNode = Rc<Node>;
type WeakNode = Weak<Node>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/src/parser/open_elements_stack.rs | Rust | use swc_html_ast::*;
use crate::parser::{
is_html_integration_point, is_mathml_text_integration_point, is_same_node, Data, RcNode,
};
static IMPLICIT_END_TAG_REQUIRED: &[&str] = &[
"dd", "dt", "li", "optgroup", "option", "p", "rb", "rp", "rt", "rtc",
];
static IMPLICIT_END_TAG_REQUIRED_THOROUGHLY: &[&str] = &[
"caption", "colgroup", "dd", "dt", "li", "optgroup", "option", "p", "rb", "rp", "rt", "rtc",
"tbody", "td", "tfoot", "th", "thead", "tr",
];
static SPECIFIC_SCOPE: &[(&str, Namespace)] = &[
("applet", Namespace::HTML),
("caption", Namespace::HTML),
("html", Namespace::HTML),
("marquee", Namespace::HTML),
("object", Namespace::HTML),
("table", Namespace::HTML),
("td", Namespace::HTML),
("template", Namespace::HTML),
("th", Namespace::HTML),
("annotation-xml", Namespace::MATHML),
("mi", Namespace::MATHML),
("mn", Namespace::MATHML),
("mo", Namespace::MATHML),
("ms", Namespace::MATHML),
("mtext", Namespace::MATHML),
("desc", Namespace::SVG),
("foreignObject", Namespace::SVG),
("title", Namespace::SVG),
];
static LIST_ITEM_SCOPE: &[(&str, Namespace)] = &[
("applet", Namespace::HTML),
("caption", Namespace::HTML),
("html", Namespace::HTML),
("marquee", Namespace::HTML),
("object", Namespace::HTML),
("table", Namespace::HTML),
("td", Namespace::HTML),
("template", Namespace::HTML),
("th", Namespace::HTML),
("annotation-xml", Namespace::MATHML),
("mi", Namespace::MATHML),
("mn", Namespace::MATHML),
("mo", Namespace::MATHML),
("ms", Namespace::MATHML),
("mtext", Namespace::MATHML),
("desc", Namespace::SVG),
("foreignObject", Namespace::SVG),
("title", Namespace::SVG),
("ol", Namespace::HTML),
("ul", Namespace::HTML),
];
static BUTTON_SCOPE: &[(&str, Namespace)] = &[
("applet", Namespace::HTML),
("caption", Namespace::HTML),
("html", Namespace::HTML),
("marquee", Namespace::HTML),
("object", Namespace::HTML),
("table", Namespace::HTML),
("td", Namespace::HTML),
("template", Namespace::HTML),
("th", Namespace::HTML),
("annotation-xml", Namespace::MATHML),
("mi", Namespace::MATHML),
("mn", Namespace::MATHML),
("mo", Namespace::MATHML),
("ms", Namespace::MATHML),
("mtext", Namespace::MATHML),
("desc", Namespace::SVG),
("foreignObject", Namespace::SVG),
("title", Namespace::SVG),
("button", Namespace::HTML),
];
static TABLE_SCOPE: &[(&str, Namespace)] = &[
("html", Namespace::HTML),
("table", Namespace::HTML),
("template", Namespace::HTML),
];
static SELECT_SCOPE: &[(&str, Namespace)] =
&[("optgroup", Namespace::HTML), ("option", Namespace::HTML)];
pub struct OpenElementsStack {
pub items: Vec<RcNode>,
template_element_count: usize,
}
impl OpenElementsStack {
pub fn new() -> Self {
OpenElementsStack {
items: Vec::with_capacity(16),
template_element_count: 0,
}
}
pub fn push(&mut self, node: RcNode) {
if is_html_element!(node, "template") {
self.template_element_count += 1;
}
self.items.push(node);
}
pub fn pop(&mut self) -> Option<RcNode> {
let popped = self.items.pop();
if let Some(node) = &popped {
if is_html_element!(node, "template") {
self.template_element_count -= 1;
}
}
popped
}
pub fn insert(&mut self, index: usize, node: RcNode) {
if is_html_element!(node, "template") {
self.template_element_count += 1;
}
self.items.insert(index, node);
}
pub fn replace(&mut self, index: usize, node: RcNode) {
if let Some(item) = self.items.get(index) {
if is_html_element!(item, "template") {
self.template_element_count -= 1;
}
if is_html_element!(node, "template") {
self.template_element_count += 1;
}
self.items[index] = node;
}
}
pub fn remove(&mut self, node: &RcNode) {
let position = self.items.iter().rposition(|x| is_same_node(node, x));
if let Some(position) = position {
if is_html_element!(node, "template") {
self.template_element_count -= 1;
}
self.items.remove(position);
}
}
pub fn contains_template_element(&self) -> bool {
self.template_element_count > 0
}
// The stack of open elements is said to have an element target node in a
// specific scope consisting of a list of element types list when the following
// algorithm terminates in a match state:
fn has_element_target_node_in_specific_scope(
&self,
tag_name: &str,
list: &[(&str, Namespace)],
) -> bool {
let mut iter = self.items.iter().rev();
// 1. Initialize node to be the current node (the bottommost node of the stack).
let mut node = iter.next();
while let Some(inner_node) = node {
// 2. If node is the target node, terminate in a match state.
if get_tag_name!(inner_node) == tag_name
&& get_namespace!(inner_node) == Namespace::HTML
{
return true;
}
// 3. Otherwise, if node is one of the element types in list, terminate in a
// failure state.
for element_and_ns in list {
if get_tag_name!(inner_node) == element_and_ns.0
&& get_namespace!(inner_node) == element_and_ns.1
{
return false;
}
}
// 4. Otherwise, set node to the previous entry in the stack of open elements
// and return to step 2. (This will never fail, since the loop will always
// terminate in the previous step if the top of the stack — an html element — is
// reached.)
node = iter.next();
}
false
}
// The stack of open elements is said to have a particular element in scope when
// it has that element in the specific scope consisting of the following element
// types:
//
// applet
// caption
// html
// table
// td
// th
// marquee
// object
// template
// MathML mi
// MathML mo
// MathML mn
// MathML ms
// MathML mtext
// MathML annotation-xml
// SVG foreignObject
// SVG desc
// SVG title
pub fn has_in_scope(&self, tag_name: &str) -> bool {
self.has_element_target_node_in_specific_scope(tag_name, SPECIFIC_SCOPE)
}
pub fn has_node_in_scope(&self, target: &RcNode) -> bool {
let mut iter = self.items.iter().rev();
// 1. Initialize node to be the current node (the bottommost node of the stack).
let mut node = iter.next();
while let Some(inner_node) = node {
// 2. If node is the target node, terminate in a match state.
if is_same_node(target, inner_node) {
return true;
}
// 3. Otherwise, if node is one of the element types in list, terminate in a
// failure state.
for element_and_ns in SPECIFIC_SCOPE {
if get_tag_name!(inner_node) == element_and_ns.0
&& get_namespace!(inner_node) == element_and_ns.1
{
return false;
}
}
// 4. Otherwise, set node to the previous entry in the stack of open elements
// and return to step 2. (This will never fail, since the loop will always
// terminate in the previous step if the top of the stack — an html element — is
// reached.)
node = iter.next();
}
false
}
// The stack of open elements is said to have a particular element in list item
// scope when it has that element in the specific scope consisting of the
// following element types:
//
// All the element types listed above for the has an element in scope algorithm.
// ol in the HTML namespace
// ul in the HTML namespace
pub fn has_in_list_item_scope(&self, tag_name: &str) -> bool {
self.has_element_target_node_in_specific_scope(tag_name, LIST_ITEM_SCOPE)
}
// The stack of open elements is said to have a particular element in button
// scope when it has that element in the specific scope consisting of the
// following element types:
//
// All the element types listed above for the has an element in scope algorithm.
// button in the HTML namespace
pub fn has_in_button_scope(&self, tag_name: &str) -> bool {
self.has_element_target_node_in_specific_scope(tag_name, BUTTON_SCOPE)
}
// The stack of open elements is said to have a particular element in table
// scope when it has that element in the specific scope consisting of the
// following element types:
//
// html in the HTML namespace
// table in the HTML namespace
// template in the HTML namespace
pub fn has_in_table_scope(&self, tag_name: &str) -> bool {
self.has_element_target_node_in_specific_scope(tag_name, TABLE_SCOPE)
}
// The stack of open elements is said to have a particular element in select
// scope when it has that element in the specific scope consisting of all
// element types except the following:
//
// optgroup in the HTML namespace
// option in the HTML namespace
pub fn has_in_select_scope(&self, tag_name: &str) -> bool {
let mut iter = self.items.iter().rev();
// 1. Initialize node to be the current node (the bottommost node of the stack).
let mut node = iter.next();
while let Some(inner_node) = node {
// 2. If node is the target node, terminate in a match state.
if get_tag_name!(inner_node) == tag_name
&& get_namespace!(inner_node) == Namespace::HTML
{
return true;
}
// 3. Otherwise, if node is one of the element types in list, terminate in a
// failure state.
if SELECT_SCOPE.iter().all(|(tag_name, namespace)| {
get_tag_name!(inner_node) != *tag_name && get_namespace!(inner_node) != *namespace
}) {
return false;
}
// 4. Otherwise, set node to the previous entry in the stack of open elements
// and return to step 2. (This will never fail, since the loop will always
// terminate in the previous step if the top of the stack — an html element — is
// reached.)
node = iter.next();
}
false
}
// When the steps above require the UA to clear the stack back to a table
// context, it means that the UA must, while the current node is not a table,
// template, or html element, pop elements from the stack of open elements.
pub fn clear_back_to_table_context(&mut self) {
while let Some(node) = self.items.last() {
if !is_html_element!(node, "table" | "template" | "html") {
self.pop();
} else {
break;
}
}
}
// When the steps above require the UA to clear the stack back to a table row
// context, it means that the UA must, while the current node is not a tr,
// template, or html element, pop elements from the stack of open elements.
pub fn clear_back_to_table_row_context(&mut self) {
while let Some(node) = self.items.last() {
if !is_html_element!(node, "tr" | "template" | "html") {
self.pop();
} else {
break;
}
}
}
// When the steps above require the UA to clear the stack back to a table body
// context, it means that the UA must, while the current node is not a tbody,
// tfoot, thead, template, or html element, pop elements from the stack of open
// elements.
pub fn clear_back_to_table_body_context(&mut self) {
while let Some(node) = self.items.last() {
if !is_html_element!(node, "thead" | "tfoot" | "tbody" | "template" | "html") {
self.pop();
} else {
break;
}
}
}
// When the steps below require the UA to generate implied end tags, then, while
// the current node is a dd element, a dt element, an li element, an optgroup
// element, an option element, a p element, an rb element, an rp element, an rt
// element, or an rtc element, the UA must pop the current node off the stack of
// open elements.
//
// If a step requires the UA to generate implied end tags but lists an element
// to exclude from the process, then the UA must perform the above steps as if
// that element was not in the above list.
pub fn generate_implied_end_tags(&mut self) {
while let Some(node) = self.items.last() {
if IMPLICIT_END_TAG_REQUIRED.contains(&get_tag_name!(node))
&& get_namespace!(node) == Namespace::HTML
{
self.pop();
} else {
break;
}
}
}
pub fn generate_implied_end_tags_with_exclusion(&mut self, tag_name: &str) {
while let Some(node) = self.items.last() {
if is_html_element_with_tag_name!(node, tag_name) {
break;
}
if IMPLICIT_END_TAG_REQUIRED.contains(&get_tag_name!(node))
&& get_namespace!(node) == Namespace::HTML
{
self.pop();
} else {
break;
}
}
}
// When the steps below require the UA to generate all implied end tags
// thoroughly, then, while the current node is a caption element, a colgroup
// element, a dd element, a dt element, an li element, an optgroup element, an
// option element, a p element, an rb element, an rp element, an rt element, an
// rtc element, a tbody element, a td element, a tfoot element, a th element, a
// thead element, or a tr element, the UA must pop the current node off the
// stack of open elements.
pub fn generate_implied_end_tags_thoroughly(&mut self) {
while let Some(node) = self.items.last() {
if IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.contains(&get_tag_name!(node))
&& get_namespace!(node) == Namespace::HTML
{
self.pop();
} else {
break;
}
}
}
pub fn pop_until_tag_name_popped(&mut self, tag_name: &[&str]) -> Option<RcNode> {
while let Some(node) = self.pop() {
if tag_name.contains(&get_tag_name!(node)) && get_namespace!(node) == Namespace::HTML {
return Some(node);
}
}
None
}
pub fn pop_until_node(&mut self, until_to_node: &RcNode) -> Option<RcNode> {
while let Some(node) = self.pop() {
if is_same_node(&node, until_to_node) {
return Some(node);
}
}
None
}
// While the current node is not a MathML text integration point, an HTML
// integration point, or an element in the HTML namespace, pop elements from
// the stack of open elements.
pub fn pop_until_in_foreign(&mut self) {
while let Some(node) = self.items.last() {
match &node.data {
Data::Element { namespace, .. } if *namespace == Namespace::HTML => {
break;
}
_ if is_mathml_text_integration_point(Some(node))
|| is_html_integration_point(Some(node)) =>
{
break;
}
_ => {}
}
self.pop();
}
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/common/mod.rs | Rust | use std::path::PathBuf;
use swc_common::{errors::Handler, input::SourceFileInput, Spanned};
use swc_html_ast::*;
use swc_html_parser::{
lexer::Lexer,
parser::{PResult, Parser, ParserConfig},
};
use swc_html_visit::{Visit, VisitMut, VisitMutWith, VisitWith};
use testing::NormalizedOutput;
#[allow(dead_code)]
pub fn document_test(input: PathBuf, config: ParserConfig) {
testing::run_test2(false, |cm, handler| {
let json_path = input.parent().unwrap().join("output.json");
let fm = cm.load_file(&input).unwrap();
let lexer = Lexer::new(SourceFileInput::from(&*fm));
let mut parser = Parser::new(lexer, config);
let document: PResult<Document> = parser.parse_document();
let errors = parser.take_errors();
for err in &errors {
err.to_diagnostics(&handler).emit();
}
if !errors.is_empty() {
return Err(());
}
match document {
Ok(document) => {
let actual_json = serde_json::to_string_pretty(&document)
.map(NormalizedOutput::from)
.expect("failed to serialize document");
actual_json.compare_to_file(json_path).unwrap();
Ok(())
}
Err(err) => {
let mut d = err.to_diagnostics(&handler);
d.note(&format!("current token = {}", parser.dump_cur()));
d.emit();
Err(())
}
}
})
.unwrap();
}
pub struct DomVisualizer<'a> {
pub dom_buf: &'a mut String,
pub indent: usize,
}
impl DomVisualizer<'_> {
fn get_ident(&self) -> String {
let mut indent = String::new();
indent.push_str("| ");
indent.push_str(&" ".repeat(self.indent));
indent
}
}
impl VisitMut for DomVisualizer<'_> {
fn visit_mut_document_type(&mut self, n: &mut DocumentType) {
let mut document_type = String::new();
document_type.push_str(&self.get_ident());
document_type.push_str("<!DOCTYPE ");
if let Some(name) = &n.name {
document_type.push_str(name);
}
if let Some(public_id) = &n.public_id {
document_type.push(' ');
document_type.push('"');
document_type.push_str(public_id);
document_type.push('"');
if let Some(system_id) = &n.system_id {
document_type.push(' ');
document_type.push('"');
document_type.push_str(system_id);
document_type.push('"');
} else {
document_type.push(' ');
document_type.push('"');
document_type.push('"');
}
} else if let Some(system_id) = &n.system_id {
document_type.push(' ');
document_type.push('"');
document_type.push('"');
document_type.push(' ');
document_type.push('"');
document_type.push_str(system_id);
document_type.push('"');
}
document_type.push('>');
document_type.push('\n');
self.dom_buf.push_str(&document_type);
n.visit_mut_children_with(self);
}
fn visit_mut_element(&mut self, n: &mut Element) {
let mut element = String::new();
element.push_str(&self.get_ident());
element.push('<');
match n.namespace {
Namespace::SVG => {
element.push_str("svg ");
}
Namespace::MATHML => {
element.push_str("math ");
}
_ => {}
}
element.push_str(&n.tag_name);
element.push('>');
element.push('\n');
let is_template = n.namespace == Namespace::HTML && &*n.tag_name == "template";
if is_template {
self.indent += 1;
element.push_str(&self.get_ident());
element.push_str("content");
element.push('\n');
}
n.attributes
.sort_by(|a, b| a.name.partial_cmp(&b.name).unwrap());
self.dom_buf.push_str(&element);
let old_indent = self.indent;
self.indent += 1;
n.visit_mut_children_with(self);
self.indent = old_indent;
if is_template {
self.indent -= 1;
}
}
fn visit_mut_attribute(&mut self, n: &mut Attribute) {
let mut attribute = String::new();
attribute.push_str(&self.get_ident());
if let Some(prefix) = &n.prefix {
attribute.push_str(prefix);
attribute.push(' ');
}
attribute.push_str(&n.name);
attribute.push('=');
attribute.push('"');
if let Some(value) = &n.value {
attribute.push_str(value);
}
attribute.push('"');
attribute.push('\n');
self.dom_buf.push_str(&attribute);
n.visit_mut_children_with(self);
}
fn visit_mut_text(&mut self, n: &mut Text) {
let mut text = String::new();
text.push_str(&self.get_ident());
text.push('"');
text.push_str(&n.data);
text.push('"');
text.push('\n');
self.dom_buf.push_str(&text);
n.visit_mut_children_with(self);
}
fn visit_mut_comment(&mut self, n: &mut Comment) {
let mut comment = String::new();
comment.push_str(&self.get_ident());
comment.push_str("<!-- ");
comment.push_str(&n.data);
comment.push_str(" -->");
comment.push('\n');
self.dom_buf.push_str(&comment);
n.visit_mut_children_with(self);
}
}
#[allow(dead_code)]
pub fn document_dom_visualizer(input: PathBuf, config: ParserConfig) {
let dir = input.parent().unwrap().to_path_buf();
testing::run_test2(false, |cm, handler| {
// Type annotation
if false {
return Ok(());
}
let fm = cm.load_file(&input).unwrap();
let lexer = Lexer::new(SourceFileInput::from(&*fm));
let mut parser = Parser::new(lexer, config);
let document: PResult<Document> = parser.parse_document();
match document {
Ok(mut document) => {
let mut dom_buf = String::new();
document.visit_mut_with(&mut DomVisualizer {
dom_buf: &mut dom_buf,
indent: 0,
});
NormalizedOutput::from(dom_buf)
.compare_to_file(dir.join("dom.rust-debug"))
.unwrap();
Ok(())
}
Err(err) => {
let mut d = err.to_diagnostics(&handler);
d.note(&format!("current token = {}", parser.dump_cur()));
d.emit();
panic!();
}
}
})
.unwrap();
}
struct SpanVisualizer<'a> {
handler: &'a Handler,
}
macro_rules! mtd {
($T:ty,$name:ident) => {
fn $name(&mut self, n: &$T) {
let span = n.span();
self.handler.struct_span_err(span, stringify!($T)).emit();
n.visit_children_with(self);
}
};
}
impl Visit for SpanVisualizer<'_> {
mtd!(Document, visit_document);
mtd!(DocumentFragment, visit_document_fragment);
mtd!(Child, visit_child);
mtd!(DocumentType, visit_document_type);
mtd!(Element, visit_element);
mtd!(Attribute, visit_attribute);
mtd!(Text, visit_text);
mtd!(Comment, visit_comment);
}
pub fn document_span_visualizer(input: PathBuf, config: ParserConfig, relative_to_file: bool) {
let dir = input.parent().unwrap().to_path_buf();
let output = testing::run_test2(false, |cm, handler| {
// Type annotation
if false {
return Ok(());
}
let fm = cm.load_file(&input).unwrap();
let lexer = Lexer::new(SourceFileInput::from(&*fm));
let mut parser = Parser::new(lexer, config);
let document: PResult<Document> = parser.parse_document();
match document {
Ok(document) => {
document.visit_with(&mut SpanVisualizer { handler: &handler });
Err(())
}
Err(err) => {
let mut d = err.to_diagnostics(&handler);
d.note(&format!("current token = {}", parser.dump_cur()));
d.emit();
panic!();
}
}
})
.unwrap_err();
let output_path = if relative_to_file {
input.with_extension("span.rust-debug")
} else {
dir.join("span.rust-debug")
};
output.compare_to_file(output_path).unwrap();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture.rs | Rust | #![deny(warnings)]
#![allow(clippy::if_same_then_else)]
#![allow(clippy::needless_update)]
#![allow(clippy::redundant_clone)]
#![allow(clippy::while_let_on_iterator)]
use std::path::PathBuf;
use common::{document_dom_visualizer, document_span_visualizer};
use crate::common::document_test;
#[path = "common/mod.rs"]
mod common;
#[testing::fixture("tests/fixture/**/*.html")]
fn pass(input: PathBuf) {
document_test(input, Default::default())
}
#[testing::fixture("tests/fixture/**/*.html")]
fn span_visualizer(input: PathBuf) {
document_span_visualizer(input, Default::default(), false)
}
#[testing::fixture("tests/fixture/**/*.html")]
fn dom_visualizer(input: PathBuf) {
document_dom_visualizer(input, Default::default())
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/attribute/basic/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<a 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z></a>
<p title=" <![CDATA[ \n\n foobar baz ]]> ">x</p>
<p title=" <!-- hello world --> ">x</p>
<tag v-ref:vm_pv :imgs=" objpicsurl_ "></tag>
<br a=\u00A0 b=" " c="\u00A0">
<img
src
=
"test"
/>
<img src=test.jpg>
<img src=test.jpg data-src=test.jpg>
<button disabled></button>
<div CLASS="TEST"></div>
<div CLASS='TEST'></div>
<div CLASS=TEST></div>
<svg viewBox="0 0 140 50" xmlns="http://www.w3.org/2000/svg">
<text y="20" xml:space="default">Default spacing</text>
<text y="20" XML:SPACE="default">Default spacing</text>
<text y="40" xml:space="preserve">Preserved spacing</text>
</svg>
<div id = "John " & Harry "></div>
<a href="http://host/?x=1&y=2">test</a>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/attribute/class/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<a class="0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z"></a>
<a class="add sort keys createSorter"></a>
<span class="sprite sprite-{{sprite}}"></span>
<span class="{{sprite}}-sprite sprite"></span>
<span class="sprite-{{sprite}}-sprite"></span>
<span class="{{sprite}}"></span>
<span class={{sprite}}></span>
<div class></div>
<div class="nav_sv_fo_v_column <#=(j === 0) ? 'nav_sv_fo_v_first' : '' #> foo_bar"></div>
<a class="moo <!-- htmlmin:ignore -->bar<!-- htmlmin:ignore --> foo baz"></a>
<div class="="></div>
<div class="= = = ="></div>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/attribute/no-quotes/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<a href=https://www.w3schools.com>This is a link</a>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/attribute/quotes-in-meta/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content='charset="windows-1251'>
<title>Document</title>
</head>
<body>
test
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/attribute/title/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<h2 title="I'm a header">The title Attribute</h2>
<p title="I'm a tooltip">Mouse over this paragraph, to display the title attribute as a tooltip.</p>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/comment/after-body/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
Test
</body>
<!-- Test -->
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/comment/basic-1/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<!--This is a comment-->
<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Comments are not displayed in the browser -->
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/comment/basic/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<!-- test -->
<!-- foo --><div>baz</div><!-- bar
moo -->
<script><!-- alert(1) --></script>
<script>alert('<!--')</script>
<script>alert('<!-- foo -->')</script>
<script>alert('-->')</script>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/comment/ie-conditional/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<!--[if IE 5]>This is IE 5<br><![endif]-->
<!--[if IE 6]>This is IE 6<br><![endif]-->
<!--[if IE 7]>This is IE 7<br><![endif]-->
<!--[if IE 8]>This is IE 8<br><![endif]-->
<!--[if IE 9]>This is IE 9<br><![endif]-->
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/comment/multiline/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.</p>
<!--
<p>Look at this cool image:</p>
<img border="0" src="pic_trulli.jpg" alt="Trulli">
-->
<p>This is a paragraph too.</p>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/document/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/document_type/legacy/input.html | HTML | <!DOCTYPE html SYSTEM "about:legacy-compat">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
Test
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/document_type/lowercase/input.html | HTML | <!doctype html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/document_type/uppercase/input.html | HTML | <!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/a/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<a href="https://example.com">First</a>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/basic/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<div></div>
<div><div></div></div>
<div></div><div></div>
<br>
<br />
<h:ællæ></h:ællæ>
<div ⚡></div>
<some-tag-1></some-tag-1><some-tag-2></some-tag-2>
<a href="test.html"><div>hey</div></a>
<CUSTOM-TAG></CUSTOM-TAG><div>Hello :)</div>
<div>
test
</div>
<div data-test="a"></div>
<br data-test="a" />
<br data-test="a" >
<br data-test="a">
<div
>
Test
</div
>
<div>test</div>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/body/input.html | HTML | <!doctype html><html lang="en"><head><title>Document</title></head><body><div>test</div><p>test</p><p>Test</body></html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/br/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<p> O'er all the hilltops<br>
Is quiet now,<br>
In all the treetops<br>
Hearest thou<br>
Hardly a breath;<br>
The birds are asleep in the trees:<br>
Wait, soon like these<br>
Thou too shalt rest.<br/>
</p>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/button/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<button><p></button>x
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/caption/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<table>
<caption>Example Caption</caption>
<tr>
<th>Login</th>
<th>Email</th>
</tr>
<tr>
<td>user1</td>
<td>user1@sample.com</td>
</tr>
<tr>
<td>user2</td>
<td>user2@sample.com</td>
</tr>
</table>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/code/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<code some-attribute=""><div><code><code><code><code></code></code></code></code></div></code>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/colgroup/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<table>
<caption>Superheros and sidekicks</caption>
<colgroup><col><col span="2" class="batman"><col span="2" class="flash"></colgroup>
<tr>
<td> </td>
<th scope="col">Batman</th>
<th scope="col">Robin</th>
<th scope="col">The Flash</th>
<th scope="col">Kid Flash</th>
</tr>
</table>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/custom-element/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<popup-info img="img/alt.png" data-text="Your card validation code (CVC)
is an extra security feature — it is the last 3 or 4 numbers on the
back of your card."></popup-info>
<custom-square l="100" c="red"></custom-square>
<app-drawer open disabled></app-drawer>
<share-buttons>
<social-button type="twitter"><a href="...">Twitter</a></social-button>
<social-button type="fb"><a href="...">Facebook</a></social-button>
<social-button type="plus"><a href="...">G+</a></social-button>
</share-buttons>
<x-foo-with-markup>
<b>I'm an x-foo-with-markup!</b>
</x-foo-with-markup>
<template id="x-foo-from-template">
<style>
p { color: green; }
</style>
<p>I'm in Shadow DOM. My markup was stamped from a <template>.</p>
</template>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/dialog/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<dialog open>
<p>Greetings, one and all!</p>
</dialog>
<dialog>Test</dialog>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/div/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<div>Test</div>
<div>One</div><div>Two</div>
<div><div>Three</div></div>
<div><h1>Test</h1></div>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/embed/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<embed type="vide/webm" src="/media/examples/flower.mp4" width="200" height="200">
<noembed>
<h1>Alternative content</h1>
</noembed>
<embed type="video/webm"
src="/media/cc0-videos/flower.mp4"
width="250"
height="200">
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/form/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<form action="" method="get" class="form-example">
<div class="form-example">
<label for="name">Enter your name: </label>
<input type="text" name="name" id="name" required>
</div>
<div class="form-example">
<label for="email">Enter your email: </label>
<input type="email" name="email" id="email" required>
</div>
<div class="form-example">
<input type="submit" value="Subscribe!">
</div>
</form>
<form method="post">
<fieldset>
<legend>Title</legend>
<label><input type="radio" name="radio"> Select me</label>
</fieldset>
</form>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/frameset/input.html | HTML | <!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Тег FRAMESET</title>
</head>
<frameset rows="80,*" cols="*">
<frame src="top.html" name="topFrame" scrolling="no" noresize>
<frameset cols="80,*">
<frame src="left.html" name="leftFrame" scrolling="no" noresize>
<frame src="main.html" name="mainFrame">
</frameset>
</frameset>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/head/input.html | HTML | <!doctype html>
<html lang="en">
<head><title>Document</title></head>
<body>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/headings/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/html/input.html | HTML | <!doctype html> <html lang="en"> <head> <title>Document</title> </head> <body> </body> </html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/iframe/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<iframe src="test.html" frameborder="0"></iframe>
<iframe src="banner.html" width="468" height="60" align="left"> Text </iframe>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/img/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<h2>HTML Images</h2>
<p>HTML images are defined with the img tag:</p>
<img src="w3schools.jpg" alt="W3Schools.com" width="104" height="142">
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/isindex/input.html | HTML | <!doctype html><isindex>x</isindex>x | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/lists/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<h2 data-test="test">An Unordered HTML List</h2>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<h2>An Ordered HTML List</h2>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ul>
<li>item1
<li>item2
</ul>
<ul>
<li>item1
<li>item2
</ul>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/main/input.html | HTML | <!doctype html><main><p>foo</main>bar | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/marquee/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<marquee>This text will scroll from right to left</marquee>
<marquee direction="up">This text will scroll from bottom to top</marquee>
<marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid">
<marquee behavior="alternate">
This text will bounce
</marquee>
</marquee>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/math-1/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<div style="display:none">
<div><math id="m1"><mtext/></math></div>
<div id="d1"><math><mrow/><mi/></math></div>
<div id="d2"><math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math></div>
<div id="d3">⟨⟩</div>
<div id="d4">𝕂</div>
<div id="d5"><math><semantics><mi>a</mi><annotation-xml><foo/><bar/></annotation-xml></semantics></math></div>
<div id="d6"><math><semantics><mi>a</mi><annotation-xml encoding="text/html"><div></div></annotation-xml></semantics><mn/></math></div>
</div>
<div>
<div><MATH id="m1"><Mtext/></math></div>
<div id="d1"><math><MI MATHVARIANT="BOLD" /></math></div>
<div id="d2"><math><semantics DEFINITIONurl="www.example.org/FOO"><mi>a</mi><annotation-xml><foo/><bar/></annotation-xml></semantics></math></div>
<div><math id="m3span-mtext"><mtext><Span>x</Span></mtext></math></div>
<div><math id="m3span-mi"><mi><Span>x</Span></mi></math></div>
<div><math id="m3p-mtext"><mtext><P>x</P></mtext></math></div>
<div><math id="m3p-mi"><mi><P>x</P></mi></math></div>
</div>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/math/input.html | HTML | <!DOCTYPE html>
<html>
<head>
<title>MathML in HTML5</title>
</head>
<body>
<math>
<mrow>
<mrow>
<msup>
<mi>a</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
</mrow>
<mo>=</mo>
<msup>
<mi>c</mi>
<mn>2</mn>
</msup>
</mrow>
</math>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<matrix>
<matrixrow>
<cn> 0 </cn> <cn> 1 </cn> <cn> 0 </cn>
</matrixrow>
<matrixrow>
<cn> 0 </cn> <cn> 0 </cn> <cn> 1 </cn>
</matrixrow>
<matrixrow>
<cn> 1 </cn> <cn> 0 </cn> <cn> 0 </cn>
</matrixrow>
</matrix>
</math>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<infinity/>
</math>
<math>
<semantics>
<!-- Presentation MathML -->
<mrow>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>y</mi>
</mrow>
<!-- Content MathML -->
<annotation-xml encoding="MathML-Content">
<apply>
<plus/>
<apply>
<power/>
<ci>x</ci>
<cn type="integer">2</cn>
</apply>
<ci>y</ci>
</apply>
</annotation-xml>
<!-- annotate an image -->
<annotation encoding="image/png" src="some/path/formula.png"/>
<!-- annotate TeX -->
<annotation encoding="application/x-tex">
x^{2} + y
</annotation>
</semantics>
</math>
<math>
<mtable>
<mtr groupalign="{left}">
<mtd>
<mrow>
<mn>2</mn>
<mo>⁢</mo>
<maligngroup/><mi>x</mi>
<maligngroup/><mo>+</mo>
<maligngroup/><mi>y</mi>
<maligngroup/><mo>=</mo>
<mo>-</mo>
<maligngroup/><mn>5</mn>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<maligngroup/><mi>x</mi>
<maligngroup/><mo>-</mo>
<mn>2</mn>
<mo>⁢</mo>
<maligngroup/><mi>y</mi>
<maligngroup/><mo>=</mo>
<maligngroup/><mn>1</mn>
</mrow>
</mtd>
</mtr>
</mtable>
</math>
<math>
<mtext> Theorem of Pythagoras </mtext>
<mtext> /* comment here */ </mtext>
</math>
<math>
<mtext>
<div>test</div>
</mtext>
</math>
<math>
<msup>
<mrow>
<mi> x </mi>
<malignmark edge="right"/>
</mrow>
<mn> 2 </mn>
</msup>
</math>
<math>
<annotation-xml>
<svg style="font-size: 20px" width="400px" height="220px" viewBox="0 0 200 110">
<g transform="translate(10,80)">
<path d="M 0 0 L 150 0 A 75 75 0 0 0 0 0
M 30 0 L 30 -60 M 30 -10 L 40 -10 L 40 0"
fill="none" stroke="black"></path>
<text transform="translate(10,20)">1</text>
<switch transform="translate(35,-40)">
<foreignObject width="200" height="50" requiredExtensions="http://www.w3.org/1998/Math/MathML">
<math>
<msqrt>
<mn>2</mn>
<mi>r</mi>
<mo>−</mo>
<mn>1</mn>
</msqrt>
</math>
</foreignObject>
<text>\sqrt{2r - 1}</text>
</switch>
</g>
</svg>
</annotation-xml>
</math>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/no-basic/input.html | HTML | <!DOCTYPE html>
<title>Saving money, saving bytes</title>
<p>Qed. | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/no-body/input.html | HTML | <!doctype html><head><title>Document</title></head><p>Test</p> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/no-head-and-body/input.html | HTML | <!doctype html><html lang="en"><p>test</p></html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/no-head/input.html | HTML | <!doctype html><body><p>Test</p></body> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/no-html/input.html | HTML | <!doctype html><head><title>Document</title></head><body><p>Test</p></body> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/noscript/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<noscript> <!-- anchor linking to external file --> <a href="https://www.mozilla.org/">External Link</a> </noscript>
<a href="https://www.mozilla.org/">External Link</a>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/object/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<object type="image/svg+xml" data="image.svg"><div>[fallback image]</div></object>
<object data="horse.wav">
<param name="autoplay" value="true">
</object>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/p-1/input.html | HTML | <!DOCTYPE html>
<html>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/p-2/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<p><table></table>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/p/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<p>Test</p>
<p>
Test
Test
</p>
<p>One
<p>Two
<p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/pre-1/input.html | HTML | <!DOCTYPE html><pre>
A</pre> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/pre-2/input.html | HTML | <!DOCTYPE html><pre>
A</pre> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/pre-3/input.html | HTML | <!doctype html>
<html>
<body>
<pre>
<code>
Text
</code>
</pre>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/pre/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<pre>
L TE
A A
C V
R A
DOU
LOU
REUSE
QUE TU
PORTES
ET QUI T'
ORNE O CI
VILISÉ
OTE- TU VEUX
LA BIEN
SI RESPI
RER - Apollinaire
test
</pre>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/ruby-1/input.html | HTML | <!doctype html><html><ruby>a<rb>b<rt></ruby></html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/ruby-2/input.html | HTML | <!doctype html><html><ruby>a<rb>b<rtc></ruby></html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/ruby/input.html | HTML | <!doctype html><html><ruby>a<rb>b<rb></ruby></html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/script-cdata/input.html | HTML | <!doctype html>
<script type="text/javascript">
//<![CDATA[
document.write("<");
//]]>
</script>
<script>
let foo = "<!--<script>-->";
console.log(foo);
</script> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/script/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
<script>console.log("test");</script>
</head>
<body>
<script type="text/html">
<div>
test
</div>
<!-- aa -->\n
</script>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/select/input.html | HTML | <!doctype html>
<select><option>foo</option><option>bar</option></select>
<select><option>foo<option>bar</select>
<select><option>foo</select>
<select> <option>foo</option> <option>bar</option><option>foo</select>
<select><optgroup label="Group 1"><option>Option 1.1</option></optgroup> <optgroup label="Group 2"><option>Option 2.1</option><option>Option 2.2</option></optgroup></select> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/svg/input.html | HTML | <!doctype html><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XTech SVG Demo</title>
<style>
stop.begin { stop-color:yellow; }
stop.end { stop-color:green; }
body.invalid stop.end { stop-color:red; }
#err { display:none; }
body.invalid #err { display:inline; }
</style>
<script>
function signalError() {
document.getElementById('body').setAttribute("class", "invalid");
}
</script>
</head>
<body id="body"
style="position:absolute; z-index:0; border:1px solid black; left:5%; top:5%; width:90%; height:90%;">
<form>
<fieldset>
<legend>HTML Form</legend>
<p><label>Введите что-нибудь:</label>
<input type="text"/>
<span id="err">Incorrect value!</span></p>
<p><input type="button" value="Activate!" onclick="signalError();" /></p>
</fieldset>
</form>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice"
style="width:100%; height:100%; position:absolute; top:0; left:0; z-index:-1;" baseProfile="test">
<linearGradient id="gradient">
<stop class="begin" offset="0%"/>
<stop class="end" offset="100%"/>
</linearGradient>
<rect x="0" y="0" width="100" height="100" style="fill:url(#gradient)" />
<circle cx="50" cy="50" r="30" style="fill:url(#gradient)" />
</svg>
<svg viewBox="0 0 420 200" xmlns="http://www.w3.org/2000/svg">
<filter id="noise1" x="0" y="0" width="100%" height="100%">
<feTurbulence baseFrequency="0.025" />
</filter>
<filter id="noise2" x="0" y="0" width="100%" height="100%">
<feTurbulence baseFrequency="0.05" />
</filter>
<rect x="0" y="0" width="200" height="200" style="filter: url(#noise1);" />
<rect x="0" y="0" width="200" height="200" style="filter: url(#noise2); transform: translateX(220px);" />
</svg>
<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
<text xml:lang="en-US">This is some English text</text>
</svg>
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="200" height="200">
<image x="90" y="-65" width="128" height="146" transform="rotate(45)"
xlink:href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/image/mdn_logo_only_color.png"/>
</svg>
<svg viewBox="0 0 140 50" xmlns="http://www.w3.org/2000/svg">
<text y="20" xml:space="default">Default spacing</text>
<text y="40" xml:space="preserve">Preserved spacing</text>
</svg>
<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
<text xml:lang="en-US">This is some English text</text>
<a xlink:href= "http://example.com/link/" xlink:title="The link leads to an example page that is of little interest">
<text x="10" y="25" >An example link.</text>
</a>
</svg>
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<style>
div {
color: white;
font: 18px serif;
height: 100%;
overflow: auto;
}
</style>
<polygon points="5,5 195,10 185,185 10,195" />
<!-- Common use case: embed HTML text into SVG -->
<foreignObject x="20" y="20" width="160" height="160">
<!--
In the context of SVG embedded in an HTML document, the XHTML
namespace could be omitted, but it is mandatory in the
context of an SVG document
-->
<div xmlns="http://www.w3.org/1999/xhtml">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed mollis mollis mi ut ultricies. Nullam magna ipsum,
porta vel dui convallis, rutrum imperdiet eros. Aliquam
erat volutpat.
</div>
</foreignObject>
</svg>
<svg style="font-size: 20px" width="400px" height="220px" viewBox="0 0 200 110">
<g transform="translate(10,80)">
<path d="M 0 0 L 150 0 A 75 75 0 0 0 0 0
M 30 0 L 30 -60 M 30 -10 L 40 -10 L 40 0"
fill="none" stroke="black"></path>
<text transform="translate(10,20)">1</text>
<switch transform="translate(35,-40)">
<foreignObject width="200" height="50"
requiredExtensions="http://www.w3.org/1998/Math/MathML">
<math>
<msqrt>
<mn>2</mn>
<mi>r</mi>
<mo>−</mo>
<mn>1</mn>
</msqrt>
</math>
</foreignObject>
<text>\sqrt{2r - 1}</text>
</switch>
</g>
</svg>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/table/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<table>
<tr>
<td> </td>
<td>Knocky</td>
<td>Flor</td>
<td>Ella</td>
<td>Juan</td>
</tr>
<tr>
<td>Breed</td>
<td>Jack Russell</td>
<td>Poodle</td>
<td>Streetdog</td>
<td>Cocker Spaniel</td>
</tr>
<tr>
<td>Age</td>
<td>16</td>
<td>9</td>
<td>10</td>
<td>5</td>
</tr>
<tr>
<td>Owner</td>
<td>Mother-in-law</td>
<td>Me</td>
<td>Me</td>
<td>Sister-in-law</td>
</tr>
<tr>
<td>Eating Habits</td>
<td>Eats everyone's leftovers</td>
<td>Nibbles at food</td>
<td>Hearty eater</td>
<td>Will eat till he explodes</td>
</tr>
</table>
<table>
<thead>
<tr>
<th>Student ID</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="2">Computer Science</th>
</tr>
<tr>
<td>3741255</td>
<td>Jones, Martha</td>
</tr>
<tr>
<td>4077830</td>
<td>Pierce, Benjamin</td>
</tr>
<tr>
<td>5151701</td>
<td>Kirk, James</td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="2">Russian Literature</th>
</tr>
<tr>
<td>3971244</td>
<td>Nim, Victor</td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="2">Astrophysics</th>
</tr>
<tr>
<td>4100332</td>
<td>Petrov, Alexandra</td>
</tr>
<tr>
<td>8892377</td>
<td>Toyota, Hiroko</td>
</tr>
</tbody>
</table>
<table><tr><td>test</td><td>test</td></tr></table>
<table><tbody><tr><td>test</td></tr></tbody></table>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/template-1/input.html | HTML | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/template-2/input.html | HTML | <!DOCTYPE HTML><template> <tr> <td>cell</td> </tr> </template> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/template/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<template id="element-details-template">
<style>
details {font-family: "Open Sans Light", Helvetica, Arial, sans-serif }
.name {font-weight: bold; color: #217ac0; font-size: 120% }
h4 {
margin: 10px 0 -8px 0;
background: #217ac0;
color: white;
padding: 2px 6px;
border: 1px solid #cee9f9;
border-radius: 4px;
}
.attributes { margin-left: 22px; font-size: 90% }
.attributes p { margin-left: 16px; font-style: italic }
</style>
<details>
<summary>
<code class="name"><<slot name="element-name">NEED NAME</slot>></code>
<i class="desc"><slot name="description">NEED DESCRIPTION</slot></i>
</summary>
<div class="attributes">
<h4>Attributes</h4>
<slot name="attributes"><p>None</p></slot>
</div>
</details>
<hr>
</template>
<template id="tmpl1">
<div id="div1">This is div inside template</div>
<div id="div2">This is another div inside template</div>
<template id="tmpl2"><div id="div3">This is div inside nested template</div>
<div id="div4">This is another div inside nested template</div>
</template>
</template>
<template><div>test</div></template>
</body>
</html>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/textarea/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<label for="story">Tell us your story:</label>
<textarea id="story" name="story"
rows="5" cols="33">
test
test
test
</textarea>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/element/ul/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<ul><li>test</li> <li>test</li><li>Test</ul>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/text/basic/input.html | HTML | <!doctype html>
Text
<div>Text</div>
<div>
Text
</div>
<div>
Text
Text
</div>
<div>Text
Text</div>
Test & Test & Test 𝔄 Test 𝒦 & test
&testtesttest Ӓ ሴ — —
FOOxZOO
—
  
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_html_parser/tests/fixture/text/bom/input.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div>Test</div>
</body>
</html> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.