day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
634 stars 68 forks source link

Should CSS use HTML namespace? #282

Closed Sardtok closed 3 years ago

Sardtok commented 4 years ago

https://github.com/day8/re-frame-10x/blob/1272fc16e8cadd1af47ae85e40457b04a481fc4e/src/day8/re_frame_10x/styles.cljs#L170

This generates validation warnings in Firefox' CSS parser. Not a major problem, but I wonder if this is supposed to only work for namespaced tags. If the HTML namespace is meant to be used, it should be declared. Perhaps as "http://www.w3.org/1999/xhtml":

@namespace html "http://www.w3.org/1999/xhtml"

I guess this is to avoid moving nested SVG tags. Could perhaps |* > svg be used instead, as there likely is no namespace at least in HTML5? See https://www.w3.org/TR/selectors-3/#typenmsp

Optionally both declare the XHTML namespace as html, and use both html|* > svg and |* > svg to support both HTML5 and XHTML. Are anyone using XHTML by the way?

superstructor commented 3 years ago

As of the next release this will no longer be an issue as we have

  1. switched to using specific classes attached to components with spade/garden
  2. switched to using shadow-dom instead of all: unset to isolate styles.