About a week ago, there was discussion in the CB about how to modify the appearance of all content on PerlMonks authored by a given monk. For example, turning all of [bart]'s posts pink or hiding all [Anonymous|anonymonk] content (both actual suggestions from that discussion).
While several people pointed out that those could be done with various CSS tricks, it was also noticed that there are at least six different classes in use within the Monastery used to identify an author by their user number (####):
node-from-#### Newest Nodes
nnt-auth-#### R.A.T.s
pmnote-#### Replies
chatfrom_#### Chatterbox
auth-#### Best/Worst Nodes
user-#### Online Users (not strictly "authoring")
It would be nice (IMO) if these could be unified into a single class name, but not being [pmdev|dev]ilish and therefore not having a clue how much effort (or side-effects) that would cause, I'll settle for a quick example. This won't let you flag everything (for instance, results in [Super Search] are not tagged for per-author styling, nor are the section summary pages like [id://131]), but it covers a large fraction of the content a user can post. Place the following CSS in your [http://perlmonks.org/index.pl?node_id=450961|Display Settings] (scroll down to the textbox labelled "On-Site CSS Markup") to turn all of [NodeReaper]'s content (that you can) bold:
.node-from-52855 {font-weight:bold;}
.nnt-auth-52855 {font-weight:bold;}
.pmnote-52855 {font-weight:bold;}
.chatfrom_52855 {font-weight:bold;}
.auth-52855 {font-weight:bold;}
Update: [id://537703|ambrus notes] that this can be contracted still further.
Update: [id://537754|duelafn golfs it down more] (but also gets signatures in the process).
Instead of replacing those, since sometimes you might want that kind of control, we could just wrap all those things in one extra layer of div or span tags.
we could just wrap all those things in one extra layer of div or span tagsIMO, the markup here at the monestary is already pretty heavy. I'm also not a CSS expert, but is there any way to write a rule such that it applies to elements with a set of specified classes? For instance, if I had
Look ma, a div from thor!that there'd be a way to specify "apply these rules only to elements that have both class node-from and class 57755"? If so, that's what I'd suggest. That way, if you want to ignore me, you can just put:.57755 { display: none; }in your CSS and be done with it.thor
The only easy day was yesterday
Re^3: Author-based Stylin'created: 2006-03-18 21:08:44I beleive that the reason that wasn't heavily used the last time we revamped the CSS was that not all browsers supported it (and i believe the offender was IE but i could be very very wrong. ;) )
___________
Eric HodgesRe^4: Author-based Stylin'created: 2006-03-19 06:11:30Still, there's the fact that not all types of lines can appear everywhere. For example, you won't see chat lines in a node. Ditto with the RAT lines. At least these three cases are mutually exclusive.So, there probably already is, or should be, a container that can identify what kind of line you're seeing. Combining the container class with the author id as a class, should be enough to unambiguously identify the kind of span you're seeing, and it should even work in MSIE.
Just let me note that your example CSS can also be written with commas, like this:
.node-from-52855, .nnt-auth-52855, .pmnote-52855, .chatfrom_52855, .auth-52855 {font-weight:bold;}
perlmonks.org content © perlmonks.org and ambrus, bart, duelafn, eric256, idsfa, thor
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03