To keep the table from being cluttered, I've done away with the N/A entry for stats that weren't raised for a specific character. Those table cells are now empty.
I even came up with a neat way to apply the "this character is in the party" CSS to a column or row, that's a lot simpler than what I had been previously doing. Here's an excerpt, the full thing is much longer.
.ctds[data-party-cols~="1"] tr :nth-child(2), .ctds[data-party-cols~="2"] tr :nth-child(3), .ctds[data-party-cols~="3"] tr :nth-child(4) { color: #CC9900; }The key is the "data-party-cols" attribute. Any attribute beginning with "data-" is ignored by the web browser. These attributes were added for the sole purpose of allowing pages and JavaScript applications to have a standards-compliant way to have custom attributes. Here, I use it on the table tag, which has the .ctds class, to denote the column(s) that should be marked as "character is in the party", and the numbering ignores the column that contains the stat names. The ~= operator looks for the value provided within a space-delimited string of characters, so it's really simple to specify that more than one of the columns should be marked as "in the party". I used a similar approach with a data-party-rows attribute to revamp the table showing how many tabs I have left to get for people's tab-related stats to be maxed.
Edit (later that day): I just realized after finishing a run through each Dimensional Vortex that Crono and Marle need 10 Dimensional Vortex runs to max their Hit stat, and... I need 10 Spekkio runs to finish getting tabs. This also means I no longer need to grab tabs hidden in the environment, or charm them. Dunno how it worked out so perfectly, but hey, I'll take it.
Double Edit (2015-02-24): And of course I've tweaked the CSS again. Now I can set the party in one place and the CSS tells both tables what they should look like. It's still the same basic concept as shown in the example, though.
No comments:
Post a Comment
I moderate comments because when Blogger originally implemented a spam filter it wouldn't work without comment moderation enabled. So if your comment doesn't show up right away, that would be why.