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 776830 - css.lang: Inconsistent highlighting in nested functions
css.lang: Inconsistent highlighting in nested functions
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-03 18:32 UTC by Tobias Schönberg
Modified: 2017-06-22 19:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
css.lang: Improve highlighting of functions: nesting and dimensions (2.31 KB, patch)
2017-06-21 17:33 UTC, Tobias Schönberg
accepted-commit_now Details | Review

Description Tobias Schönberg 2017-01-03 18:32:01 UTC
A block like this:

.class {
    background: radial-gradient(
        ellipse farthest-corner at 50% 50%,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 80%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

currently has very inconsistent highlighting. It seems like functions can't handle nested functions (the rgba() inside of radial-gradient()). Will try to send a patch soon.
Comment 1 Tobias Schönberg 2017-06-21 17:33:57 UTC
Created attachment 354191 [details] [review]
css.lang: Improve highlighting of functions: nesting and dimensions

Currently nested functions are not highlighted. Functions like
'translateX' are not hightlighted when the x is lower case.
Dimensions are not highlighted at all within functions.
This commit fixes these 3 issues. Function context is now
defined after units and imports them. Nesting is allowed.
Regex allows uppercase letters in function names.
Comment 2 Sébastien Wilmet 2017-06-22 09:37:46 UTC
Review of attachment 354191 [details] [review]:

Looks good, thanks.