Adrian Roselli on Nostr: #CSS help requested… I want to dump the JS that sets a class to style a column that ...
#CSS help requested…
I want to dump the JS that sets a class to style a column that has been sorted in a table.
So I have this selector, which leans on ARIA and uses `:has()`:
```
colgroup:has(+ thead th[aria-sort]:nth-child(1)) col:nth-child(1)
```
I can repeat that for every column for as many columns as I have in the table.
Am I missing a selector that would allow me to match those? One of those nifty emergent Turing selectors that breaks my brain?
Ref:
https://cdpn.io/aardrian/debug/gOJJRQP/a40f961c323a0e56cd9b55b9d3e3f734Published at
2024-06-28 18:23:20Event JSON
{
"id": "191ddff1aa402c7706c223e1d92bb114093e631ac7f0307fa154be3fb4368e96",
"pubkey": "7e72a9e116902990cb1f9173e4bd7d1b65a86e0420cd97e82f540d2829413609",
"created_at": 1719599000,
"kind": 1,
"tags": [
[
"t",
"css"
],
[
"proxy",
"https://toot.cafe/users/aardrian/statuses/112695640079712832",
"activitypub"
]
],
"content": "#CSS help requested…\n\nI want to dump the JS that sets a class to style a column that has been sorted in a table.\n\nSo I have this selector, which leans on ARIA and uses `:has()`:\n\n```\ncolgroup:has(+ thead th[aria-sort]:nth-child(1)) col:nth-child(1)\n```\n\nI can repeat that for every column for as many columns as I have in the table.\n\nAm I missing a selector that would allow me to match those? One of those nifty emergent Turing selectors that breaks my brain?\n\nRef: https://cdpn.io/aardrian/debug/gOJJRQP/a40f961c323a0e56cd9b55b9d3e3f734",
"sig": "7fccbf04171642e1723c8c2cdd31d25a0a0d7742d8085c629ea25c72c5f71a8cd0dd417079b578ed7c0382e786d614b1aea20060a1b519b2672277ebda9e9f07"
}