all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Łukasz Stelmach" <stlman@poczta.fm>
To: monnier@IRO.UMontreal.CA
Cc: 18578@debbugs.gnu.org, "Łukasz Stelmach" <stlman@poczta.fm>
Subject: bug#18578: [PATCH] Update the list of CSS pseudo classes
Date: Sun, 28 Sep 2014 21:59:19 +0200	[thread overview]
Message-ID: <1411934359-29348-1-git-send-email-stlman@poczta.fm> (raw)
In-Reply-To: <87lhp3erih.fsf%steelman@post.pl>

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






  parent reply	other threads:[~2014-09-28 19:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-28 14:41 bug#18578: 24.3; CSS mode does not highlight CSS3 pseudo-classes Łukasz Stelmach
2014-09-28 18:05 ` Stefan Monnier
2014-09-28 19:59 ` Łukasz Stelmach [this message]
2015-03-18 17:58 ` bug#18578: (no subject) Simen Heggestøyl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411934359-29348-1-git-send-email-stlman@poczta.fm \
    --to=stlman@poczta.fm \
    --cc=18578@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.