Color picker option

Created on 2 September 2023, 10 months ago
Updated 28 June 2024, about 3 hours 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

🇮🇳India 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 10 months ago
    15 pass
  • 🇮🇳India Sharique

    Uploading correct patch file.

  • Assigned to pdureau
  • Status changed to Needs work 9 months 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.

  • 🇮🇳India 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 about 3 hours ago
  • 🇫🇷France pdureau Paris
Production build 0.69.0 2024