brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Some Colors Are Repeated #9423

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by PlanetVaster Wednesday Mar 04, 2015 at 20:33 GMT Originally opened as https://github.com/adobe/brackets/issues/10693


In the dropdown colors list that appears when you type "color:" in a css file some colors such as darkslategrey, darkgrey, and dimgrey appear more than once in the list. dimgrey darkgrey darkslategrey

core-ai-bot commented 3 years ago

Comment by PlanetVaster Wednesday Mar 04, 2015 at 20:45 GMT


Ah i see its gray and grey but still shouldn't there only be one since it's the same color?

core-ai-bot commented 3 years ago

Comment by MarcelGerber Wednesday Mar 04, 2015 at 21:15 GMT


It's supposed to be like this as the CSS Spec defines both ...grey and ...gray. See also: http://www.w3.org/TR/css3-color/#dimgray

core-ai-bot commented 3 years ago

Comment by peterflynn Wednesday Mar 04, 2015 at 21:57 GMT


Yep, this is the expected behavior. I could imagine having a pref to exclude one variant or the other, but since there are only a few of these cases that complexity might be overkill.

It's also a little odd that darkgray/darkgrey aren't sorted right next to each other -- probably a quirk or bug of the StringMatch heuristics. Not sure that's worth keeping this bug open for either, though...

core-ai-bot commented 3 years ago

Comment by MarcelGerber Wednesday Mar 04, 2015 at 22:19 GMT


It's not a bug in StringMatch, they are actually simply sorted alphabetically, but darkgreen comes before darkgrey.

core-ai-bot commented 3 years ago

Comment by peterflynn Wednesday Mar 04, 2015 at 22:23 GMT


Ah, good point.

core-ai-bot commented 3 years ago

Comment by PlanetVaster Wednesday Mar 04, 2015 at 22:51 GMT


Ok

core-ai-bot commented 3 years ago

Comment by redmunds Thursday Mar 05, 2015 at 00:31 GMT


We could check locale and show the grey variations for the British English (en-gb) and gray variations for American English (root). :)

core-ai-bot commented 3 years ago

Comment by MarcelGerber Thursday Mar 05, 2015 at 20:38 GMT


I don't think it's worth the effort doing something fancy here.

core-ai-bot commented 3 years ago

Comment by PlanetVaster Thursday Mar 05, 2015 at 21:59 GMT


I think it is worth the effort to do something fancy I might try to fix it myself and then submit a PR

core-ai-bot commented 3 years ago

Comment by redmunds Thursday Mar 05, 2015 at 22:04 GMT


In case you missed it, I ended my comment with a smiley face (i.e. I was joking). There are many other languages other than what I mentioned.

@PlanetVaster You should discuss with the team what you are thinking about implementing before you put a lot of effort into it.

core-ai-bot commented 3 years ago

Comment by PlanetVaster Thursday Mar 05, 2015 at 22:10 GMT


@redmunds I'm not sure yet because I'm more of a newbie web developer, I'm Intermediate with Java and know bits and bobs of multiple languages. I know html and css pretty good but I'm still learning Javascript. I would love to hear other people's ideas on this. I'm gonna start a discussion with the brackets dev google group.

core-ai-bot commented 3 years ago

Comment by PlanetVaster Thursday Mar 05, 2015 at 22:16 GMT


Just started a discussion https://groups.google.com/forum/#!topic/brackets-dev/Z9F0wIauYxQ

core-ai-bot commented 3 years ago

Comment by peterflynn Thursday Mar 05, 2015 at 23:45 GMT


I still think doing anything here is probably overkill (does any other editor filter these?)...

But if we do anything I think it should be a preference, rather than something automatic based on locale. For example: if one developer in the UK is working with a team in the US, they probably want to standardize their CSS code on the US spelling, so it would be annoying if Brackets refused to hint that version unless the UK user changed their whole OS locale.

core-ai-bot commented 3 years ago

Comment by le717 Friday Mar 06, 2015 at 00:31 GMT


I've read this issue over multiple times since it was filed: I don't see an issue here. The color names are correctly sorted alphabetically, and attempting to "fix" this would require highly specific, edge-case code, not to mention an untold amount of updating if new named colors are created by the CSS Working Group that recreate this issue. So yea, IMO, this is a complete non-issue.

core-ai-bot commented 3 years ago

Comment by PlanetVaster Friday Mar 06, 2015 at 01:08 GMT


