Reference

Markup Reference ​

This page lists every class and data-comments-* attribute the thread draws, and every CSS custom property its stylesheets read. The tables are generated from the package's code, so they always match the version these docs describe. Class Names and CSS Layers explains how to use them.

Each class and attribute is marked Stable or Internal. Stable ones are the parts and states a site would reasonably style or select. They change only in a major release, and the upgrade guide lists any that do. Internal ones are helpers inside a part, listed so you can see them, but free to change in any release, so style the stable element around them instead. A class ending in <value> stands for a family, such as comments__badge--<value> for comments__badge--staff and comments__badge--verified.

The last column says which element carries each one, and where it's first drawn among the states the package's tests draw, such as a member's view of a thread, a guest's or a moderator's. Some only appear in particular states, such as comments__comment--held for a moderator.

Thread ​

The thread's root, its header, the list, and what's shown while it waits, when it's empty or when it fails.

ClassStatusElementFirst drawn in
commentsStable<section>the mount point
comments__closed-noticeStable<p>a closed thread
comments__countStable<span>a member’s view
comments__emptyStable<div>an empty thread
comments__foldedStable<div>folded
comments__folded-labelStable<p>folded
comments__folded-showStable<button>folded
comments__followStable<button>a member’s view
comments__gif--portraitStable<img>a member’s view
comments__gif-attributionStable<p>gifs
comments__gif-buttonStable<button>gifs
comments__gif-pickerStable<div>gifs
comments__gif-previewStable<figure>gifs
comments__gif-removeStable<button>gifs
comments__gif-resultStable<button>gifs
comments__gif-resultsStable<div>gifs
comments__gif-searchStable<input>gifs
comments__headerStable<header>a member’s view
comments__headingStable<h2>the mount point
comments__iconStable<svg>a member’s view
comments__icon--<value>Stable<svg>a member’s view
comments__listStable<ol>a member’s view
comments__liveStable<div>a member’s view
comments__load-errorStable<div>a thread that failed to load
comments__load-moreStable<div>a member’s view
comments__load-more-buttonStable<button>a member’s view
comments__loadingStable<p>a thread waiting to load
comments__moderator-barStable<div>a moderator’s view
comments__retryStable<button>a thread that failed to load
comments__show-commentsStable<div>the Show comments state
comments__show-comments-buttonStable<button>the Show comments state
comments__sortStable<nav>a member’s view
comments__sort-optionStable<button>a member’s view
comments__toastStable<div>a member’s view
comments__visually-hiddenStable<span>a member’s view
comments__field-cellInternal<div>a member’s view
comments__field-requiredInternal<span>a member’s view
comments__follow-formInternal<form>a member’s view
comments__gif-areaInternal<div>gifs
comments__gif-cellInternal<div>gifs
comments__gif-preview-imageInternal<img>gifs
comments__gif-result-imageInternal<img>gifs
comments__gif-statusInternal<p>gifs
comments__header-mainInternal<div>a member’s view
comments__moderator-bar-actionsInternal<div>a moderator’s view
comments__noscriptInternal<p>the mount point
comments__switchInternal<input>a member’s view
comments--reserve-<value>Internal<section>the mount point

Comment ​

Each comment, from its author and text to its actions, its custom field values, a moderator's review and its replies.

