Skip to Content

Classes

Select a component in your CSS by the .clover-* class on its root, and a state by its data-* attribute.

Classes and states

The web components render the same classes, with no shadow root, so one stylesheet serves both flavors.

ComponentClass
Root.clover-root
The Viewer.clover-root, with .clover-template-default, .clover-template-document or .clover-template-gallery
Body.clover-body
Canvas.clover-canvas
Timeline.clover-canvas and .clover-timeline
Scene.clover-canvas and .clover-scene
Items.clover-items, and .clover-pager as a pager
Previous, Next, Position.clover-pager-previous, .clover-pager-next, .clover-pager-position
Status.clover-status
Panel.clover-panel
PanelToggle.clover-canvas-button with data-button="panel": every round control in the Body has the class
PanelPane.clover-template-panel
About.clover-about, which Collection has too
Annotations.clover-annotations
Collection.clover-collection
CollectionSelect.clover-collection-select
Contents.clover-contents
Download.clover-download
Search.clover-content-search
Transcript.clover-transcript
Map.clover-geomap
Split, SplitPane, SplitHandle.clover-split, .clover-split-pane, .clover-split-handle
ReadMore.clover-read-more
Label.clover-label
Thumbnail.clover-thumbnail
Summary.clover-summary
Metadata.clover-metadata
RequiredStatement.clover-required-statement
Rights.clover-rights
Homepage.clover-homepage
SeeAlso.clover-see-also
Rendering.clover-rendering
PartOf.clover-part-of
Id.clover-id
Provider.clover-provider
Logo.clover-logo
Value.clover-value
Every title.clover-title

Add a state to the class to style that state alone:

ClassStateValues
.clover-rootdata-statusidle, loading, ready, error
.clover-rootdata-high-contrastPresent in high contrast, on a component standing alone too
.clover-bodydata-renderercanvas, timeline, scene, custom
.clover-canvasdata-mediaIts painting body’s type, lowercased: image, video, sound…
.clover-canvasdata-recordingPresent when it paints a recording, video or sound, playing or not
.clover-canvasdata-playerPresent when a sound recording plays alone, as a player
.clover-canvasdata-animatedPresent on an animation
.clover-canvasdata-statusloading, ready, error
.clover-canvasdata-navigabletrue where it pans and zooms, else false
.clover-canvasdata-placeholdertrue while its placeholderCanvas shows, false once opened
.clover-canvasdata-fullscreentrue, false
.clover-canvasdata-controlsvisible, hidden, where the controls come and go
.clover-itemsdata-layoutslider, list, grid, masonry, pager
.clover-itemsdata-orientationvertical, on a vertical slider
.clover-itemsdata-navigationid, homepage
.clover-pagerdata-directionThe resource’s viewingDirectionviewing-direction
.clover-pagerdata-sizesmall
.clover-paneldata-layouttabs, accordion
.clover-paneldata-floatingPresent when it floats and Escape closes it
.clover-canvas-buttondata-sidestart, on a PanelToggle that takes the top start corner of the Body’s controls
.clover-template-paneldata-sidestart, end: the Body’s side it sits on (Helpers)
.clover-template-paneldata-opentrue, false
.clover-template-panesdata-panelover, beside: where a template’s Panel sits
.clover-template-defaultdata-fillPresent when it fills its box (fill)
.clover-template-gallerydata-heightauto, fixed
.clover-annotationsdata-scopeall, and none for view
.clover-content-searchdata-statusidle, loading, ready, error
.clover-content-search, .clover-transcriptdata-stickyPresent when its field holds at the top as it scrolls
.clover-geomapdata-statusloading, ready, error
.clover-split-handledata-draggingPresent while held
.clover-summarydata-read-moreopen, once Read more shows it whole

Here a grid’s --clover-items-size:

.clover-items[data-layout="grid"] { --clover-items-size: 12rem; }

Set a Canvas’s --clover-canvas-background for each data-media the same way.

Lists in Markdown text

Your CSS wins over Clover’s, so a reset that strips every list (ul, ol { list-style: none; padding: 0 }, as Tailwind’s and many themes’ do) strips the lists in an annotation’s or a Value<clover-value>’s Markdown too. They lose their bullets, numbers and indent, and Safari’s VoiceOver stops reading them as lists. Put them back, indented by --clover-space-l:

:is(.clover-annotations-text, .clover-value) ul { list-style: disc; padding-inline-start: var(--clover-space-l); } :is(.clover-annotations-text, .clover-value) ol { list-style: decimal; padding-inline-start: var(--clover-space-l); }