all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Simen Heggestøyl" <simenheg@gmail.com>
To: Jackson Hamilton <jackson@jacksonrayhamilton.com>
Cc: 21898@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#21898: scss-mode font-lock face for variables
Date: Fri, 13 Nov 2015 21:29:45 +0100	[thread overview]
Message-ID: <1447446585.9212.2@smtp.gmail.com> (raw)
In-Reply-To: <CAGiE8AzNTaURW+BRtkqd-iVWwZDprJT9M7wphjJSFuZz6WAv5w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]

Hello, Jackson!

Thanks for the report. I never noticed this issue myself, since the
theme I'm using (Leuven) styles the css-property face. We should
definitely fix it.

Like you say, two possible solutions are:

1. Highlight variables with font-lock-constant-face instead of
   font-lock-variable-name-face. A downside is that this is backwards
   wrt. the intended meaning of the faces, so users will see variables
   highlighted in a face that's usually used for constants. An upside is
   that it will probably look nice with existing themes, since they are
   likely to already style font-lock-variable-name-face.

2. Change the css-property face. It doesn't mean it has to inherit from
   another one of the standard Font Lock faces, we could also just
   change the default foreground color, for instance. A downside of this
   approach is that users may be startled that the face that they were
   used to changed, but for themes that already style the css-property,
   everything will be like before. The upside is that
   font-lock-variable-name-face remains used for variables, like it's
   intended to.

I'm not sure which solution is best.

Either way, we should also add a defface for variables and use it for
Sass variables (and also CSS variables later on).

-- Simen

On Fri, Nov 13, 2015 at 7:37 AM, Jackson Hamilton 
<jackson@jacksonrayhamilton.com> wrote:
> I'd like to propose the following change to the scss-mode on master: 
> Use font-lock-constant-face for SCSS variables.
> 
> This may not seem intuitive from a naming perspective, but 
> font-lock-variable-name-face is already used for CSS properties. That 
> makes it harder to distinguish between properties and variables.
> 
> AFAIK, Sass doesn't even have constants, so I don't see much harm in 
> using this face. It'd be a less dramatic change for those who have 
> grown used to variable coloring for CSS properties.
> 
> I guess the alternative would be to inherit the property face from 
> something else, to free up the face for real variables. But then what 
> do we use for properties? (Inheriting from nothing doesn't look good 
> IMO.)
> 
> Attached is the proposed patch.

[-- Attachment #2: Type: text/html, Size: 2761 bytes --]

  reply	other threads:[~2015-11-13 20:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13  6:37 bug#21898: scss-mode font-lock face for variables Jackson Hamilton
2015-11-13 20:29 ` Simen Heggestøyl [this message]
2017-07-29 16:46   ` Simen Heggestøyl
2017-07-29 17:24     ` Jackson Ray Hamilton
2017-07-30  9:33       ` 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=1447446585.9212.2@smtp.gmail.com \
    --to=simenheg@gmail.com \
    --cc=21898@debbugs.gnu.org \
    --cc=jackson@jacksonrayhamilton.com \
    --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.