* bug#18578: 24.3; CSS mode does not highlight CSS3 pseudo-classes
@ 2014-09-28 14:41 Łukasz Stelmach
2014-09-28 18:05 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Łukasz Stelmach @ 2014-09-28 14:41 UTC (permalink / raw)
To: 18578
CSS Mode as available in the official git repository does not highlight
properly CSS3 pseudo classes, notably :last-child and :nth-child. A
patch with an updated list of pseudo classes will follow this message.
--
Było mi bardzo miło. --- Rurku. --- ...
>Łukasz< --- To dobrze, że mnie słuchasz.
...Przez ulicę przechodzi na żółtym świetle, jabłka obiera żyletką, lubi ryzyko
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#18578: 24.3; CSS mode does not highlight CSS3 pseudo-classes
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 ` bug#18578: [PATCH] Update the list of CSS pseudo classes Łukasz Stelmach
2015-03-18 17:58 ` bug#18578: (no subject) Simen Heggestøyl
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2014-09-28 18:05 UTC (permalink / raw)
To: Łukasz Stelmach; +Cc: 18578
> CSS Mode as available in the official git repository does not highlight
> properly CSS3 pseudo classes, notably :last-child and :nth-child.
> A patch with an updated list of pseudo classes will follow this message.
Can you add some relevant sample CSS code in test/indent/css-mode.css,
alongside your patch?
Stefan "the closest thing to a maintainer of css-mode, but who
is basically CSS-illiterate"
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#18578: [PATCH] Update the list of CSS pseudo classes
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
2015-03-18 17:58 ` bug#18578: (no subject) Simen Heggestøyl
2 siblings, 0 replies; 4+ messages in thread
From: Łukasz Stelmach @ 2014-09-28 19:59 UTC (permalink / raw)
To: monnier; +Cc: 18578, Łukasz Stelmach
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#18578: (no subject)
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 ` bug#18578: [PATCH] Update the list of CSS pseudo classes Łukasz Stelmach
@ 2015-03-18 17:58 ` Simen Heggestøyl
2 siblings, 0 replies; 4+ messages in thread
From: Simen Heggestøyl @ 2015-03-18 17:58 UTC (permalink / raw)
To: 18578-done
[-- Attachment #1: Type: text/plain, Size: 153 bytes --]
This has now been fixed for the next version of Emacs (by commit
64db0c26faba21e7aedc0c5f57e04ed175b04f5b in master).
Thanks for the report!
-- Simen
[-- Attachment #2: Type: text/html, Size: 204 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-18 17:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` bug#18578: [PATCH] Update the list of CSS pseudo classes Łukasz Stelmach
2015-03-18 17:58 ` bug#18578: (no subject) Simen Heggestøyl
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.