Allow transparent as a valid value for background-color

Created on 27 February 2025, about 2 months ago

Problem
The Artisan module currently only allows background colors to be defined using standard color formats (HEX, RGB, HSL).
However, it does not allow background-color: transparent, which is a useful option when creating overlays, transparent sections, or custom UI elements.

Solution Implemented

  • Updated getDefaultDefinition() in ArtisanCustomizations.php to accept "transparent" as a valid background color value.
  • Modified getAttachmentStyles() to handle transparent
  • Ensured that transparent can be saved in the UI and reflected in the generated CSS.

Testing Conducted
Transparent background setting

  • Tested entering "transparent" in the background-color field within the UI.
  • Verified that --theme-background-color: transparent; was generated correctly in the CSS.
  • Ensured the transparent background rendered correctly on the frontend without affecting other styles.
Feature request
Status

Needs review

Version

1.3

Component

Code

Created by

🇪🇸Spain msark

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024