UNPKG

ecmarkup

Version:

Custom element definitions and core utilities for markup that specifies ECMAScript and related technologies.

651 lines (534 loc) 11.4 kB
@font-face { font-family: "Arial Plus"; src: local("Arial"); } @font-face { font-family: "Arial Plus"; unicode-range: U+30; font-style: normal; font-weight: 400; src: local(IBM Plex Mono Regular), local(IBMPlexMono-Regular); } @font-face { font-family: "Arial Plus"; unicode-range: U+221e; font-style: normal; font-weight: 400; src: local("DejaVu Math TeX Gyre"); } @font-face { font-family: "Arial Plus"; unicode-range: U+30; font-style: normal; font-weight: 700; src: local(IBM Plex Mono Bold), local(IBMPlexMono-Bold); } @font-face { font-family: "Arial Plus"; unicode-range: U+221e; font-style: normal; font-weight: 700; src: local("DejaVu Math TeX Gyre"); } @font-face { font-family: "Arial Plus"; unicode-range: U+30; font-style: italic; font-weight: 400; src: local(IBM Plex Mono Italic), local(IBMPlexMono-Italic); } @font-face { font-family: "Arial Plus"; unicode-range: U+221e; font-style: italic; font-weight: 400; src: local("DejaVu Math TeX Gyre"); } @font-face { font-family: "Arial Plus"; unicode-range: U+30; font-style: italic; font-weight: 700; src: local(IBM Plex Mono Bold Italic), local(IBMPlexMono-BoldItalic); } @font-face { font-family: "Arial Plus"; unicode-range: U+221e; font-style: italic; font-weight: 700; src: local("DejaVu Math TeX Gyre"); } :root { --page-number-style: decimal; } @page { size: A4; margin-top: 28mm; margin-bottom: 20mm; margin-inside: 19mm; margin-outside: 13mm; -prince-page-fill: prefer-fill; /* Uncomment when producing WIP versions of final standards */ /* @prince-overlay { color: rgba(0,0,0,0.15); content: "WORK IN PROGRESS"; font-family: Arial; font-weight: bolder; font-size: 100pt; transform: rotate(-60deg); } */ @bottom-left { font-family: Arial; } @bottom-right { font-family: Arial; } } @page :verso { @top-left { content: url('../img/ecma-header.svg'); padding-top: 5mm; } @bottom-left { content: counter(page, var(--page-number-style)); font-size: 10pt; } @bottom-right { content: '© Ecma International ' string(year, first); font-size: 8pt; } } @page :recto { @top-right { content: url('../img/ecma-header.svg'); padding-top: 5mm; } @bottom-left { content: '© Ecma International ' string(year, first); font-size: 8pt; } @bottom-right { content: counter(page, var(--page-number-style)); font-size: 10pt; } } @page :first, :nth(2) { margin: 0; @top-left { content: none; } @top-right { content: none; } @bottom-left { content: none; } @bottom-right { content: none; } } @page toc, copyright, intro { --page-number-style: lower-roman; } @page :blank { @bottom-left { content: none; } @bottom-right { content: none; } } @page front-cover { background-image: url('../img/print-front-cover.svg'); } @page inside-cover { background-image: url('../img/print-inside-cover.svg'); } @page front-cover, inside-cover { background-color: transparent; background-position: center; background-repeat: no-repeat; margin: 0; padding: 0; page-break-after: always; } html, body { background-color: initial; } body { font-family: 'Arial Plus', Arial, Helvetica, sans-serif, "DejaVu Math TeX Gyre", Symbola, monospace; font-size: 10pt; color: #000; line-height: 1.15; } h1, h2, h3, h4, h5, h6 { -prince-bookmark-level: none } .copyright-notice + h1.title { break-before: recto; color: black; counter-reset: page 1; display: block; font-size: 15pt; font-family: Verdana; font-weight: bold; margin-bottom: 2.5ex; margin-top: initial; } p { text-align: justify; text-rendering: optimizeLegibility; text-wrap: pretty; overflow-wrap: break-word; hyphens: auto; orphans: 2; widows: 2; } h1 { text-wrap: balance; line-height: 1.4; } emu-alg { display: block; /* Can't render block elements inside inline elements. */ } emu-alg li { orphans: 2; widows: 2; } emu-note, emu-note p, emu-table tr, emu-table th, emu-table td, pre, h1, emu-production, emu-figure:has(> figure > img) figure, #metadata-block { break-inside: avoid; border: unset; } p:has(+ .math-display), emu-table thead, h1, figcaption, emu-alg > ol > li:first-child, emu-grammar:has(+ emu-alg), figcaption:has(+ emu-table) { break-after: avoid-page; } emu-alg ol li:last-child { break-before: avoid; break-after: initial; /* it's okay to break after the last item in a list, even if it's also the first item in the list */ } emu-normative-optional emu-clause[id] { margin-top: 0; } emu-normative-optional emu-alg > ol { margin-bottom: 0; } emu-note { gap: initial; justify-content: space-between; } emu-note .note { font-size: 9pt; min-width: 4.5em; } emu-note p, emu-table td p { text-align: left; hyphens: manual; overflow: hidden; } emu-nt, emu-t { display: initial; } emu-production.inline { text-align: left; } emu-production.inline emu-nt { display: inline; } emu-intro { page: intro; } emu-intro, emu-clause, emu-annex { margin-top: 4ex; } emu-clause p:first-of-type { margin-bottom: 0; orphans: 3; } emu-clause > p:first-of-type { break-after: avoid-page; } emu-clause p:last-child { break-after: auto; margin-bottom: 0; } emu-clause > p:only-of-type { break-after: auto; } emu-clause > p:first-of-type + emu-alg { break-before: avoid; } emu-intro emu-intro, emu-clause emu-clause, emu-annex emu-annex { margin-top: 3.5ex; } emu-intro emu-intro emu-intro, emu-clause emu-clause emu-clause, emu-annex emu-annex emu-annex, emu-intro emu-intro emu-intro emu-intro, emu-clause emu-clause emu-clause emu-clause, emu-annex emu-annex emu-annex emu-annex, emu-intro emu-intro emu-intro emu-intro emu-intro, emu-clause emu-clause emu-clause emu-clause emu-clause, emu-annex emu-annex emu-annex emu-annex emu-annex { margin-top: 3.2ex; } emu-intro h1, emu-clause h1 , emu-annex h1 { break-after: avoid; font-size: 12pt; -prince-bookmark-level: 1; -prince-bookmark-label: content(); } emu-clause emu-clause h1, emu-annex emu-annex h1 { -prince-bookmark-level: 2; -prince-bookmark-state: closed; } emu-clause emu-clause h1, emu-annex emu-annex h1, emu-intro h2, emu-clause h2, emu-annex h2 { font-size: 11pt; } emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex h1 { -prince-bookmark-level: 3; } emu-clause emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex emu-annex h1 { -prince-bookmark-level: 4; } emu-clause emu-clause emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex emu-annex emu-annex h1 { -prince-bookmark-level: 5; } emu-clause emu-clause emu-clause emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex emu-annex emu-annex emu-annex h1 { -prince-bookmark-level: 6; } emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex h1, emu-clause emu-clause h2, emu-annex emu-annex h2, emu-clause emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex emu-annex h1, emu-clause emu-clause emu-clause h2, emu-annex emu-annex emu-annex h2, emu-clause emu-clause emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex emu-annex emu-annex h1, emu-clause emu-clause emu-clause emu-clause h2, emu-annex emu-annex emu-annex emu-annex h2, emu-clause emu-clause emu-clause emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex emu-annex emu-annex emu-annex h1, emu-clause emu-clause emu-clause emu-clause emu-clause h2, emu-annex emu-annex emu-annex emu-annex emu-annex h2 { font-size: 10pt; } emu-clause ol, emu-clause ul, emu-clause dl, emu-annex ol, emu-annex ul, emu-annex dl { margin-left: 0; padding-left: 1.75em; } emu-clause ol ol, emu-clause ul ul { padding-left: 2em; } emu-grammar { display: block; } emu-grammar:has(emu-production.inline) { display: inline-block; } h1 + emu-grammar { margin-top: 1ex; } p + emu-grammar { break-before: avoid; } emu-table td, emu-table th { overflow-wrap: break-word; } caption, table > figcaption { caption-side: top; color: #555555; font-weight: bold; margin-bottom: 1rem; text-align: center; } caption { -prince-caption-page: first; } /* do not break inside of small tables */ table:not(:has(tr:nth-of-type(5))) { break-inside: avoid-page; } table > figcaption { display: table-caption; -prince-caption-page: following; } table > figcaption::after { content: ' (continued)'; font-style: italic; font-weight: normal; } th[rowspan] { vertical-align: bottom; } td[rowspan] { vertical-align: middle; } emu-table thead { display: table-header-group; } emu-table tfoot { display: table-footer-group; } emu-figure img { margin-top: 1ex; max-width: 100%; height: auto; } #spec-container { max-width: initial; } #spec-container > emu-annex { margin-top: 0; } #toc > h2 { -prince-bookmark-level: 1; -prince-bookmark-label: content(); } #toc > h2::after { content: 'page'; float: right; font-size: 10pt; text-align: right; } #toc a, #toc var { color: #000; } #toc a[href]::after { content: leader(dotted) target-counter(attr(href), page); } #toc > ol.toc { margin-top: 0; } ol.toc { font-weight: bold; margin-left: 0; padding-left: 0; } ol.toc ol.toc { padding-left: 0; } ol.toc li { text-indent: 35pt hanging; } ol.toc .secnum { display: inline-block; min-width: 3.25em; } /* skip the Introduction since it's before the first emu-clause (and therefore doesn't have a proper page number) */ #toc > ol > li:first-child { display: none; } #toc > ol > li { margin-top: 0.75ex; } #toc, #spec-container > emu-intro, #spec-container > emu-annex { break-before: recto; break-after: page; } a[data-print-href]::after { content: ' <' attr(href) '>'; color: initial; } .real-table { max-width: 100%; width: auto; } emu-annex > h1 { text-align: center; } emu-annex > h1 span { display: block; } emu-annex > h1 .secnum { margin: 0 0 1lh; } .copyright-notice { /* ecma mandated */ font-style: italic; border: 1px solid black; padding: 1em; page: copyright; page-break-before: always; page-break-after: always; } .secnum { font-family: Arial, Helvetica, sans-serif; } #front-cover { page: front-cover; position: relative; width: 210mm; height: 297mm; } #front-cover h1 { color: black; display: block; font-family: Verdana; position: absolute; } h1.shortname { top: 86mm; font-weight: 400; font-size: 21pt; right: 31mm; text-align: right; margin-top: 0; } h1.shortname a:link, h1.shortname a:visited, h1.shortname a:hover, h1.shortname a:active { color: black; } h1.shortname .status { display: inline-block; margin-right: 7em; text-transform: capitalize; } h1.version { font-size: 9.7pt; font-weight: normal; margin-top: 0; text-align: right; top: 96mm; left: 139mm; string-set: year attr(data-year); } #front-cover h1.title { display: block; font-weight: bold; font-size: 20pt; line-height: 1.2; top: 109mm; right: 15mm; width: 95mm; text-align: left; } #inside-cover { page: inside-cover; } #toc { page: toc; counter-reset: page 1; } #toc h2 { font-size: 12pt; margin-bottom: 1.5ex; } .annex-kind { font-weight: normal; } p.ECMAaddress { margin: 0; }