I think he's wrong here: requiring that folks preprocess some CSS-variant-with-constants into CSS-without-constants just multiplies the number of entities (by however many CSS variants are then introduced). CSS's lack of constants is a glaring design error.
If we want to reduce the total number of entities, then we should examine unifying HTML, CSS & scripting. As I've indicated elsewhere, I think that something like this would be awesome:
;; adapted from https://www.w3schools.com/howto/howto_css_modals.asp
(html
(head
(title "modal-box-example")
(style
;; The Modal (background)
(.modal
;; Hidden by default
(display none)
;; Stay in place
(position fixed)
;; Sit on top
(z-index 1)
(left 0)
(top 0)
;; Full width
(width "100%")
;; Full height
(height "100%")
;; Enable scroll if needed
(overflow: auto)
;; Fallback color
(background-color (rgb 0 0 0))
;; Black w/ opacity
(background-color (rgba 0 0 0 0.4)))
;; Modal Content/Box
(.modal-content
(background-color #x"fefefe")
;; 15% from the top and centered
(margin "15%" auto)
(padding 20px)
(border 1px solid #x"888")
;; Could be more or less, depending on screen size
(width "80%"))
;; The Close Button
(.close
(color #aaa)
(float right)
(font-size 28px)
(font-weight bold))
((.close:hover .close:focus)
(color black)
(text-decoration none)
(cursor pointer)))
(script
(with-elements-by-id
((modal "myModal") (btn "myBtn")) document
(let ((span (aref (get-elements-by-class-name document "close") 0)))
(setf (on-click btn) (lambda () (setf (display (style modal)) "block"))
(on-click span) (lambda () (setf (display (style modal)) "none"))
(on-click window) (lambda (event)
(declare (ignorable event))
(setf (display (style modal)) "none")))))))
(body
;; Trigger/Open The Modal
((button id "myBtn") "Open Modal")
;; The Modal
((div id "myModal" class "modal")
;; Modal content
((div class "modal-content")
((span class "close") ×)
(p "Some text in the Modal..")))))