Install

Works with Drupal: ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 1020.44 KB
MD5: 5b65bd8cabf0081a52d2cf33fd8a9d86
SHA-1: ffbe92caa7de1c3ae43025259de08b7a5567ea80
SHA-256: 17561dc0aa565a6873aa34d1a497c4eda76cc4e8448c77df93a990c9742e6544
Download zip 1.07 MB
MD5: 498d2dbbf98dcb39766de0a986475c5d
SHA-1: 073b1e8e38e09e8ff7d0d52f2f509a1b17f75750
SHA-256: 7276d4893080c23729b29d01cfd2ee3f47dd56e7b49da5903688e6945a04a761

Release notes

Canvas Studio Tailwind 1.0.0-beta2 requires Canvas Studio 1.0.0-beta2, released together with it. Upgrade both projects at the same time. The step-by-step guide ships in Canvas Studio as docs/upgrading.md.

New features

  • Timeline and Timeline Entry components. A chronology as a first-class component, with a layout prop (vertical, zigzag) and responsive marker placement. An entry has marker and content slots, plus optional branch_a and branch_b.
  • Per-breakpoint values for the remaining design properties: text size and colour, border width and colour (linked and per side), and individual position offsets, each for tablet, laptop and desktop. New fields default to inherit, so existing content renders unchanged.
  • Content templates can link component props to host entity fields: link props accept URLs and paths (format: uri-reference), so Canvas offers the host entity URL, and hero-blog.date accepts a timestamp field.
  • Rich-text heading scale set by the theme: every rich-text heading size, line height and margin is a --cs-prose-* variable, defaulting to the theme's own Tailwind tokens (the README lists them).
  • Navbar navbar--scrolled state class once the page scrolls, so an overlay header can turn solid without its own script.

Enhancements

  • Every component stylesheet is in @layer components with an explicit layer order, so components no longer outrank theme utilities, and the border_radius mappings no longer emit !important.
  • Rich text is styled on every component that can hold it, through a shared cs-prose library (tables, nested lists, captions and rules included, with logical properties for right-to-left).
  • The bundle no longer requires byte_theme by name: Mercury, Byte or any theme from the same starterkit works, given a Tailwind build that scans the library and the phosphor icon pack.
  • The roadmap-step Card surface resolves through the mapping layer; a neutral default card surface is available to every component.
  • Timeline controls follow the prop-bundle conventions.
  • Roadmap gains the Background, Borders and Visibility prop groups, and Roadmap Step gains Visibility, in line with Group, Section and Card.
  • Per-instance preview markers keep the Canvas editor's height stabiliser from mixing up instances (preview only; production output unchanged).
  • Accessibility: the navbar phone menu's opener exposes aria-expanded and aria-controls, Escape closes the menu and focus returns to the opener.
  • Translation: video play and pause labels and fallback text, and carousel slide labels, go through t() and Drupal.t().
  • Right-to-left: the navbar uses logical spacing and the roadmap's layout margins and borders are logical properties.

Bug fixes

  • hero-side-by-side and hero-billboard: an image set through the media prop shows (the always-rendered empty slot used to replace it); the billboard also shows an image placed in its slot alone.
  • card and card-testimonial: an empty media slot no longer hides the media prop; a new testimonial without an image renders instead of failing validation.
  • badge and button: a gradient background chosen in the editor paints instead of being covered by the style's fill.
  • navbar: the phone menu no longer opens empty after the page is scrolled.
  • hero-blog renders without an image, as its schema allows.
  • media: width and height reach canvas:image only when known, so an SVG saved before its dimensions were read no longer fails validation.
  • Min and max height no longer offer the width sizes (xs to 7xl, prose), which had no height class; the tablet, laptop and desktop values are scoped to their breakpoint.
  • Component stylesheets declare the layer order; navbar and hero-blog no longer sit below Tailwind's reset.

Deprecated

  • Roadmap and Roadmap Step, in favour of Timeline. Both still ship and existing content is untouched; they will be removed in a later major release.

Upgrading from 1.0.0-beta1

  1. Back up the database and public files, and record drush cs-sync --dry-run and drush cs:cv.
  2. Update both projects: composer require 'drupal/canvas_studio:^1.0.0-beta2' 'drupal/canvas_studio_tailwind:^1.0.0-beta2' -W, then drush updatedb -y and drush cr.
  3. Run the upgrade script, dry run first:
    CS_DRY_RUN=1 drush php:script modules/contrib/canvas_studio_tailwind/scripts/upgrade-to-beta2.php
    drush php:script modules/contrib/canvas_studio_tailwind/scripts/upgrade-to-beta2.php

    It lists every block involved, grouped by page, with a link that opens it in the editor, then asks before writing (-y for unattended deploys). It is safe to run twice and must run once per environment. It:

    • clears min and max height values that used the width sizes (they never did anything);
    • removes optional links that are not URLs or paths (such as the literal No URL), which would otherwise stop the component rendering, and lists required ones to fix by hand;
    • keeps backgrounds looking as in beta1: a gradient hidden under an image is switched off, and overlays are switched off unless your theme already painted .bg-overlay (CS_OVERLAYS=keep|off overrides);
    • switches a stored gradient on a badge or a button to none, since no earlier release painted it;
    • lists, without changing them, the blocks beta2 changes on its own (linked sections and groups becoming clickable, per-breakpoint text sizes winning).

    Values it turns off stay stored, so an editor can turn them back on.

  4. Rebuild the theme's Tailwind CSS (npm run build) and commit the compiled CSS. Without it the new controls appear and have no effect. The README describes the recommended wiring (two symlinks into the theme plus @source; do not @import component stylesheets).
  5. Sync: drush cs-sync, drush cs:cv, drush cs:doctor; the skip and error counts should match your baseline.
  6. Export and commit the configuration with the code change.
  7. Check custom CSS that overrides these components: components no longer outrank theme utilities, and a radius chosen in the editor no longer carries !important. Wrap your own component CSS in @layer components with the order statement if needed.

Other environments: drush cs:ci, drush deploy, the upgrade script with -y, drush cs-sync, drush cs:cv.

From a 1.0.x development snapshot: the script detects a snapshot that already painted backgrounds and block links like beta2 and leaves them alone; it still clears invalid heights and links and fixes badge and button gradients. CS_FROM=beta1 or CS_FROM=dev overrides the detection.

Compatibility

  • Requires drupal/canvas_studio 1.0.0-beta2. Drupal 11, Drupal Canvas ^1.9; verified on Canvas 1.10.1 and 1.12.0, upgrade rehearsed on Canvas 1.9.0.
  • Needs a Tailwind-built theme that scans this library and an extension declaring the phosphor icon pack (Mercury, Byte or a theme from the same starterkit). On Drupal 11.4, html_cva() comes from core; on older 11.x minors a theme such as Byte provides it through the cva module.
Created by: hodba
Created on: 8 Nov 2026 at 15:11 UTC
Last updated: 8 Nov 2026 at 15:11 UTC
Bug fixes
New features

Other releases