bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50345: 28.0.50; [PATCH] Filling holes in css-mode.el


From: Simen Heggestøyl
Subject: bug#50345: 28.0.50; [PATCH] Filling holes in css-mode.el
Date: Fri, 03 Sep 2021 09:46:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi Theodor,

Theodor Thornhill <theo@thornhill.no> <bug-gnu-emacs@gnu.org> writes:

> I took the liberty to add the keywords from [0].

Thanks!

> I see that some properties are extracted out into variables, but not
> sure what is standard practice here.

I've previously tried keeping them one-to-one with the property index
grammars (https://www.w3.org/TR/css-align-3/#property-index).

So for instance `place-content` would just refer back to `align-content`
and `justify-content` without the need to repeat their properties:

  ("place-content" align-content justify-content)

`align-content` is a bit more convoluted, with a mix of a literal value
and value classes in the grammar:

  ("align-content" "normal" baseline-position content-distribution
   overflow-position content-position)

The value classes aren't properties, so their values go into
`css-value-class-alist`. For instance, `baseline-position` can take
values:

  (baseline-position "first" "last" "baseline")

This can then be reused by other properties again.

Does this make sense? I should probably document this practice a bit
better. 😅

-- Simen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]