Board index Themes Request: Theme config item type ="colorpicker"??

Skinning and designing Serendipity (CSS, HTML, Smarty)
User avatar
Don Chambers
Regular
 
Posts: 3576
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA

Postby Don Chambers » Thu Mar 03, 2016 7:59 pm

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?

User avatar
onli
Regular
 
Posts: 2072
Joined: Tue Sep 09, 2008 10:04 pm

Postby onli » Thu Mar 03, 2016 8:03 pm

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.

User avatar
Don Chambers
Regular
 
Posts: 3576
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA

Postby Don Chambers » Thu Mar 03, 2016 8:47 pm

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.

Previous


Return to Themes

Who is online

Users browsing this forum: No registered users and 1 guest