Color picker option

Created on 2 September 2023, over 1 year ago
Updated 28 June 2024, 9 months ago

Problem/Motivation

There are times, when content editor want to select the color for layout or the region, and predefined color in the theme are not enough.

Proposed resolution

I've implemented a simple color picker option, using html5 color input field.

Feature request
Status

Postponed

Version

1.0

Component

Code

Created by

🇩🇪Germany sharique

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

Comments & Activities

  • Issue created by @sharique
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    15 pass
  • 🇩🇪Germany sharique

    Uploading correct patch file.

  • Assigned to pdureau
  • Status changed to Needs work over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷
    +++ b/src/Plugin/LayoutOption/StyleAttributeColor.php
    @@ -0,0 +1,94 @@
    +    return $this->processAttributeOptionBuild('style', $regions, $build, $region, $style);
    

    The problem with setting the "style" attribute is that it does not allow other plugin to act on it. processAttributeOptionBuild() would have to be updated to concatenate potential other options.

    Also I am not sure this is something we want to handle, that's why I am assigning to @pdureau. Theorically in design systems, we want to set CSS classes that then apply the CSS properties.

  • 🇩🇪Germany sharique

    There is are still a tricky things to handle beside, in HTML5 color input there is no way to unset the value, and default value is black.
    One more thing I want to do is to be able to add opacity for the color option,

  • Issue was unassigned.
  • Status changed to Postponed 9 months ago
Production build 0.71.5 2024