Skip to content
Snippets Groups Projects

allow 3-character hexadecimal color inputs

Open Andy Blum requested to merge issue/drupal-3396018:3396018-allow-three-character into 11.x
1 unresolved thread

Closes #3396018

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Wim Leers
    Wim Leers @wimleers started a thread on the diff
  • 107 108 '#maxlength' => 7,
    108 109 '#size' => 10,
    109 110 '#title' => t($title),
    110 '#description' => t('Enter color in full hexadecimal format (#abc123).') . '<br/>' . t('Derivatives will be formed from this color.'),
    111 '#description' => t('Enter color in hexadecimal format (#abc123).') . '<br/>' . t('Derivatives will be formed from this color.'),
    111 112 '#default_value' => theme_get_setting($key),
    112 113 '#attributes' => [
    113 'pattern' => '^#[a-fA-F0-9]{6}',
    114 // Regex copied from Color::validateHex()
    115 'pattern' => '^[#]?([0-9a-fA-F]{3}){1,2}$',
  • Andy Blum added 1 commit

    added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading