bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23383: [PATCH] Support completion of color functions in CSS mode


From: Etienne Prud'homme
Subject: bug#23383: [PATCH] Support completion of color functions in CSS mode
Date: Fri, 20 May 2016 15:37:28 -0400

I've attached the current patch.

> - I think we should stick to the current CSS Color Module Level 3
>   recommendation [1]. The functions apart from `rgb()', `rgba()',
>   `hsl()', and `hsla()' are only present in an Editor's Draft. I find
> no other resources about them, so I don't think we should include them
>   until the new spec becomes at least a Candidate Recommendation.
Thanks. I didn't realize the high probability most of them won't be in
the recommendation

> - I think there's little use in completing `#' since it's only one
>   character.

I was also thinking the same thing. I interpreted: "and so
on, then `hex-color'" too literally.

> - `namedColor' must be changed to `named-color' to match the name of
> the value class.
Thanks for pointing that out.

> - The new color names need to be double-checked. For instance I see
> that `limegreen' has become `limeg een' and `salmon' has become `sa
> mon'.
I made the list with a macro. I was too tired to double check 140
colors. The current list was generated from Dough Crockford's color
list [1] using:

| var list = "";
| for(var i=0, len=colors.length; i<len; i++)
|     list += '"' + colors[i] + '" ';

`colors` needs to be extracted from the Immediately-invoked function
expression [2].

> - The test `css-test-property-values' in
>   test/lisp/textmodes/css-mode-tests.el needs a small update.

I updated the list length to 147 since there's 141
namedColors and 6 values in color. However, I can't make the test
execute since my Git repository is broken and the remote doesn't work
as of now.

Thanks for your patience.

[1] http://www.crockford.com/wrrrld/color.html
[2] https://en.wikipedia.org/wiki/IIFE

Etienne

Attachment: 0001-Add-completion-of-colors-in-CSS-mode.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]