observablehq / inputs

Better input elements
https://observablehq.com/framework/lib/inputs
ISC License
125 stars 34 forks source link

Table styles affect table cell contents #241

Open mootari opened 1 year ago

mootari commented 1 year ago

From tex in Table headers?:

This style rule is matching the contents of the TeX element: https://github.com/observablehq/inputs/blob/238639f3cb26fa9ecfc48b73bd6751aa66f6b1cc/src/style.css#L231-L235 The rule should be made more specific, like .__ns__-table > table > thead > th > span.

galopin commented 1 year ago

If the problematic ruleset is:

https://github.com/observablehq/inputs/blob/86fa5c0b529c32cd83fccdf9b6b80ffe3bf015c0/src/style.css#L231-L235

… then a possible fix would be to modify the above selector as follows:

.__ns__-table thead th > span:first-of-type:not([class]) {
  /* ... */
}

OR

.__ns__-table thead th > span:first-of-type {
  /* ... */
}