ClassStatusElementFirst drawn in
comments__actionStable<button>a member’s view
comments__actionsStable<div>a member’s view
comments__authorStable<div>a member’s view
comments__author-nameStable<span>a member’s view
comments__author-scoreStable<span>folded
comments__author-score--negativeStable<span>folded
comments__author-score--positiveStable<span>folded
comments__avatarStable<span>a member’s view
comments__avatar--guestStable<span>a guest’s view
comments__avatar--initialsStable<span>a member’s view
comments__badgeStable<span>a member’s view
comments__badge--<value>Stable<span>a member’s view
comments__commentStable<li>a member’s view
comments__comment--heldStable<li>a moderator’s view
comments__comment--highlightStable<li>a member’s view
comments__comment--pendingStable<li>a member’s view
comments__comment--reportedStable<li>a moderator’s view
comments__contentStable<div>a member’s view
comments__content-plainStable<p>a member’s view
comments__content-richStable<div>a member’s view
comments__dateStable<time>a member’s view
comments__editedStable<span>a member’s view
comments__field-fileStable<a>a member’s view
comments__field-file--imageStable<a>a member’s view
comments__field-filesStable<span>a member’s view
comments__field-linkStable<a>a member’s view
comments__field-thumbStable<img>a member’s view
comments__field-valueStable<div>a member’s view
comments__field-value--<value>Stable<span>a member’s view
comments__fieldsStable<dl>a member’s view
comments__gifStable<img>a member’s view
comments__menuStable<details>a member’s view
comments__menu-itemStable<button>a member’s view
comments__menu-item--dangerStable<button>a member’s view
comments__menu-itemsStable<div>a member’s view
comments__menu-toggleStable<summary>a member’s view
comments__meta-itemStable<span>a member’s view
comments__moderation-actionsStable<div>a moderator’s view
comments__permalinkStable<a>a member’s view
comments__placeholderStable<p>a member’s view
comments__repliesStable<div>a member’s view
comments__replies-listStable<ol>a member’s view
comments__reviewStable<div>a member’s view
comments__review-labelStable<p>a member’s view
comments__scoreStable<span>a moderator’s view
comments__toggle-repliesStable<button>a member’s view
comments__voteStable<button>a member’s view
comments__vote--downStable<button>a moderator’s view
comments__vote--upStable<button>a member’s view
comments__vote-countStable<span>a member’s view
comments__author-metaInternal<div>a member’s view
comments__field-nameInternal<dt>a member’s view
comments__field-textInternal<dd>a member’s view
comments__interactionsInternal<div>a member’s view
comments__menu-groupInternal<div>a moderator’s view
comments__menu-headingInternal<span>a moderator’s view
comments__vote-labelInternal<span>a member’s view
comments__vote-totalInternal<span>a closed thread

Editor ​

The comment form, the sign-in card for guests, the guest fields, custom fields on the form and Assets fields' file tray.

ClassStatusElementFirst drawn in
comments__cancelStable<button>a member’s view
comments__editorStable<form>a member’s view
comments__editor--createStable<form>a member’s view
comments__editor--editStable<form>an edit form
comments__editor--replyStable<form>a member’s view
comments__fieldStable<div>a member’s view
comments__field-errorStable<p>a form with errors
comments__field-labelStable<label>a member’s view
comments__form-errorStable<p>a member’s view
comments__frameStable<div>a member’s view
comments__frame--fieldsStable<div>a member’s view
comments__guest-fieldsStable<fieldset>a guest’s view
comments__joinStable<section>a guest’s view
comments__join-actionsStable<div>a guest’s view
comments__join-guestStable<details>a guest’s view
comments__join-textStable<p>a guest’s view
comments__join-titleStable<h3>a guest’s view
comments__posting-asStable<p>a member’s view
comments__submitStable<button>a member’s view
comments__uploadStable<li>a file field
comments__upload--fileStable<li>a file field
comments__upload--imageStable<li>a file field
comments__upload-addStable<button>a member’s view
comments__upload-removeStable<button>a file field
comments__upload-retryStable<button>a file field
comments__uploadsStable<ul>a file field
comments__contextual-editorInternal<div>a member’s view
comments__editor-fieldsInternal<div>a member’s view
comments__editor-fields--aboveInternal<div>a member’s view
comments__editor-rowInternal<div>a member’s view
comments__field--checkboxInternal<label>a member’s view
comments__field--filesInternal<div>a member’s view
comments__field-customInternal<div>a member’s view
comments__field-hintInternal<span>a guest’s view
comments__field-instructionsInternal<p>a member’s view
comments__frame-boxInternal<div>a member’s view
comments__frame-countInternal<span>a member’s view
comments__frame-count--badInternal<span>a form with errors
comments__frame-count--warnInternal<span>a form with errors
comments__frame-footInternal<div>a member’s view
comments__frame-headInternal<div>a member’s view
comments__frame-iconInternal<svg>a member’s view
comments__frame-linkInternal<button>a form with errors
comments__frame-metaInternal<span>a member’s view
comments__frame-noticeInternal<div>a member’s view
comments__frame-notice-textInternal<span>a form with errors
comments__frame-replyInternal<p>a member’s view
comments__frame-reply-cancelInternal<button>a member’s view
comments__frame-reply-textInternal<span>a member’s view
comments__frame-statusInternal<span>a member’s view
comments__frame-status--badInternal<span>a form with errors
comments__frame-status--fadedInternal<span>a form with errors
comments__frame-status-textInternal<span>a form with errors
comments__join-followInternal<details>a guest’s view
comments__labelInternal<legend>a member’s view
comments__ring-bgInternal<circle>a form with errors
comments__ring-fgInternal<circle>a form with errors
comments__submit-iconInternal<svg>a member’s view
comments__submit-keysInternal<kbd>a member’s view
comments__submit-labelInternal<span>a member’s view
comments__textarea-fallbackInternal<textarea>a member’s view
comments__upload--doneInternal<li>a file field
comments__upload--failedInternal<li>a file field
comments__upload--uploadingInternal<li>a file field
comments__upload-iconInternal<span>a file field
comments__upload-limitInternal<span>a file field
comments__upload-metaInternal<span>a file field
comments__upload-nameInternal<span>a file field
comments__upload-rowInternal<div>a member’s view
comments__upload-textInternal<span>a file field
comments__upload-thumbInternal<img>a file field
verbb-editor__buttonInternal<button>a member’s view

