After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795540 - css.lang: Make existing pseudo-elements work with two colons, add ::placeholder and ::selection pseudo-elements
css.lang: Make existing pseudo-elements work with two colons, add ::placehold...
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
git master
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-25 11:52 UTC by Jeffery To
Modified: 2018-05-03 10:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
css.lang: Make existing pseudo-elements work with two colons, add ::placeholder and ::selection pseudo-elements (1.98 KB, patch)
2018-04-25 12:00 UTC, Jeffery To
none Details | Review

Description Jeffery To 2018-04-25 11:52:55 UTC
Selectors Level 3 changed pseudo-elements to use two colons (::) instead of one, while allowing the existing pseudo-elements (:first-line, :first-letter, :before, :after) to use the one colon notation for backwards compatibility.[1]

Also, while CSS Pseudo-Elements Module Level 4 is still only a working draft, browser support for ::placeholder[2] and ::selection[3] is already quite good.

I will attach a patch to apply these changes shortly.

[1] https://www.w3.org/TR/selectors-3/#pseudo-elements
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/::placeholder
[3] https://developer.mozilla.org/en-US/docs/Web/CSS/::selection
Comment 1 Jeffery To 2018-04-25 12:00:18 UTC
Created attachment 371368 [details] [review]
css.lang: Make existing pseudo-elements work with two colons, add ::placeholder and ::selection pseudo-elements

This changes the existing pseudo-elements (:first-line, :first-letter, :before, :after) to highlight both one-colon and two-colon forms, and adds support for ::placeholder and ::selection (with future pseudo-elements also using the two-colon form).
Comment 2 Sébastien Wilmet 2018-05-03 10:19:40 UTC
Thanks, pushed as:
commit 1457ff879786b83247d4701dc461f0d10e74b323

The first line of the commit message should not exceed 72 characters, so I've changed the title.