unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23383: [PATCH] Support completion of color functions in CSS mode
@ 2016-04-26 22:48 Etienne Prud'homme
  2016-04-27 19:16 ` Simen Heggestøyl
  0 siblings, 1 reply; 8+ messages in thread
From: Etienne Prud'homme @ 2016-04-26 22:48 UTC (permalink / raw)
  To: 23383

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

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

As a sidenote, how should we handle functions? Since they use
parentheses, the point is going to be outside of parentheses.

Eg.
rgba()*
      ^(point)

Also, should we include the parameters number?

[-- Attachment #2: 0001-Add-completion-of-color-functions-in-CSS-mode.patch --]
[-- Type: text/x-patch, Size: 1202 bytes --]

From 52cc18080206fcd0d154a6c75c458a39bdcdfcbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Etienne=20Prud=E2=80=99homme?= <e.e.f.prudhomme@gmail.com>
Date: Tue, 26 Apr 2016 18:44:08 -0400
Subject: [PATCH] Add completion of color functions in CSS mode

* lisp/textmodes/css-mode.el (css-value-class-alist): Add CSS color
  functions as candidates for color values.
---
 lisp/textmodes/css-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index e30fb3e..78d4736 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -463,7 +463,8 @@ further value candidates, since that list would be infinite.")
     (color
      "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon"
      "navy" "olive" "orange" "purple" "red" "silver" "teal" "white"
-     "yellow" "transparent")
+     "yellow" "transparent" color-functions)
+    (color-functions "color-mod()" "device-cmyk()" "gray()" "hsl()" "hsla()" "hwb()" "rgb()" "rgba()")
     (common-lig-values "common-ligatures" "no-common-ligatures")
     (contextual-alt-values "contextual" "no-contextual")
     (counter "counter()" "counters()")
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-22 11:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 22:48 bug#23383: [PATCH] Support completion of color functions in CSS mode Etienne Prud'homme
2016-04-27 19:16 ` Simen Heggestøyl
2016-04-28  0:17   ` Etienne Prud'homme
2016-04-28 17:51     ` Simen Heggestøyl
2016-05-20 19:37       ` Etienne Prud'homme
2016-05-21 10:42         ` Simen Heggestøyl
2016-05-21 22:43           ` Etienne Prud'homme
2016-05-22 11:03             ` Simen Heggestøyl

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).