It's not an issue but still a bug in my opinion because it's spelled color in brackets not colour so it should either be gray or a preference, in fact we could make a feature where in preference (idk if there is preferences, but if there isn't then we could create one) there's an option to choose your language and there should be 2 english options one for U.S and one for British (U.K) that changes everything in brackets to that language. This is really annoying to me because i really got to pay attention to if its an e or an a in the gray, darkslategray, etc. colors as i'm from the U.S so i like to choose gray.

core-ai-bot commented 3 years ago

Comment by PlanetVaster Friday Mar 06, 2015 at 01:09 GMT


It's kinda a mix between a bug and a feature i guess

core-ai-bot commented 3 years ago

Comment by PlanetVaster Friday Mar 06, 2015 at 01:23 GMT


Also how many people know about: http://prime4commit.com/projects/153

core-ai-bot commented 3 years ago

Comment by mackenza Friday Mar 06, 2015 at 01:32 GMT


@PlanetVaster what instances of color or gray would you be changing with the preference? Certainly you aren't suggesting that it's in CSS or HTML that you would type a locale-specific entry like:

colour: grey;

??

core-ai-bot commented 3 years ago

Comment by equinox Friday Mar 06, 2015 at 01:49 GMT


For those of us that aren't Americans; it can certainly be a pain in the ass. I've many, many times put "colour" instead of color and it's taken me ages and ages to remember that I have to accommodate for it all being in American. It'd definitely be a nice feature, but probably not that important.

core-ai-bot commented 3 years ago

Comment by PlanetVaster Friday Mar 06, 2015 at 02:41 GMT


Yes it would be a minor feature but very nice to have, if anyone can figure out how to implement this please tell me.

core-ai-bot commented 3 years ago

Comment by peterflynn Friday Mar 06, 2015 at 06:18 GMT


@Equinoxdawg That's a very different ask: colour is not valid CSS, and Brackets should not get involved in changing the spelling to make invalid code valid.

On the other hand gray and grey are both valid CSS and part of the specification -- the question is whether Brackets code hints should pretend one of the two are not, for the sake of convenience. I'm still curious if any other code editor available today does this, though.

core-ai-bot commented 3 years ago

Comment by redmunds Friday Mar 06, 2015 at 17:19 GMT


@Equinoxdawg If this truly bothers you, the https://github.com/idiot/spiffing repo tried to address the issue by creating a css preprocessor, but I always thought that it was more of an attempt at humor than anything else.

core-ai-bot commented 3 years ago

Comment by PlanetVaster Friday Mar 06, 2015 at 20:07 GMT


@peterflynn Ah i just thought of an idea,i agree brackets should not make invalid css valid but if you type colour maybe it could have a red squiggly under it and when you hover over it it says "Did you mean color", And i have no idea if other code editors do this, but they should.

core-ai-bot commented 3 years ago

Comment by MarcelGerber Friday Mar 06, 2015 at 20:50 GMT


Actually, with CSS Code Hints, it shouldn't be much of an issue to remember it's color: image

core-ai-bot commented 3 years ago

Comment by PlanetVaster Friday Mar 06, 2015 at 21:29 GMT


Whateves i really don't care about that part as im from the u.s so i spell it color anyway but i still don't like that it lists gray and grey as it's the exact same thing just spelled different

core-ai-bot commented 3 years ago

Comment by le717 Friday Mar 06, 2015 at 21:39 GMT


@PlanetVaster Then you'll need to take it up with the W3C, WHATWG and CSS Working Group about how all standardized web development technology should be pro-America only, form a viral hashtag to rally all web devs to remove all non-American spellings and references from standardized web code, persuade non-American developers to support your America-only stance, and convince browser makers to immediately drop support for the other spellings without any regard to backward compatibility. :wink:

Otherwise, this is a FOL (Fact of Life) and nothing can or really should be done about it.

core-ai-bot commented 3 years ago

Comment by equinox Friday Mar 06, 2015 at 21:41 GMT


@redmunds I wouldn't say it bothers me, and like I said, it'd definitely be a nice feature - if done correctly, but definitely not crucial to anything or even worth doing.

core-ai-bot commented 3 years ago

Comment by PlanetVaster Friday Mar 06, 2015 at 21:48 GMT


@le717 I just want brackets to show gray if your american and grey if your british

core-ai-bot commented 3 years ago

Comment by peterflynn Friday Mar 06, 2015 at 23:02 GMT


@PlanetVaster For the red-underline thing, please upvote "Live" real-time linting as you type on our feature backlog.

core-ai-bot commented 3 years ago

Comment by carstenhag Friday Aug 07, 2015 at 15:07 GMT


Please don't fix this, stuff like this is feature creep. Further, i don't think many people still use these color names except maybe black and white.