Install
Works with Drupal: ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Canvas Studio Tailwind 1.0.0-beta1 is the first public beta of the Tailwind framework bundle: the token-to-class mappings and the canvas_studio_components SDC library. Release it together with Canvas Studio 1.0.0-beta1.
Requirements: Drupal core ^11, canvas_studio:canvas_studio_props, PHP 8.3+.
Security
- Every free-text link property (url, href, cite_url, author_url) is passed through sanitize_url() across the link-bearing components (button, heading, image, card-logo, card-icon, card-testimonial, badge, blockquote, icon-link, hero-blog). Stored javascript: and data: URLs are neutralized; legitimate URLs render byte-identical.
Accessibility and i18n
- The stretched-link overlay on section and group always carries an accessible name (the author's aria-label, or a translatable "Read more" fallback), resolving the nameless-link failure (WCAG 2.4.4 and 4.1.2).
- The hero-blog byline label is translatable.
Fixed
- Sizing eligibility: the responsive min_width and min_height props gained the inherit option, so their inherit example validates and Canvas no longer auto-disables every component that carries the sizing bundle.
- A prop-panel audit fixed a class of bug where a bundle utility competed with a component-baked utility of equal specificity and lost by CSS source order:
- Transition timing maps to no class (timing is now emitted inline); in particular "none" no longer emits transition-none, which had disabled every transition on the element. hover_scale and hover_opacity now animate at the default duration.
- Border radius uses Tailwind important variants (rounded-*!) so a chosen radius wins over a component-baked rounded class. Previously the control was non-functional on card, card-pricing, card-testimonial, carousel, hero-side-by-side, and video.
- Box shadow "none" maps to no class instead of shadow-none, so it cannot strip a component-baked shadow.
- Position offsets default inset, top, end, bottom, and start to "auto" instead of "0", so position: absolute no longer stretches a component to fill its parent.
Upgrading to 1.0.0-beta1
This upgrade is render-neutral; no stored data is lost. The data migrations only rename moved keys and are idempotent (safe to re-run; they report 0 when there is nothing to migrate). Back up your database first, and do not drush config:import Canvas versioned config across environments (use drush cs-sync to reconcile instead).
- Update the code:
composer update drupal/canvas_studio drupal/canvas_studio_tailwind(ensure drupal/canvas is ^1.9). - Database updates:
drush updatedb -ythendrush cr(enables the default prop-UI skin). - Reconcile component versions:
drush cs-syncthendrush cs:cv(must report no orphaned version references) thendrush cr. - Data migrations (idempotent):
- Card url to link.url, audit first with no writes:
CS_DRY_RUN=1 drush php:script web/modules/contrib/canvas_studio_tailwind/scripts/migrate-card-url-to-link.php. If the reported count is greater than 0, run the same command without CS_DRY_RUN to apply it. Only the base card is touched. - Responsive scalar renames:
drush php:script web/modules/contrib/canvas_studio_tailwind/scripts/migrate-sizing-height-responsive.phpanddrush php:script web/modules/contrib/canvas_studio_tailwind/scripts/migrate-text-align-responsive.php. - Then reconcile once more:
drush cs-sync,drush cs:cv,drush cr.
- Card url to link.url, audit first with no writes:
- Rebuild the theme's Tailwind CSS (required): the border-radius fix uses important variants (rounded-*!). Run your theme build (for example
npm ci && npm run build) so the variants are generated, and commit the rebuilt CSS. Otherwise the border-radius control has no effect. - Verify: confirm no Tailwind components are disabled (this release fixes the auto-disable bug),
drush cs:audit --allreports 0 critical, anddrush cs:cvis clean. An INFO-level neg-offset-inert line from cs:audit is harmless.
All prop-system fixes are render-neutral for existing content; no data migration is required for those. Rollback is a database restore from your pre-upgrade backup.
Note: this is a beta. APIs may still change before 1.0.0, and only stable releases are covered by Drupal's security advisory policy.