[Top][All Lists]

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

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

From: Simen Heggestøyl
Subject: bug#23383: [PATCH] Support completion of color functions in CSS mode
Date: Wed, 27 Apr 2016 21:16:58 +0200

Hello Etienne, thanks for the patch.

On Wed, Apr 27, 2016 at 12:48 AM, Etienne Prud'homme <address@hidden> wrote:
The attached patch adds completion for CSS color functions such as `rgb()'. Values were taken from the “CSS Color Module Level 4”. It can be found at: https://drafts.csswg.org/css-color/#color-type

It will be nice to have completion for those new color functions. Some
feedback regarding the patch follows.

- In the completion definitions we've tried to stay as close as possible
  to the structure used in the CSS spec. This means that instead of
  introducing `color-functions' we should make `color' complete directly
  to "rgb()", "rgba()", and so on, then `hex-color', `named-color' and
  the literal `currentcolor' (I think we can skip
  `deprecated-system-color'). `named-color' will then contain the
  literal color names like `color' does now.

- One of the tests in test/lisp/textmodes/css-mode-tests.el needs
  updating. To see this, run `make lisp/textmodes/css-mode-tests' from
  the test directory.

- Please wrap lines around column 70 or so to stay in line with the rest
  of the file.

As a sidenote, how should we handle functions? Since they use parentheses, the point is going to be outside of parentheses. Eg. rgba()* ^(point)

True, I'm not sure how to best solve it.

Also, should we include the parameters number?

I think that's rather a job for something like ElDoc (I'm currently
working on adding ElDoc support to CSS mode).

-- Simen

reply via email to

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