3 ms·
Nest definitely best. But instead of ampersand, let's use forward slash. It's very webby. Now for this very fascinating article on the history of the ampersan
by graderjs 4y ago
Nest definitely best.
But instead of ampersand, let's use forward slash. It's very webby.
Now for this very fascinating article on the history of the ampersand
https://www.merriam-webster.com/words-at-play/the-history-of-ampersand https://www.merriam-webster.com/words-at-play/the-history-of...
- chrismorgan 4y agoSlash has a long history of being used as a tree descent combinator. That would make sense for the descendant combinator (“ ”) or the child combinator (“>”), and XPath does basically that (approximately “//” and “/” for descendant and child); but to use it instead of the ampersand here, that would be silly, because the ampersand is representing a selector, not a combinator. Ampersand has a long history, though much less popular, of being used to represent the source value of a text replacement (e.g. in Vim, :s/search/<&>/ will find “search” and replace it with “<search>”). This is pretty much exactly what’s going on here.
- graderjs 4y agoI don't think it's silly. Is it really silly tho? I think it might be silly if you want to make everything historically align tho. Not everything has to. You might shoehorn yourself into an unideal outcome, trying to be backwards compat with the past. No? I like the conceptual similarity of stepping through parts (like a URL) with stepping through parts of the selector. Does it look good? form { margin: 1rem 0.5rem; background: transparent; / fieldset { border: none; padding: 0; background: white; } / label { color: darkslategray; / > input { border: thin solid; } / input { border: none; } / > button { font-size: larger; } } / a { text-decoration: none; } / :is(a, input, button, label) { color: inherit; } /:invalid { color: red; } } I think it looks really good actually. And I think the humble slash works really well as a stand in for a selector here. &&& are fucking noisy.
- graderjs 4y agoAlthough honestly it does look a little bit like a comment. Maybe & are the way to go. But...what about question mark? Question mark could be good. Or underscore. form { margin: 1rem 0.5rem; background: transparent; ? fieldset { border: none; padding: 0; background: white; } ? label { color: darkslategray; ? > input { border: thin solid; } ? input { border: none; } ? > button { font-size: larger; } } ? a { text-decoration: none; } ? :is(a, input, button, label) { color: inherit; } ?:invalid { color: red; } } I think question mark's pretty good. It's the most semantic, visually for me. Maybe...I think. What about underscore? form { margin: 1rem 0.5rem; background: transparent; _ fieldset { border: none; padding: 0; background: white; } _ label { color: darkslategray; _ > input { border: thin solid; } _ input { border: none; } _ > button { font-size: larger; } } _ a { text-decoration: none; } _ :is(a, input, button, label) { color: inherit; } _:invalid { color: red; } } Looks weird to me. But some people might like it.