Skip to content

Comment on CSS as a Query Languageparent

Comments

evncOP

one more, for completeness:

  SELECT 'black' AS outline_color
  FROM elements parent
  JOIN elements child ON parent.id = child.parent_id
  WHERE parent.data_theme = 'light'
    AND child.data_theme = 'dark'
    AND child.focused = true

there's a lot of ways to express the same thing! it's interesting to notice the connections between them, I think, and their strengths and weaknesses, e.g. I probably wouldn't want to write my whole design system in SQL, but since it's relational queries over the elements structure and properties, you could.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.