?
Referenced as Pull Request for: # 7602
avatar N6REJ
N6REJ
10 Jul 2015

While being able to set the default color to "" to equate to "inherit" is fantastic, there is no option to allow for "transparent" nor "none".
These are both common color options for backgrounds and borders.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar N6REJ N6REJ - open - 10 Jul 2015
avatar brianteeman
brianteeman - comment - 10 Jul 2015

Sorry I havent got a clue where or what you are talking about


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7401.

avatar infograf768
infograf768 - comment - 10 Jul 2015

I guess one needs to use #0000ffff to get transparent colour. But the colour field only lets paste 6 figures.

avatar brianteeman
brianteeman - comment - 10 Jul 2015

8 digit hex representations of colour to include transparency is not a standard yet and part of the draft css-color 4 proposal.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7401.

avatar N6REJ
N6REJ - comment - 10 Jul 2015

@brianteeman what part don't you understand? There is no method to currently select a color of "inherit" or "none"
both of which are useful and frequently used.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7401.

avatar N6REJ
N6REJ - comment - 10 Jul 2015

sorry, meant, "transparent" and "none"


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7401.

avatar brianteeman
brianteeman - comment - 10 Jul 2015

Where are you referring to

On 10 July 2015 at 19:21, Bear notifications@github.com wrote:

sorry, meant, "transparent" and "none"

This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at issues.joomla.org/joomla-cms/7401
http://issues.joomla.org/tracker/joomla-cms/7401.


Reply to this email directly or view it on GitHub
#7401 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar mbabker
mbabker - comment - 10 Jul 2015

There's a color form field type (no idea if core uses it, maybe in the template style params).

avatar Bakual
Bakual - comment - 10 Jul 2015

The color field is for example used in the Protostar style. The color picker you see there uses it.

avatar brianteeman
brianteeman - comment - 10 Jul 2015

Just to be clear then are you meaning that you want a color picker like this one for this field
http://mjolnic.com/bootstrap-colorpicker/

avatar mbabker
mbabker - comment - 10 Jul 2015

He wants to be able to save the value as "transparent" or "none", not just a hex color code.

avatar Bakual
Bakual - comment - 10 Jul 2015

I'm not sure how much sense a "none" makes. It's not a valid value for a color. You can either set it to a color, transparent, inherit or initial.

avatar pepperstreet
pepperstreet - comment - 20 Jul 2015

+1 for "transparent" and Brian's BS color picker example script.

avatar JoomliC
JoomliC - comment - 20 Jul 2015

We don't need to use another colorpicker script as the one used in Joomla! already have options. ;-)
After a long look at code, i've found a few issues to be fixed, and some improvement possible. I propose to work on a PR to allow transparency and rgba (and in the same time, to update the outdated docs about this input type ;-) )

avatar brianteeman
brianteeman - comment - 20 Jul 2015

Cool

avatar nternetinspired
nternetinspired - comment - 27 Jul 2015

What's the use case for setting a background colour of none or transparent? I can't see why you would want to do this.

avatar N6REJ
N6REJ - comment - 27 Jul 2015

I guess I can understand not having "none' sense its not a valid statement but i'm not sure how else you can "turn off" a background-color that is preset by some other .css statement. The fact that they made a distinction between "initial" and "transparent" leads me to believe the 2 are not the same.
I agree we don't need another script was never my intent, we need the ability to be able to have other then fixed codes. Since there are only 4 supported states, I would be estactic if we could get there.
Property Values
Value Description Play it
color Specifies the background color. Look at CSS Color Values for a complete list of possible color values. Play it »
transparent Specifies that the background color should be transparent. This is default Play it »
initial Sets this property to its default value. Read about initial Play it »
inherit Inherits this property from its parent element. Read about inherit

avatar JoomliC
JoomliC - comment - 27 Jul 2015

@nternetinspired Why? Why not! ;-)

