Request: Theme config item type ="colorpicker"??

Skinning and designing Serendipity (CSS, HTML, Smarty)
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Request: Theme config item type ="colorpicker"??

Post by Don Chambers »

I know there are mixed feelings on whether or not this is a useful theme option. I have not decided that issue either, but I am happy we are exploring the possibility.

Yes, if we are going to have something like this, there needs to be a way select "none"... which could quite possible be a default value of "" (nothing/blank).

Forget about colorsets for a moment. Allow me to use 2k11 as an example.

In that theme, links have the following value:

Code: Select all

a, a:active, a:visited {
    color: #3e5f81;
}
Lets assume that a theme author wanted to give the user the opportunity to change that link color with a theme option:

Code: Select all

    array(
      'var'           => 'link2k11color',
      'name'          => 'Link Color',
      'type'          => 'color',
      'default'        => '',
    ),
In the tpl (unless there is a way to inject this directly into serendipity.css, which there probably is) - there has to be a condition that determines if this value is set to something, and if so, to then emit the appropriate css to override style.css.

But if it has been set to something other than what was in the stylesheet, the author/user/admin should be able to return to theme config, and unset that value, returning the link color to whatever is defined by style.css

And NO - I do not think this option needs to read the value of a specific style declaration from the theme's stylesheet (just in case anyone was thinking that). :wink:

One other thing I just noticed, there does not appear a way to set a specific color hex value in the browsers I am using... is it just a windows thing?
=Don=
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Request: Theme config item type ="colorpicker"??

Post by onli »

But if it has been set to something other than what was in the stylesheet, the author/user/admin should be able to return to theme config, and unset that value, returning the link color to whatever is defined by style.css
Don't you think that to have a square right next to the colorpicker with that default color would be enough for that case?
One other thing I just noticed, there does not appear a way to set a specific color hex value in the browsers I am using... is it just a windows thing?
For me, in FF, the colordialog that opens has the option to enter color codes. That will depend on your browser and possibly your OS, yes.
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Request: Theme config item type ="colorpicker"??

Post by Don Chambers »

onli wrote:Don't you think that to have a square right next to the colorpicker with that default color would be enough for that case?
There would likely be a conditional test, ie {if $template_option.linkcolor}stuff happens{/if}. So how do you provide a way to set the color value option to "nothing" so that "stuff doesn't happen"?
One other thing I just noticed, there does not appear a way to set a specific color hex value in the browsers I am using... is it just a windows thing?
For me, in FF, the colordialog that opens has the option to enter color codes. That will depend on your browser and possibly your OS, yes.[/quote]

In my browsers, hex isn't an option.... rgb is an option, as is hsl - but not hex.
=Don=
Post Reply