Talk:Druid (Evaluational Base Class Layout)/Span id?

From D&D Wiki

Jump to: navigation, search

Discussion Re-Opened[edit]

There's apparently an issue with the solution on which we voted and IE browsers. IE (v7.0.5730.11 is the version I used for viewing) doesn't fully implement the :after pseudo-element, so using the L5s and L6s nested in the div tag results in:

Fass Cleature (Su)What's a fass cleature?
Sass Clubfleature (Su)What's a sass clubfeature?

Sledged (talk) 11:37, 20 June 2007 (MDT)

I've got an idea for a wiki extension that will anchor markup using the same conventions the header tags do. So it'll work like the following:
Code 
'''<anc>Fass Cleature ([[Su]])</anc>:''' What's a fass cleature?
Display 
Fass Cleature (Su): What's a fass cleature?
This should satisfy two of three the reasons for using L5s over span tags:
  • Predictable anchor names. Using the custom tag will ensure that the anchor is exactly the same as the displayed text.
  • It's still less code than using the span tags ('''<anc>Wild Shape (Su)</anc>:''' versus '''<span id="Wild Shape (Su)">Wild Shape (Su)</span>:''').
Additionally, there will be no need for the surrounding div tag with the "supplement" or "tocDepthX" classes, and it can be used to anchor tables, too. —Sledged (talk) 12:08, 20 June 2007 (MDT)

I have another idea[edit]

  1. Allow div in the code
  2. Start the page with <div class="class-template">
  3. modify the CSS so that it won't show the L5 with a rule like this: .class-template toc h5 {display:none}, or whatever is the actual code for the L5 in the TOC. This code means: “in any page about a character class template, do not show the fifth title level in the TOC”.

This is a middle-ground between the two proposal. As I use to say, When there is two alternatives, the solution is a blend of both. What do you think of this proposal?
David Latapie ( | @) 09:37, 22 March 2007 (MDT)

That solution won't stop the L5s from showing up in the ToC, because that isn't something that is governed by (or that can be governed by) the CSS. The core mediawiki code would have to hacked for that. —Sledged (talk) 09:46, 22 March 2007 (MDT)
.class-template .toclevel-5 {display:none} shall do it. of course, it would not prevent the semantics to be there, so it would appear in a search engine. If you want to enforce it as much as possible, consider
@media all {.class-template .toclevel-5 {display:none}}
David Latapie ( | @) 10:01, 22 March 2007 (MDT)
Ah, I'm starting to see at what you're getting. Impressive. That would do the trick. The only thing we'd have to deal with after that, is making the L5s be on the starting line of the descriptive text—which would require getting rid of the right-justified [edit] links. None of that though seems like it would be that much of a challenge. —Sledged (talk) 10:29, 22 March 2007 (MDT)
It can't be worse than Guildwiki has, where we have this tendency to get three edit buttons right next to each other. What would it look like, so I have an idea of what we're working with? (Sorry, I'm horrible at coding that's not basic wiki code or html...)
It occurs to me that if you want to get rid of the edit tags, there's a tag that's something like {{noeditsection}} I've seen around... I can check on it later, I'm in class as it is and don't feel like being caught online and using a proxy (as opposed to just online on a site my class isn't using). The problem with that is that you can't edit the entire section (obviously), but if the problem is that there's two near-redundant edit tags taking up space, it could be handy. If it's a template as I think it is, I can drag it over here from wherever I found it. (Darn you for making edit conflicts, Sledged :P)Armond 10:38, 22 March 2007 (MDT)
Thank you for the compliment, Sledged. Regarding L5, May I suggest you what I am using? Since L5 is a definition-explanation couple, you could use the code I am using (essentially, this is run-in with generated content): (X)HTML5: the <dialog> element is (almost) already there.
As a bonus, you don't have to care at all about L5 (and their edit button, as Armond pointed it out): there is no L5 (but the correct semantics is still there, and this is much better than with strong). Of cource, there is the problem of how to easily enter dl values; this were templating the whole page comes to help (see a previous proposal of mine, higher in the discussion). Be sure to check my page either with nightly Safari build (Mac) or with Opera.
David Latapie ( | @) 10:59, 22 March 2007 (MDT)
Actually my initial concept used L5s (and L6s). Once I get the CSS modified, I'll go back to using them, then we won't have to use the span tags, they won't show up in the ToC, and the L5s and L6s will be on the descriptive text's starting ling. An absolutely fabulous solution! My thanks. —Sledged (talk) 11:17, 22 March 2007 (MDT)
I'm getting around one word in two here, but it sounds like this is a good solution... As long as it works and we can copy the coding to various other pages, I'm happy with it. Will it do that? Armond 12:14, 22 March 2007 (MDT)
It'll work, and it will affect all pages simultaneously. —Sledged (talk) 12:56, 22 March 2007 (MDT)
If only firefox handled display: run-in. —Sledged (talk) 12:17, 22 March 2007 (MDT)
And that's not going to change anytime soon: this is a bug from 1998!
David Latapie ( | @) 12:34, 22 March 2007 (MDT)
Fortunately, I've found a suitable work-around. —Sledged (talk) 12:56, 22 March 2007 (MDT)
I do not see the point to this. What you guys want to do is make L5's not show up in the ToC and then make them start on the same line while looking like the normal header (bolded text)... Wait a minute, that is exactly what span id's can do just without all this extra code needed. This idea makes no sense to me, or am I just understanding this wrong? --Green Dragon 00:36, 23 March 2007 (MDT)
You're not that wrong. Really, the difference between a span and a dl is semantics, no more (or no less, depending on point of view). Granted, I am a semantics aficionado and a standardista.
David Latapie ( | @) 04:32, 23 March 2007 (MDT)
Hm... So, it boils down to whether or not "Good Code" is better than the easier span id's, which are not "Good Code" in this scenario. I am going to add this to the voting section. Also, I am going to place my vote for span id's because they are less confusing even though they are not "Good Code". I think that the non-span id version would be too hard for people to understand when trying to add a class or even modify one on D&D Wiki. --Green Dragon 14:36, 23 March 2007 (MDT)
Just an addition: both ways are correct in that they are valid—they validate. The first one is valid, but the second one is valid and semantic.
David Latapie ( | @) 14:23, 25 March 2007 (MDT)
There are a few benefits to this approach over span tags:
  • Predictable anchor names; id attribute of span tags are subject to the user who fills it in. Much like page names, having user provide the name allows for a certain amount of variation. There's been a number of pages we've had to move because the user left off the "(DnD Class)" or "(DnD NPC)" identifier, or they didn't put a space between the name and the identifier, or they saved it as "MyRace (DnD Race)". Using the L5s will ensure that the anchor is exactly the same as the displayed text (with the only exception of which I can think is when there are two headers on the same page with the exact same text in the exact same case).
  • Using the L5s to anchor a section is seamless to the user. One might not even know it's being anchored, nor would one have to know. Generally the less the user has to know (so long as it works), the more convenient it is.
  • "Wait a minute, that is exactly what span id's can do just without all this extra code needed." Granted, for the ones modifying the CSS, there's more code involved, but for the users, it less code than using the span tags (=====Wild Shape (Su)====== versus '''<span id="Wild Shape (Su)">Wild Shape (Su)</span>:''').
Sledged (talk) 13:50, 25 March 2007 (MDT)
I agree with everything Sledged said. I will just add that it will be more than CSS customization: Mediawiki code will have to be changed, so that ===== does not become h5, but dl and dt. Bad news is that users will have to enter something (dd). Good news is that this is already in MediaWiki (; :).
David Latapie ( | @) 14:33, 25 March 2007 (MDT)
Okay, I see the advantage to using L5's over span id's however I have one more question. Will the CSS for every L5 header be modified or will just the class ones be modified by someone adding a little notice that tells the CSS that this certain pages needs a different type of L5 than the normal (I'm not a coder — I do not know if this is even possible)? --Green Dragon 20:22, 25 March 2007 (MDT)
By default, that will be all L5, I guess. But it might be possible to tell MediaWiki “do it only under certain circumstances” (maybe the same way as one can add namespaces). Sadly, I can't tell you how, I do not code MediaWiki. RTFMing you to the Configuration settings and Technical reference will not be of great help, but this is all I can do, sorry. I’m pretty sure, nonetheless, that by asking on the IRC channel for MediaWiki (especially if you invite people to read this thread), you will be able to get some answer.
David Latapie ( | @) 20:31, 25 March 2007 (MDT)
Hm... I will put my vote for Sledged's method once a way to figure out how to make only a certain page's L5 headers be changed is found out. Sorry David Latapie, however I don't really care about semantics that much and I like the cleaner approach of Sledged's method. --Green Dragon 20:08, 26 March 2007 (MDT)
Not a big deal. As I mentionned earlier, both methods generate W3C-compliant code, and that is the most important.
David Latapie ( | @) 02:33, 27 March 2007 (MDT)
Selecting which pages have normal L5s and modified L5s can be done using a similar mechanic with the ToC. Surround everything with a <div class="supplement"> tag and modify the CSS. —Sledged (talk) 11:36, 20 April 2007 (MDT)
Header 5[edit]

Text, text, and more text.

Header 6[edit]

Text, text, and more text.

So, it is not defaulted to make the L5's be modified, right? --Green Dragon 14:12, 22 April 2007 (MDT)
Right. Though it could easily be done the other way. Having the header on the same line could be the default and exceptions could be specified by a class attribute. Either way will work. —Sledged (talk) 15:48, 22 April 2007 (MDT)
Good. Since it is not default I will change my vote. --Green Dragon 16:23, 22 April 2007 (MDT)

Votes[edit]

Anchoring Class Features (re-vote)
Use Span Ids (Not Displayed in ToC) Use L5s with CSS Modified (Not Displayed in ToC) Use definition lists with run-in (Not Displayed in ToC)
Code 
'''<span id="Fass Cleature (Su)">Fass Cleature (Su)</span>:''' What's a fass cleature?


Display 
Fass Cleature (Su): What's a fass cleature?
Code 
=====Fass Cleature (Su)=====

What's a fass cleature?


Display 
Fass Cleature (Su): What's a fass cleature?
Code 
=====Fass Cleature (Su)=====

What's a fass cleature?


Display (for IE, Firefox, and other Gecko-based browsers) 
Fass Cleature (Su):
What's a fass cleature?
Display (for Safari pre-Leopard) 
Fass Cleature (Su)What's a fass cleature? (no space, no colon)
Display (for Safari Leopard and Opera, maybe other) 
Fass Cleature (Su): What's a fass cleature?
Green Dragon
Dmilewski
Sledged
Aarnott
Armond
  1. Armond
  1. Sledged
  2. Blue Dragon
  3. Cúthalion
  4. Green Dragon
  1. David Latapie

Although I prefer the third solution, I would be content with the second one. And that would solve this question, we could focus on something else (since the rest of the page is already decided to.

Now, we have 2 / 3 / 1. I feel like powerful here ;-) I decide for the second one, we switch to 2 / 4 and this is done: L5 with modified CSS
David Latapie ( | @) — blog 18:52, 9 April 2007 (MDT)

Class Feature Labels
Labels on the Same Line Labels on the Line Above

Some Class Feature (Ex): Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam. Vestibulum vulputate mauris. Integer congue aliquet erat.

Another Class Feature (Ex): Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam. Vestibulum vulputate mauris. Integer congue aliquet erat.

Return of the Class Feature (Ex): Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam.

Son of the Class Feature (Ex): Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam. Vestibulum vulputate mauris. Integer congue aliquet erat.

The Class Feature Strikes Back (Ex):Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam.

Attack of the Class Features (Ex): Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam. Vestibulum vulputate mauris. Integer congue aliquet erat..

Some Class Feature (Ex)

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam. Vestibulum vulputate mauris. Integer congue aliquet erat.

Another Class Feature (Ex)

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam. Vestibulum vulputate mauris. Integer congue aliquet erat.

Return of the Class Feature (Ex)

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam.

Son of the Class Feature (Ex)

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam. Vestibulum vulputate mauris. Integer congue aliquet erat.

The Class Feature Strikes Back (Ex)

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam.

Attack of the Class Features (Ex)

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur ac odio eleifend magna gravida aliquam. Vestibulum vulputate mauris. Integer congue aliquet erat.

  1. Green Dragon
  2. Dmilewski
  3. Armond
  4. Aarnott
  5. David Latapie
  6. Cúthalion
  1. Sledged

Back by popular demand, the labels of the class features (and other descriptions at that level) are back on the starting line of the descriptive text. —Sledged (talk) 09:25, 22 March 2007 (MDT)

I changed the format of the votes because I didn't feel like typing an html tag. I hope you don't mind. --Cúthalion 12:32, 2 April 2007 (MDT)

Not at all. --Green Dragon 12:40, 2 April 2007 (MDT)

Not - Not displayed in ToC[edit]

According to the vote, it was agreed that the L5 headers should not appear in the ToC. As it can easily be seen in User:Mkill/Feats this is not implemented yet, at least in Firefox. Any outlook on when we might see this? --Mkill 06:58, 31 July 2007 (MDT)

Ta-da! Actually, this method doesn't remove L5s per se. It just limits the depth of the ToC. —Sledged (talk) 14:51, 3 August 2007 (MDT)
Personal tools
Home of user-generated,
homebrew, pages!
d20M
miscellaneous
admin area
Terms and Conditions for Non-Human Visitors