Subject: 28.0.50; [PATCH] Filling holes in css-mode.el

From: Theodor Thornhill <[email-masked]>
Date: Thu, 02 Sep 2021 23:22:17 +0200

Hi again!

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

I moved the justify and align parts out from the flex block and into its
own block.  I also took the liberty to add the `place' variants as well.
These are used a lot when using grid to set up your web page.  I hope
this is usable.  I see that some properties are extracted out into
variables, but not sure what is standard practice here.

Good evening,
Theodor

[0]: https://www.w3.org/TR/css-align-3

>From dccf92224cbe37805ae53edb49be4c098df47d0c Mon Sep 17 00:00:00 2001
From: Theodor Thornhill <[email-masked]>
Date: Thu, 2 Sep 2021 23:13:02 +0200
Subject: [PATCH] Add CSS Box Alignment Module Level 3 to css-mode

* lisp/textmodes/css-mode.el (css-property-alist): Consolidate
`align-{contents, items, self}', as well as the corresponding values
for `justify-{contents, items, self}' and `place-{contents, items,
self}'.  Values extracted from the flex part and into its own block.
---
 lisp/textmodes/css-mode.el | 38 ++++++++++++++++++++++++++++++--------
 1 file changed, 30 insertions(+), 8 deletions(-)

diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 3bcd9c9766..f406afb7b6 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -301,14 +301,38 @@
     ("grid-template-columns" "none" track-list auto-track-list)
     ("grid-template-rows" "none" track-list auto-track-list)
 
+    ;; CSS Box Alignment Module Level 3
+    ;; (https://www.w3.org/TR/css-align-3/#alignment-values)
+    ("align-content" "center" "start" "end" "flex-start" "flex-end"
+     "normal" "first" "last" "baseline" "space-between" "space-around"
+     "space-evenly" "stretch" "safe" "unsafe")
+    ("align-items" "normal" "stretch" "center" "start" "end"
+     "flex-start" "flex-end" "baseline" "first" "last" "baseline"
+     "safe" "unsafe")
+    ("align-self" "auto" "normal" "center" "start" "end"
+     "self-start" "self-end" "flex-start" "flex-end"
+     "baseline" "first" "last" "stretch" "safe" "unsafe")
+    ("justify-content" "center" "start" "end" "flex-start" "flex-end"
+     "left" "right" "normal" "space-between" "space-around"
+     "space-evenly"  "stretch" "safe" "unsafe")
+    ("justify-items" "auto" "normal" "stretch" "center" "start" "end"
+     "flex-start" "flex-end" "self-start" "self-end" "left" "right"
+     "baseline" "first" "last" "legacy" "safe" "unsafe")
+    ("justify-self" "auto" "normal" "stretch" "center" "start" "end"
+     "flex-start" "flex-end" "self-start" "self-end" "left" "right"
+     "baseline" "first" "last" "safe" "unsafe")
+    ("place-content" "center" "start" "end" "left" "right" "flex-start"
+     "flex-end" "baseline" "first" "last" "space-evenly" "space-around"
+     "space-between")
+    ("place-items" "auto" "normal" "center" "start" "end"
+     "self-start" "self-end" "flex-start" "flex-end"
+     "left" "right" "baseline" "first" "last" "stretch")
+    ("place-self" "auto" "center" "start" "end" "self-start" "self-end"
+     "flex-start" "flex-end" "normal" "left" "right" "baseline"
+     "first" "last" "stretch")
+
     ;; CSS Flexible Box Layout Module Level 1
     ;; (https://www.w3.org/TR/css-flexbox-1/#property-index)
-    ("align-content" "flex-start" "flex-end" "center" "space-between"
-     "space-around" "stretch")
-    ("align-items" "flex-start" "flex-end" "center" "baseline"
-     "stretch")
-    ("align-self" "auto" "flex-start" "flex-end" "center" "baseline"
-     "stretch")
     ("flex" "none" flex-grow flex-shrink flex-basis)
     ("flex-basis" "auto" "content" width)
     ("flex-direction" "row" "row-reverse" "column" "column-reverse")
@@ -316,8 +340,6 @@
     ("flex-grow" number)
     ("flex-shrink" number)
     ("flex-wrap" "nowrap" "wrap" "wrap-reverse")
-    ("justify-content" "flex-start" "flex-end" "center"
-     "space-between" "space-around")
     ("order" integer)
 
     ;; CSS Fonts Module Level 3
-- 
2.30.1 (Apple Git-130)