Report Dialog ​

The dialog that opens from a comment's Report… action.

ClassStatusElementFirst drawn in
comments__report-dialogStable<dialog>a member’s view
comments__report-formStable<form>a member’s view
comments__report-reasonStable<label>a member’s view
comments__report-actionsInternal<div>a member’s view
comments__report-closeInternal<button>a member’s view
comments__report-fieldsInternal<fieldset>a member’s view
comments__report-headerInternal<div>a member’s view
comments__report-quoteInternal<blockquote>a member’s view
comments__report-reason-descriptionInternal<span>a member’s view
comments__report-reason-labelInternal<span>a member’s view
comments__report-titleInternal<h3>a member’s view

Controls ​

The styling classes of the ten controls themeConfig reaches. resetClass drops these from a control.

ClassStatusElementFirst drawn in
comments__buttonStable<button>a member’s view
comments__button--primaryStable<button>a member’s view
comments__button--quietStable<button>a member’s view
comments__button--secondaryStable<button>a member’s view
comments__checkboxStable<input>a member’s view
comments__inputStable<input>a member’s view
comments__linkStable<a>a member’s view
comments__radioStable<input>a member’s view
comments__selectStable<select>a member’s view
comments__textareaStable<textarea>a member’s view

State Attributes ​

The thread's behaviour relies on its data-comments-* attributes rather than its classes. The stable ones are safe for your CSS and scripts to select, such as data-comments-state on each comment, which holds its state (approved, pending, held, reported or placeholder), data-comments-phase on the root as it loads, and data-comments-action on every control that does something. Those on the mount point are written by craft.comments.render() and the React and Vue packages rather than the renderer.

