Media
Pictures, drawings and documents from somewhere else. One rule runs through
all of them: every picture is a link. One <img>, one file, and no
element decides anything about what is in the file.
A drawing as an image renders in a document of its own, where none of this system's tokens exists. It keeps whatever grey its author wrote as the fallback. A reference into the file lets it read the page's tokens. Illustrations and artwork says what Firefox and Safari have to ship before a site can rest on that.
A picture with its own colours gets a ground drawn for them. The
figure's frame, a card's picture and the viewer all take --surface-art,
the one surface with a single value for both modes. A diagram a tool
exported is usually dark line art on nothing. On a dark ground the page
contradicts its own picture.
Nothing here takes a flag for the mode a picture arrives in, and the finishing step reads no drawing. What is in its own file lays out an image, and it is the same picture in light and in dark.
Nothing here takes a flag for the mode a picture arrives in, and the finishing step reads no drawing. What is in its own file lays out an image, and it is the same picture in light and in dark.
sds-image#
A picture, and nothing around it.
<sds-image src="/art/pipeline.svg" alt="Source, build, published site"></sds-image>
<sds-image src="/art/pipeline.svg" alt="Source, build, published site" zoomable></sds-image>
<sds-image class="sds-signet" src="/soul/assets/signet.svg" alt=""
width="24" height="24"></sds-image><sds-image src="/art/pipeline.svg" alt="Source, build, published site"></sds-image>
<sds-image src="/art/pipeline.svg" alt="Source, build, published site" zoomable></sds-image>
<sds-image class="sds-signet" src="/soul/assets/signet.svg" alt=""
width="24" height="24"></sds-image>
-
srcrequired # -
- type
- string
What the picture shows, for a reader who cannot see it. Empty where the text beside it says the same thing: a mark in a lockup whose wordmark spells the name. The picture then hides instead of an announcement with no name.
-
altrequired # -
- type
- string
What the picture shows, for a reader who cannot see it. Empty where the text beside it says the same thing: a mark in a lockup whose wordmark spells the name. The picture then hides instead of an announcement with no name.
-
width# -
- type
- number
Both, for a picture no stylesheet sizes. The file's own coordinate system keeps the proportions inside them. A 5:4 mark in a square box draws 5:4 and centred, never stretched.
-
height# -
- type
- number
Both, for a picture no stylesheet sizes. The file's own coordinate system keeps the proportions inside them. A 5:4 mark in a square box draws 5:4 and centred, never stretched.
A press opens the picture at its made size. The trigger is a link to the file, so a surface with no script still opens it. The element takes the press over only after its upgrade. For a picture shrunk into its column, and never for a mark in a lockup.
-
zoomable# -
- type
- boolean
- default
- false
A press opens the picture at its made size. The trigger is a link to the file, so a surface with no script still opens it. The element takes the press over only after its upgrade. For a picture shrunk into its column, and never for a mark in a lockup.
The class a caller gives is the one the picture renders with. That is why
a signet is <sds-image class="sds-signet">, and nothing in this
element has to know what a signet is.
-
class# -
- type
- string
The class a caller gives is the one the picture renders with. That is why a signet is
<sds-image class="sds-signet">, and nothing in this element has to know what a signet is.
The element takes no content, but it takes a fallback. That is the same picture in the class layer, for a surface that renders before a script and for a reader who runs none. The element redraws it and the server's copy goes, because light DOM otherwise leaves two pictures in one box.
The element takes no content, but it takes a fallback. That is the same picture in the class layer, for a surface that renders before a script and for a reader who runs none. The element redraws it and the server's copy goes, because light DOM otherwise leaves two pictures in one box.
sds-figure#
A picture and the claim it makes. The caption is mandatory and not a title. A picture whose point a reader has to infer means something different to every reader. So the sentence under it states the claim the picture stands for.
<sds-figure src="/art/pipeline.svg" alt="Source, build, published site"
caption="Every route resolves to the same tokens." zoomable></sds-figure><sds-figure src="/art/pipeline.svg" alt="Source, build, published site"
caption="Every route resolves to the same tokens." zoomable></sds-figure>
-
srcrequired # -
- type
- string
-
altrequired # -
- type
- string
Can also stand between the tags as a <figcaption> with the caption
class. That is the form for a caption with a link or a literal in it. It
is also the form for a page read before the element upgrades.
-
caption# -
- type
- string | markup
Can also stand between the tags as a
<figcaption>with the caption class. That is the form for a caption with a link or a literal in it. It is also the form for a page read before the element upgrades.
-
width# -
- type
- number
The picture's own size, where a document declared one. A figure fills its column and needs neither.
-
height# -
- type
- number
The picture's own size, where a document declared one. A figure fills its column and needs neither.
No frame and no ground, for an illustration with no edge of its own. A screenshot or a drawing keeps its frame, because its colours are for that ground.
-
plain# -
- type
- boolean
- default
- false
No frame and no ground, for an illustration with no edge of its own. A screenshot or a drawing keeps its frame, because its colours are for that ground.
A press opens the drawing at its drawn size. The trigger is a link to the file, so a surface with no script still opens it. The element takes the press over only after its upgrade. Worth it for anything wider than its column, pointless for a photograph.
-
zoomable# -
- type
- boolean
- default
- false
A press opens the drawing at its drawn size. The trigger is a link to the file, so a surface with no script still opens it. The element takes the press over only after its upgrade. Worth it for anything wider than its column, pointless for a photograph.
A picture a renderer already wrote between the tags wins over
src. A rewrite replaces a picture the reader can see with a second
request for the same file.
A picture a renderer already wrote between the tags wins over
src. A rewrite replaces a picture the reader can see with a second
request for the same file.
sds-diagram#
A drawing from the text that describes it, and only the drawing. The text
stands between the tags as a .diagram file holds it, and
Diagrams names its statements. The element draws it
inline, so its colours are the page's tokens and it turns with the mode. The
finishing step renders it before a page ships, so a reader with no script
gets the drawing.
<sds-diagram>
cells
title "A gap map"
description "Two groups of needs with their state."
group "Edit"
F1.1 yes
F1.2 partly
</sds-diagram><sds-diagram>
cells
title "A gap map"
description "Two groups of needs with their state."
group "Edit"
F1.1 yes
F1.2 partly
</sds-diagram>
The indent the whole text shares does not count, so the text can stand indented in a page. The drawing takes the width of its column and keeps its proportions. It does not shrink so far that its smallest type, 13, is under 9 pixels. In a narrower column, it keeps that width and scrolls to the side. A slide scales its drawing with the whole slide, so there is no limit there. A frame and a caption are the figure's: put the element in an sds-figure, which takes it between its tags as its picture.
<sds-figure caption="Each need has its state, so a missing one stands out.">
<sds-diagram>…</sds-diagram>
</sds-figure><sds-figure caption="Each need has its state, so a missing one stands out.">
<sds-diagram>…</sds-diagram>
</sds-figure>
The text of the drawing, for a script that sets a string. A page writes the text between the tags. A text the grammar refuses draws the refusal in the place of the drawing, with the line or the part it names.
-
source# -
- type
- string
The text of the drawing, for a script that sets a string. A page writes the text between the tags. A text the grammar refuses draws the refusal in the place of the drawing, with the line or the part it names.
The room of a slide, width,height in its frame's pixels. The drawing
then has no margin of its own, because the slide's margin is its margin.
-
room# -
- type
- string
The room of a slide,
width,heightin its frame's pixels. The drawing then has no margin of its own, because the slide's margin is its margin.
The size of a page drawing: 940, or 940,480 for a height too. It
stands over canvas= in the text. A slide has its room, so it says nothing
there.
-
canvas# -
- type
- string
The size of a page drawing:
940, or940,480for a height too. It stands overcanvas=in the text. A slide has its room, so it says nothing there.
The free space on every side of a page drawing, in units. It stands over
margin= in the text.
-
margin# -
- type
- string
The free space on every side of a page drawing, in units. It stands over
margin=in the text.
The prefix of the ids inside the drawing. It comes from the text by default. Two drawings with the same text on one page need two names.
-
name# -
- type
- string
The prefix of the ids inside the drawing. It comes from the text by default. Two drawings with the same text on one page need two names.
A press on the drawing opens it at the size of the window, in an
sds-lightbox. The large drawing is inline
too, so it keeps the page's tokens in either mode. Its head is the
title of the text. The viewer opens it fitted, and the reader zooms
and moves it there. Use it for a drawing too dense for
the column. A slide has no zoom: its drawing has the room of the slide.
-
zoomable# -
- type
- boolean
- default
- false
A press on the drawing opens it at the size of the window, in an sds-lightbox. The large drawing is inline too, so it keeps the page's tokens in either mode. Its head is the
titleof the text. The viewer opens it fitted, and the reader zooms and moves it there. Use it for a drawing too dense for the column. A slide has no zoom: its drawing has the room of the slide.
<sds-figure caption="The first lookup reads the file, the second stops at the array.">
<sds-diagram zoomable>…</sds-diagram>
</sds-figure><sds-figure caption="The first lookup reads the file, the second stops at the array.">
<sds-diagram zoomable>…</sds-diagram>
</sds-figure>
sds-embed#
A document from somewhere else, in a frame this page controls. An iframe arrives with a size that has no relation to its column, and browsers draw it with an inset border out of 1996. This gives it the hairline and the sunken plane every other block here has.
<!-- A video: no size of its own, so it fills the column at a ratio. -->
<sds-embed src="https://…" label="The release talk" ratio="16 / 9"
allow="encrypted-media; picture-in-picture; web-share" allowfullscreen
caption="Twelve minutes, from the 1.4 release."></sds-embed>
<!-- A card: made at a size, and it scales down in a narrower column. -->
<sds-embed src="/_cards/…" label="Surfaces" width="700" height="420"></sds-embed><!-- A video: no size of its own, so it fills the column at a ratio. -->
<sds-embed src="https://…" label="The release talk" ratio="16 / 9"
allow="encrypted-media; picture-in-picture; web-share" allowfullscreen
caption="Twelve minutes, from the 1.4 release."></sds-embed>
<!-- A card: made at a size, and it scales down in a narrower column. -->
<sds-embed src="/_cards/…" label="Surfaces" width="700" height="420"></sds-embed>
An empty one is not nothing. A browser resolves it against the current document and embeds the page in itself, so the frame stays empty instead.
-
srcrequired # -
- type
- string
An empty one is not nothing. A browser resolves it against the current document and embeds the page in itself, so the frame stays empty instead.
What the frame holds, in a few words. It becomes the accessible name. An
unnamed frame announces as "frame", and a reader skips it. Not title, which
on the element is a tooltip over the frame and the caption both.
-
labelrequired # -
- type
- string
What the frame holds, in a few words. It becomes the accessible name. An unnamed frame announces as "frame", and a reader skips it. Not
title, which on the element is a tooltip over the frame and the caption both.
The shape the frame holds while it fills the column, as CSS writes it. For a video, a map or anything else with no size of its own.
-
ratio# -
- type
- string
- default
- "16 / 9"
The shape the frame holds while it fills the column, as CSS writes it. For a video, a map or anything else with no size of its own.
-
width# -
- type
- number
The size of the document, in pixels. Both together, and without a ratio, make the frame fixed. The document keeps this size, and in a narrower column it scales down whole. With no script the frame scrolls.
-
height# -
- type
- number
The size of the document, in pixels. Both together, and without a ratio, make the frame fixed. The document keeps this size, and in a narrower column it scales down whole. With no script the frame scrolls.
-
caption# -
- type
- string
The permissions policy of the frame. A video player asks for what it needs. A card asks for nothing, and gets nothing.
-
allow# -
- type
- string
The permissions policy of the frame. A video player asks for what it needs. A card asks for nothing, and gets nothing.
-
allowfullscreen# -
- type
- boolean
- default
- false
The frame does not load lazily, on purpose. An embed is the evidence on the page, and one that loads on scroll is blank in every screenshot.
The frame does not load lazily, on purpose. An embed is the evidence on the page, and one that loads on scroll is blank in every screenshot.
sds-compare#
Two pictures side by side, each with its claim. A concept shows what stands and what it proposes, and a reader reads the two against each other. So they stand in one row, each an sds-figure with its own caption, under a word that says which is which.
<sds-compare
before-src="/shots/status.png" before-alt="…" before-caption="The row says what the source does now."
after-src="/shots/source.png" after-alt="…" after-caption="The page keeps the last two reads."
before-label="As it stands" after-label="Proposed"
zoomable
></sds-compare><sds-compare
before-src="/shots/status.png" before-alt="…" before-caption="The row says what the source does now."
after-src="/shots/source.png" after-alt="…" after-caption="The page keeps the last two reads."
before-label="As it stands" after-label="Proposed"
zoomable
></sds-compare>
The halves reflow by their own width, never by the window. A half narrower than a picture reads is no half, and the two stand one under the other instead. Each half is a figure, so a press opens either at its own size. A picture arrives as every picture does: a link to a file, in the colours of its export.
The two files. before-alt and after-alt say what each shows for
a reader who cannot see it; before-caption and after-caption
carry the claim each makes.
-
before-src, after-srcrequired # -
- type
- string
The two files.
before-altandafter-altsay what each shows for a reader who cannot see it;before-captionandafter-captioncarry the claim each makes.
The word over each half. The caller's: As it stands and Proposed
where a paper says it that way, or the names of two pages read against
each other.
-
before-label, after-label# -
- type
- string
- default
- "Before", "After"
The word over each half. The caller's:
As it standsandProposedwhere a paper says it that way, or the names of two pages read against each other.
A press opens either picture at its own size.
-
zoomable# -
- type
- boolean
- default
- false
A press opens either picture at its own size.
sds-lightbox#
A drawing at its drawn size, on the platform's <dialog>. So the page
behind it goes inert, the focus moves in and comes back, and Escape closes.
The surface is not the modal's. A modal stops at a reading measure because a
reader reads what is inside one, and a reader looks at a drawing.
The surface is a stage, not a box around the file: as much of the screen as it can take without the edges. The picture opens fitted into it, whole and in the middle, whichever way round it is. A photograph smaller than the stage keeps its own size, since a larger draw only blurs it. A drawing grows to fit.
The head holds the view. − and + zoom, the figure between them says
how large the picture stands, and Fit shows it whole again. On
the stage, a drag moves the picture and the wheel zooms about the pointer.
The arrow keys move it, + and - zoom, 0 fits, and a double
click goes between the fit and the picture's own size. The page behind it
stops its scroll while it is open.
<sds-button for="the-drawing">Open the drawing</sds-button>
<sds-lightbox id="the-drawing" src="/art/pipeline.svg"
alt="Source, build, published site"></sds-lightbox><sds-button for="the-drawing">Open the drawing</sds-button>
<sds-lightbox id="the-drawing" src="/art/pipeline.svg"
alt="Source, build, published site"></sds-lightbox>
The file on show. Without it, content is.
-
src# -
- type
- string
The file on show. Without it,
contentis.
-
altrequired # -
- type
- string
What the drawing claims, in the head. The same sentence the figure carries, so the open is not a change of subject.
-
caption# -
- type
- string
What the drawing claims, in the head. The same sentence the figure carries, so the open is not a change of subject.
Markup in place of the file, for a script. It fills the stage, and an
inline <svg> fits into it whole. sds-diagram with zoomable
sets it, so its drawing keeps the page's tokens at full size.
-
content# -
- type
- property
Markup in place of the file, for a script. It fills the stage, and an inline
<svg>fits into it whole.sds-diagramwithzoomablesets it, so its drawing keeps the page's tokens at full size.
-
open# -
- type
- boolean
- default
- false
It answers sds-command, show, close, toggle, and has
show() and close() for a page that calls them. sds-figure needs
none of it. It owns its viewer and calls show() itself.
Diagrams for how to make a drawing a page can reference, and Illustrations and artwork for what belongs in one.
Diagrams for how to make a drawing a page can reference, and Illustrations and artwork for what belongs in one.