glreschke Yes of cause, in the world of Javascript we can program what we want! So any HTML element on the page (that appears in the DOM) can be used as a hook (and can be addressed) by jQuery to modify this page.
You can perform any kind of logic, you can think of (conditions, loops, filters, booleans, traversing). Also by jQuery you can add classes (and even click handlers to any link element). That's what Javascript Plugin Authors do anyway.
So in your case the tags are displayed on the specific pages and can be used as hooks. But, yes, you could even put extra elements on the page, just to use them as hooks for Javascript and hide them at the same time, all of that, before the page is rendered. So, your hook elements never become visible to the users.
The conditional statement could look something like this:
if( jQuery("element.hook").length > 0 && jQuery("span:contains('tag: XX')").length > 0 ){
jQuery("#dokuwiki__site").css({ 'max-width': '100%' });
jQuery("element.hook").css({ 'display': 'none' }); // optionally!
}
Only if both conditions are met, the CSS is applied. Finally, the hook elements can be hidden.
Also, you can repeat as many of these if-statements, as you need. BTW, the negation of the contains-condition would be: ("element:not(:contains('text'))")
Cheers!