Install

Works with Drupal: ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 65.81 KB
MD5: ea8446562a061536dae46288491d05f2
SHA-1: 8ed1fdb29c5449368e48cf7aeba2e327e681306b
SHA-256: 62321d7aae56bd8a11ae6e1e60be9f83fc5a16f46a6462ebba642df31ed38e94
Download zip 103.86 KB
MD5: 7d3255916f73afe6993c1cadcc199afb
SHA-1: 3f6848f0a50f1f484cac7fcd8abb8cb144caefbd
SHA-256: eb24352304878053a7d8c66b6fbafe97a9e972e1f3291858c0f5ae7ac93d0e49

Release notes

First public release of Canvas Styles. Feature-complete and tested; published as a beta while it gets exercised against real Canvas-built sites. Feedback and bug reports through the issue queue are welcome.

What's in this release

  • Site-builder UI for editing every Canvas CSS design token (colors, typography, spacing, shadows, opacity, line height, and more) at /admin/appearance/canvas-styles.
  • Live preview swatch next to every field, with the right widget type chosen automatically from the token name and current value.
  • Hand-authored CSS in Canvas's Global CSS tab is preserved byte-for-byte. Edits replace only the value bytes of each declaration.
  • Add new tokens through the form. New tokens appear in the matching category and are editable from then on like any other.
  • Clearing a hand-authored token never deletes it. The form preserves the declaration and warns the editor instead.
  • Uninstall is non-destructive. Tokens added through the form are preserved as a plain :root { } block.
  • Token name allowlist and value-object validation block url(), @import, javascript:, and similar smuggling vectors before they reach the config entity.

Requirements

  • Drupal core 11.x
  • Drupal Canvas 1.2 or later (enabled)
  • PHP 8.3 or later

Install

composer require drupal/canvas_styles:^1.0@beta
drush en canvas_styles

Grant the administer canvas styles permission to roles that should be able to change token values, then visit Admin › Appearance › Canvas Styles.

Created by: samnagle
Created on: 1 May 2026 at 00:58 UTC
Last updated: 1 May 2026 at 00:58 UTC
New features

Other releases