Make WordPress Core

Opened 13 years ago

Closed 8 years ago

#21059 closed enhancement (worksforme)

Customizer color picker has no remove button

Reported by: kcssm's profile kcssm Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: Customize Keywords:
Focuses: Cc:

Description

There is no remove button for color picker in the customizer. It would be great if we could remove the color or set it to the default if we don't need the color.

Change History (16)

#1 @SergeyBiryukov
13 years ago

  • Component changed from General to Appearance
  • Type changed from defect (bug) to enhancement

#2 @greenshady
12 years ago

  • Cc justin@… added

I could definitely use this. I just built a random background script that integrates with the 'custom-background' theme feature only to realize that the user will be forever stuck with their custom background color once they select one.

#4 @helenyhou
12 years ago

Is this still relevant? There's a "Default" button now.

#5 follow-up: @justnorris
12 years ago

  • Cc justnorris added

There is a "clear" button right now (3.5 & 3.6 Beta) when using

'default' => null,
'sanitize_callback' => 'sanitize_hex_color',

Clicking the "Clear" and saving does nothing, the user is still not able to change the color, even though a way to "clear" exists. This means that I must to specify the colors in PHP and CSS, which is not ideal.

Last edited 12 years ago by justnorris (previous) (diff)

#6 @aniketpant
12 years ago

  • Cc me@… added

I am not sure what you mean by the "clear" button. And if a button actually clears a color, what should it change to- transparent? Removing the color doesn't make sense.

The default button is available now which solves one part of your suggestion.

#7 @corradomatt
12 years ago

It would be nice to have the option to choose transparent or clear the color choice to transparent.

For some designs which use sections that are overlapped or nested, a transparent option is necessary if the user doesn't want a color to appear in the background on a particular element.

For example, with a menu bar in the header...the menu bar could have it's own unique color or (if the user chooses clear/transparent) the menu bar now becomes one with the color of the header block - essentially taking on the color of the header.

#9 @tskk
10 years ago

Hello,

Suppose I am using color control for customizing link color, I select a color and save the settings, I get this color on front end with get_theme_mod. Now if I want to undo it, I click clear and I see "false" and save the settings. I still get the old color I selected earlier via get_theme_mod, it is not deleting the previous saved color.

This ticket was mentioned in Slack in #themereview by poena. View the logs.


10 years ago

#11 @johnjamesjacoby
10 years ago

I would like to see this come back as adding native rgba() support.

RGBA support would provide opacity/transparency without the need for added UI in the customizer itself.

I imagine this either as a replacement to or extension of WP_Customize_Color_Control.

Related: #19100, #27583.

#12 @johnjamesjacoby
10 years ago

I'm imagining something like this, though obviously less bootstrappy for core:

http://mjolnic.com/bootstrap-colorpicker/

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


8 years ago

#14 in reply to: ↑ 5 @westonruter
8 years ago

Replying to justnorris:

There is a "clear" button right now (3.5 & 3.6 Beta) when using

'default' => null,
'sanitize_callback' => 'sanitize_hex_color',

Clicking the "Clear" and saving does nothing, the user is still not able to change the color, even though a way to "clear" exists. This means that I must to specify the colors in PHP and CSS, which is not ideal.

This could be because a null value is interpreted in the customizer as meaning it is invalid.

#15 @melchoyce
8 years ago

@johnjamesjacoby Created #39681 to address RGBA support.

#16 @melchoyce
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Looks like this was addressed some time in the past.

Note: See TracTickets for help on using tickets.