So I am doing some wiki editing, and sadly Javascript is not enabled. Therefore, I need help from the CSS guru's out there!
I understand you can add a custom HTML attribute like this:
<span id="some-id" custom_attr="no"></span>
And you can style elements with custom_attr
like this:
span[custom_attrib] { /* styling here */ }
Now, is there a way to edit the HTML attribute inside the CSS?
Example (which does not work of course..):
<!------------- CSS ------------>
<style>
.some-class {
/* Original code here */
}
.some-class[custom_attr = "yes"] {
/* Change code here */
}
#some-id:hover ~ .some-class[custom_attr = "no"] {
custom_attr : "yes";
}
</style>
<!------------- HTML ------------>
<html>
...
<span id="some-id">...</span>
<span class="some-class" custom_attr="no">...</span>
...
</html>