In 2/3 days, my PR will be ready.
I will comment this one with more info (and will update the Joomla! Docs™).
In a few words :

  • fix broken control simple (introduced by @nonumber here : #807 and almost broken due to changes in chosen.js and since release 3.2.3)
  • add RTL support for color picker
  • keep the same behavior when use of attribute validate="color" (Hex color only)
  • when not use of validate="color", will allow opacity picker (rgba) as well as valid css keywords for color, background-color, border-color (transparent, initial, inherit)

All this with a few minor changes added to the current color picker script, color input file, and behavior file.
I think it is a valid request to ask to be able to use valid keywords for colors as accepted and validated by W3C :+1:

avatar nternetinspired
nternetinspired - comment - 28 Jul 2015

Why not? Because Joomla is dying from the bloat of useless options that have been added because someone thought it would be a good idea to have more options.

I understand that these are valid colour keywords, as I understand css, but my unanswered question was how would you possibly use such an option?

Can anyone provide a single example of how and why you would actually use this option?

Set rgba values? Yes, of course, that makes sense. Initial, transparent and inherit may well be valid colour keywords but that doesn't mean it makes any sense to use them.

avatar nternetinspired
nternetinspired - comment - 28 Jul 2015

Incidentally, html5 has a native colour input (see shot) and whilst it does allow colour keywords as specced by the W3C (http://www.w3.org/wiki/CSS/Properties/color/keywords), including system colours, it does not allow you to use transparent, initial or inherit. Why? Because it makes no sense whatsoever.

screen shot 2015-07-28 at 09 13 56

Radical I know, but wouldn't it make more sense to use html5's native colour picker?

avatar Bakual
Bakual - comment - 28 Jul 2015

My guess would be you have a color setting in the template you donwloaded. But you don't need it, you want it to have no special color, just the one from the parent element. Currently you would have to select the same color manually. With this change you could select inherit. Or if you want to have it set to browser default instead, you use initial. It is situational for sure.

Imho, it depends on the UI. If the UI doesn't get bloated by adding these options, then I don't see an issue.

Radical I know, but wouldn't it make more sense to use html5's native colour picker?

Depends on browser support, I guess.

avatar Bakual
Bakual - comment - 28 Jul 2015

http://caniuse.com/#feat=input-color doesn't look very good :smile:

avatar nternetinspired
nternetinspired - comment - 28 Jul 2015

http://caniuse.com/#feat=input-color doesn't look very good :smile:

No, so it would need a fallback for sure. But we're talking about the ability to set colour values that go beyond what html5 will allow and colour values that aren't colour keywords. And all of this on the basis of ‘because it could be cool’ and without any clear use case.

With all due respect @Bakual the use case you outlined is pretty tenuous at best. You want a template background colour the same as the parent html or body element? Set it to #fff;

avatar Bakual
Bakual - comment - 28 Jul 2015

With all due respect @Bakual the use case you outlined is pretty tenuous at best. You want a template background colour the same as the parent html or body element? Set it to #fff;

It's not necessary a background color and not every parent HTML element is white. And some templates really have a lot of color options, not only the template background. That's where I could see a use case.
Didn't say it's a very important one, just what I could imagine.

avatar nternetinspired
nternetinspired - comment - 28 Jul 2015

Yes, @infograf768 do you see initial or inherit. While transparent and currentColor are valid how could they conceivably be used in this context?

It's not necessary a background color and not every parent HTML element is white. And some templates really have a lot of color options, not only the template background. That's where I could see a use case.

In that case simply not setting a colour is the answer, no?

avatar nternetinspired
nternetinspired - comment - 28 Jul 2015

I'm obviously the only one who thinks adding more practically useless options is a not a good idea, so I'll not comment any further here.

I hope everyone will enjoy the freedom these new options provide.

avatar Bakual
Bakual - comment - 28 Jul 2015

In that case simply not setting a colour is the answer, no?

If the color is an option in a template style (or anywhere else in Joomla), then exactly that is not an option. You can't "not set it". hence the request to have inherit which does exactly that :)

avatar JoomliC
JoomliC - comment - 28 Jul 2015
I'm obviously the only one who thinks adding more practically useless options is a not a good idea, so I'll not comment any further here. I hope everyone will enjoy the freedom these new options provide.

It's not about adding options, it's about improvement of an existing option.

Today (when validate="color" is not set) if you don't want a color to be set, you have to enter a space " " to be able to have no color (and unfortunatly, only if no color is set by default).
This is the case in many extensions (not only templates).

If you don't need those keywords, it's not an issue. And this should not prevent other users who need it to be able to use it (all is about valid W3C, and improvement of the current field input type color).

With respect, Joomla CMS is meant to be open to all users, not only one ego vision...

avatar brianteeman
brianteeman - comment - 28 Jul 2015

Please remember that this field can be used in many places to select
"colour" and while it might not make sense as a background in the template
it certainly makes sense when the field is used elsewhere.

On 28 July 2015 at 11:55, Cyril Rezé notifications@github.com wrote:

I'm obviously the only one who thinks adding more practically useless
options is a not a good idea, so I'll not comment any further here.
I hope everyone will enjoy the freedom these new options provide.

It's not about adding options, it's about improvement of an existing
option.

Today (when validate="color" is not set) if you don't want a color to be
set, you have to enter a space " " to be able to have no color (and
unfortunatly, only if no color is set by default).
This is the case in many extensions (not only templates).

If you don't need those keywords, it's not an issue. And this should not
prevent other users who need it to be able to use it (all is about valid
W3C, and improvement of the current field input type color).

With respect, Joomla CMS is meant to be open to all users, not only one
ego vision...


Reply to this email directly or view it on GitHub
#7401 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar mbabker
mbabker - comment - 28 Jul 2015

I understand that these are valid colour keywords, as I understand css, but my unanswered question was how would you possibly use such an option?

Haven't looked through all posts after this comment from @nternetinspired yet, but one thing to keep in mind is that the discussion is to add the features to the generic color form field. Developers may implement the data captured in this field in cases where these extra options may make sense, while at the same time adding them may make no sense for some implementations (like the background color of the admin template).

avatar JoomliC
JoomliC - comment - 31 Jul 2015

A PR is now open for this ;-)
Link: #7602


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7401.

avatar N6REJ
N6REJ - comment - 1 Aug 2015

if a template, for example, has a menu hover border set to say "red" exactly how can i UNSET it so that tis not red. Perhaps I need it to NOT exist. like you said I'd have to select the matching color in its parent, but if the parent is a gradient then that not possible using the color picker. With the keywords it is. And don't tell me you can't use a gradient in a border :P you can, I can see lots of places where colors are preset by some other extension and you'd just rather have them be the "default" color.
@JoomliC ty for the pr.

avatar brianteeman
brianteeman - comment - 1 Aug 2015

Closed as we have a PR #7602


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7401.

avatar brianteeman brianteeman - close - 1 Aug 2015
avatar brianteeman brianteeman - change - 1 Aug 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-08-01 13:12:37
Closed_By brianteeman
avatar brianteeman brianteeman - close - 1 Aug 2015
avatar JoomliC
JoomliC - comment - 29 Apr 2016

@N6REJ Official PR is now here #10129, with an official updated version of jquery.minicolors.js ;-)

avatar vectorselector
vectorselector - comment - 6 Jun 2018

@nternetinspired I have nothing to do with your project, and don't use Joomla.
the usecase for 'transparent' or 'none' is quite simple and common.

Text 'spans' could have an optional contrasting (with regards to 'color') background color or NO BACKGROUND color, thus not looking silly over images, for example.

'none' works in some browsers. 'transparent' is the standard, and it is in the standard, right next to the parts about 7 characters starting with #

avatar nternetinspired
nternetinspired - comment - 7 Jun 2018

@vectorselector This issue was closed 3 years ago. That aside, I don't understand your use-case example. A span has no initial background color value, so why would you need to turn it off or make it transparent? I'm not arguing against the validity of color keywords…

Add a Comment

Login with GitHub to post a comment