GNU bug report logs - #23383
[PATCH] Support completion of color functions in CSS mode

Previous Next

Package: emacs;

Reported by: Etienne Prud'homme <e.e.f.prudhomme <at> gmail.com>

Date: Tue, 26 Apr 2016 22:50:01 UTC

Severity: wishlist

Tags: patch

Merged with 23384

Done: Simen Heggestøyl <simenheg <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #21 received at 23383 <at> debbugs.gnu.org (full text, mbox):

From: Etienne Prud'homme <e.e.f.prudhomme <at> gmail.com>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: 23383 <at> debbugs.gnu.org
Subject: Re: bug#23383: [PATCH] Support completion of color functions in CSS
 mode
Date: Fri, 20 May 2016 15:37:28 -0400
[Message part 1 (text/plain, inline)]
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
[0001-Add-completion-of-colors-in-CSS-mode.patch (text/x-patch, attachment)]

This bug report was last modified 9 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.