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

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

bug#18578: [PATCH] Update the list of CSS pseudo classes


From: Łukasz Stelmach
Subject: bug#18578: [PATCH] Update the list of CSS pseudo classes
Date: Sun, 28 Sep 2014 21:59:19 +0200

The list of pseudo classes has been updated according to "Selectors
Level 3, W3C Recommendation 29 September 2011" as available at
http://www.w3.org/TR/selectors/. Page selectors are described at
http://www.w3.org/TR/2004/CR-css3-page-20040225/
---
Are these tests enough?

BTW there are at least one more bug reporting the same bug, that probably
could be merged with this one.

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18578
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4204
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10512

 lisp/textmodes/css-mode.el |  8 ++++++--
 test/indent/css-mode.css   | 12 ++++++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 1a07269..bfadb69 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -121,8 +121,12 @@
 ;;    (property . "^ +\\* '\\([^ '\n]+\\)',")))
 
 (defconst css-pseudo-ids
-  '("active" "after" "before" "first" "first-child" "first-letter" "first-line"
-    "focus" "hover" "lang" "left" "link" "right" "visited")
+  '("active" "after" "before" "checked" "disabled" "empty" "enabled"
+    "first" "first-child" "first-letter" "first-line" "first-of-type"
+    "focus" "hover" "indeterminate" "lang" "left" "last-child"
+    "last-of-type" "link" "nth-child" "nth-last-child"
+    "nth-last-of-type" "nth-of-type" "only-child" "only-of-type"
+    "right" "root" "target" "visited")
   "Identifiers for pseudo-elements and pseudo-classes.")
 
 (defconst css-at-ids
diff --git a/test/indent/css-mode.css b/test/indent/css-mode.css
index 4dbab06..f4a4944 100644
--- a/test/indent/css-mode.css
+++ b/test/indent/css-mode.css
@@ -11,3 +11,15 @@
 div.x3
 {
 }
+
+div:first-child {
+    background-color: #abc;
+}
+
+span:nth-child(2) {
+    font-family: weird;
+}
+
+img:last-of-type {
+    padding: 0;
+}
-- 
1.8.5.5






reply via email to

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