XF 2.2 [data-container-key*="node-4"]

Robert9

Well-known member
It seems that [data-container-key*="node-4"]
works not only for node-id 4, it works also for node-id 41?


Do we have a list with these ways of limitation for css?
And how can i limit my css to node id 4?
 
Do we have a list with these ways of limitation for css?

And how can i limit my css to node id 4?
Try [data-container-key~="node-4"]
 
What is "~"?
This is explained in the documentation I added. It matches the word as-is, without anything in front of it or after it (which * does). Yours (without the ~) currently works because it's presumably the only text inside "data-container-key" and should work flawlessly until you add anything else in there (but why should you, it's a data attribute).

And is * for 41 and 14 and 141?
No, this is also part of the documentation. It will match any string containing "node-4", so "node-41", "node-475187591" as well as "my-beautiful-node-400". See:
1701350201178.png
 
Back
Top Bottom