I don't think it is any more a black box than JavaScript and the DOM, it just happens that most people don't take the effort to learn it that they spend on the other stuff, and unless those people are super geniuses I'm sure there are still parts to the technologies they have bothered to learn that surprise them or they are unsure about and would have to check from time to time.
I think it would be better to compare it to SQL. The RDBMS does a lot of stuff in the background with the query planner, but it's very easy to get information about implementation detail. It's not hard for someone who just writes SQL to learn how indexes make rows faster, how btree indexes work, and why using asc/desc in a multi-column index matters. With CSS you never get any of that, so I think it's a much blacker box than normal.
I've worked on both an RDBMS optimizer and a CSS engine, and while the comparison is interesting, it's also not quite right. In particular, you can write pretty crappy CSS and it will work quite alright, including in all major browsers. Database engines are not like that; there are more ways of doing everything, the bad choices are _really_ bad, and the heuristics much more prone to suddenly do really slow things based on reasonable queries. Most optimization differences between versions and engines are about constant factors and not radically different algorithms (although for some select topics, like invalidation, you may get burned). Even if you write a truly horrible CSS rule, it is unlikely to freeze your page for a minute in any current browser. This is not because browser engineers are more talented than RDBMS engineers, it's just a much simpler problem.
You're right in that there's less information out there for CSS engines (from flipping through slides on this talk, it looks like a great way to improve on that situation!), but there's just a lot more to _say_ about SQL performance. And a lot of what's being said about the latter is honestly pretty sketchy :-)
I understood the right to left was on the element level and not on the node level so I would think attr="value wouldn't have an effect.