AttributeStatusElementFirst drawn in
data-comments-actionStable<button>a member’s view
data-comments-adapterStablethe mount point
data-comments-auto-mountStablethe mount point
data-comments-controlStable<button>a member’s view
data-comments-phaseStablethe mount point
data-comments-rootStable<section>the mount point
data-comments-stateStable<li>a member’s view
data-comments-themeStablethe mount point
data-comments-api-versionInternalthe mount point
data-comments-bodyInternal<textarea>a member’s view
data-comments-collapsedInternal<div>a member’s view
data-comments-collapsibleInternal<form>a member’s view
data-comments-commentInternal<li>a member’s view
data-comments-comment-uidInternal<li>a member’s view
data-comments-configInternalthe mount point
data-comments-countInternalthe mount point
data-comments-depthInternal<li>a member’s view
data-comments-endpointInternalthe mount point
data-comments-fieldInternal<input>a member’s view
data-comments-foldedInternal<div>folded
data-comments-formInternal<form>a member’s view
data-comments-gif-actionInternal<button>gifs
data-comments-gif-indexInternal<button>gifs
data-comments-gif-searchInternal<input>gifs
data-comments-hostInternala component override’s host
data-comments-host-kindInternala component override’s host
data-comments-host-nameInternala component override’s host
data-comments-interaction-modeInternal<div>a member’s view
data-comments-jsInternalthe mount point
data-comments-labelsInternalthe mount point
data-comments-load-modeInternalthe mount point
data-comments-moderation-actionInternal<button>a moderator’s view
data-comments-owner-idInternalthe mount point
data-comments-placeholderInternal<span>a thread waiting to load
data-comments-regionInternal<div>a member’s view
data-comments-repliesInternal<div>a member’s view
data-comments-report-dialogInternal<dialog>a member’s view
data-comments-root-uidInternal<div>a member’s view
data-comments-site-idInternalthe mount point
data-comments-slotInternal<p>a member’s view
data-comments-sortInternal<button>a member’s view
data-comments-state-badgeInternal<div>a member’s view
data-comments-uploadInternal<button>a file field
data-comments-upload-actionInternal<button>a member’s view
data-comments-upload-fieldInternal<button>a member’s view
data-comments-upload-inputInternal<input>a member’s view
data-comments-visual-depthInternal<li>a member’s view
data-comments-voteInternal<button>a member’s view
data-comments-widthInternal<div>a member’s view

CSS Custom Properties ​

The properties the stylesheets read, with their values in the light theme and in the dark theme (which the automatic theme uses while the visitor prefers dark). The plugin's Theming guide explains how to set them. Properties starting --_comments- are internal and aren't listed.

PropertyLightDark and autoElsewhere
--comments-avatar-size2.25rem
--comments-color-accent#0b57d0#8ab4f8
--comments-color-avatar-0#3b6ea5
--comments-color-avatar-1#8a5a2b
--comments-color-avatar-2#2f7d4f
--comments-color-avatar-3#8a3f7d
--comments-color-avatar-4#b0532a
--comments-color-avatar-5#237a7a
--comments-color-avatar-6#5a4fa3
--comments-color-avatar-7#6b7a2a
--comments-color-border#d6d9dd#43484f
--comments-color-control-border#8b9198#70767e
--comments-color-danger#b3261e#f2b8b5
--comments-color-focus#0b57d0#8ab4f8
--comments-color-held-border#f2d39b#6b5428
--comments-color-held-surface#fff8eb#33291a
--comments-color-held-text#8a5300#f3c77a
--comments-color-like#c4314b#ff8a9e
--comments-color-link#0b57d0#8ab4f8
--comments-color-muted#5a6068#b4b9c0
--comments-color-on-accent#fff#10223f
--comments-color-on-avatar#fff
--comments-color-on-toast#fff#17191c
--comments-color-panelNot set#17191c
--comments-color-reported-border#f5c2bd#74403b
--comments-color-reported-surface#fff1f0#3a2422
--comments-color-reported-text#a8322a#f2a8a1
--comments-color-scrimrgb(0 0 0 / 45%)
--comments-color-success#146c2e#7dd99b
--comments-color-surface#fff#1f2226
--comments-color-surface-muted#f5f6f7#2a2e33
--comments-color-text#1f2328#eceef0
--comments-color-toast#1f2328#eceef0
--comments-color-toast-danger#ff9a93#b3261e
--comments-color-toast-success#7dd99b#146c2e
--comments-color-warning#a85d00
--comments-control-size2.25rem2.75rem under @media (pointer: coarse)
--comments-font-familyinherit
--comments-font-size1rem
--comments-gif-max-size15rem
--comments-line-height1.5
--comments-radius0.5rem
--comments-reserveNot set, so each rule’s own fallback applies
--comments-space-10.25rem
--comments-space-20.5rem
--comments-space-30.75rem
--comments-space-41rem
--comments-space-51.5rem
--comments-thread-indent0.875rem0.75rem under @media (max-width: 40rem)

--comments-reserve sets the height reserved for a thread before it loads, which otherwise comes from an estimate based on its comment count.

Last updated: Nov 18, 2026, 12:27 PM