The Signpost

File:Web design is my passion.png
JPxG
PD
0
0
300
Crossword

everybody gangsta till the style sheets start cascading

Contribute   —  
Share this
By JPxG

This issue — I'm sure everybody cares about this and is really interested in reading about it — I have spent some time optimizing the templates for crosswords, including a new several that allow for really easy formatting of the clues and answers. You can see the answer formatting in the last issue, for which I've added them.

I apologize to our phonular readers, for whom this sucks and doesn't work right; I am trying to figure out some CSS stuff that will let the highlighting properly on mobile. One major limitation is that it's impossible to just do what every other website (i.e. TV Tropes, the SCP wiki, etc) does and run clientside JavaScript from Wikipedia's MediaWiki install, meaning that 99% of the available technologies for hiding/displaying inline text are just not available. But surely we can use just vanilla tags like <details> and <summary>, and those wouldn't get roosterblocked by the parser, right?

<details>
    <summary>Open this to read a
    boring go-off</summary>
    Wow, hidden content! These are two of those
    sexy semantic HTML tags everyone forgets
    about the existence of, and would rather
    use a megabyte of JavaScript to do the
    same thing.<br/>

    But since I'm really smart and I know
    they exist, in theory it should be really
    easy to use them to implement behavior
    like collapsible and expandable text,
    even in  browsers that don't use
    JavaScript at all!<br/>

    Then maybe I could use CSS styling to
    modify the display of the details element
    to be inline rather than block, and mess
    around with the positioning and the box
    model to overlay it in the same place as
    the summary element.<br/>

    So then you'd just have a thing you
    could easily click to show the hidden
    content (and have its hidden/revealed
    state persist, even) rather than forcing
    the user to highlight black-on-black
    text to see the information.
</details>

<details><summary>Spoiler alert (click to open)</summary>It doesn't work.</details>

Furthermore, on an unrelated note, it should be noted that if you make a template to display text that's the same color as the background (like a spoiler), no matter what precautions are taken, or what giant red messages there are in the documentation, or how many technical measures have been taken to make it impossible to use the template in mainspace, there are certain names that you should never, ever give to that template... under any circumstances... no matter how innocuous and straightforward it may be — similar to how certain good-luck symbols should never be used in certain European countries — it will resurrect old terrors and cause great strife. You've been warned!

Anyway, amidst all the excitement, I forgot to actually bother to write any crosswords worth a damn this month, so here is some dreck I had lying around in the drafts.

The good news is that there is now a very good and well-documented guide on how to make your own crosswords easily using these templates here, so maybe next issue I will not have to put them together myself...??

The rectangle of doom

....
..
1
.
2
.
3
.
4
5
.
.
.
.
6
.
.
.
.
7
.
.
.
.
.

Clues

Across

1   Tenant of a fleshy drupe, or perhaps installer of a fleshy Drupal package in python  A PIP 
5   6-across needs to drop the  STICK 
6   The guy who won't drop his 5-across is being  A DICK 
7   Frequent utterance of pythons  SSSS 

Down

1   (abbrev.) Should have considered them before !voting "delete"  ATDS 
2   (abbrev.) Functs' NDAs cover these (this word is pluralized here in a stupid way that it never is in actual usage)  PIIS 
3   (abbrev.) Two organizations, one recognizing good deeds in cricket and the other bad deeds in war, are both known as the  ICCS 
4   (abbrev.) Leftist Kurdish gunmen  PKK 
5   (abbrev.) Elite tea-quaffing airmen  SAS 

The H of doom

.....
1
.
2
.
3
.
4
.
5
.
6
7
.
.
.
.
.
.. ..
.
.. .. .
8
.
9
.
.
10
.
11
.
12
13
.
.
.
.
.

Clues

Across

1   Nominators' expected  BEFORE 
7   For deletion, or of Delphi  ORACLE 
8   Not b this but the  BOTHER 
13  Frequent utterance of cobras  SSSSSS 

Down

1   Multi-talented athlete, martial arts weapon, or personal odor  BO 
2   What COI editors have to submit; alternately, show from the 90s with sexy doctors in it; alternately, the real-life place that show was about  ER 
3   Pungent phenomena considered "top lols" by schoolboy vandals  FARTS 
4   Initialism for Californian county known for production of citrus and reality TV  OC 
5   Machine learning technique; alternately, the place where you go to touch grass  RL 
6   Type of engineer who specializes in capacitors, timer chips, and goofy talk page comments  EE 
8   When the edit is pungent and false you call this  BS 
9   When the edit is pungent and reveals someone's phone number you request this  OS 
10  Institution attended by the kids writing 3-down into articles  HS 
11  Expect RfA opposes if you don't use them a high enough percentage of the time  ES 
12  Expect RfC opposes if you don't back up your claims to one of these  RS 

The templates of love

I'm not kidding about the templates being easy to use. You basically just type the things into the grid: . is an unused square, 0 is an empty square, and any number is a square of that number. Here, I will show you. This code:

{{Signpost/Crossword}}
{{Signpost/Crossword row|1 |2 |0 |4 |5 }}
{{Signpost/Crossword row|6 |0 |. |7 |0 }}
{{Signpost/Crossword row|8 |0 |0 |0 |0 }}
{{Signpost/Crossword row|9 |0 |. |10|0 }}
{{Signpost/Crossword row|11|0 |0 |0 |0 }}
|}

Produces this output:

.....
1
.
2
.
.
4
.
5
6
.
.
..
7
.
8
.
.
.
.
9
.
.
..
10
.
11
.
.
.
.

And this code, for clues:

{{Signpost/Crossword clues begin}}
{{Signpost/Crossword clues}}
{{Signpost/Crossword clues|Across}}
{{Signpost/Crossword clue |   1|Popular orange vegetable|CARROT}}
{{Signpost/Crossword clue |   3|Bone filling|MARROW}}
{{Signpost/Crossword clue |   5|Popular white flower|YARROW}}
{{Signpost/Crossword clues}}
{{Signpost/Crossword clues|Down}}
{{Signpost/Crossword clue |   2|Reminiscent of bow ammunition|ARROWY}}
{{Signpost/Crossword clue |   4|Characteristic of improper technique|ERRORY}}
{{Signpost/Crossword clue | 451|Mechanical model of the solar system|ORRERY}}
|}

Produces this:

 

Across

Popular orange vegetable  CARROT 
Popular white flower  YARROW 
Popular wheeled conveyance for 1-across and 3-across in the garden  BARROW 
Bone filling  MARROW 
 

Down

Reminiscent of bow ammunition  ARROWY 
Characteristic of improper technique  ERRORY 
451  Mechanical model of the solar system  ORRERY 


S
In this issue
+ Add a comment

Discuss this story

These comments are automatically transcluded from this article's talk page. To follow comments, add the page to your watchlist. If your comment has not appeared here, you can try purging the cache.

As a person who has wrestled with CSS for a long while, I enjoyed this! StaniStani 02:54, 13 January 2024 (UTC)[reply]

I have an idea: Maybe add text-transform: uppercase and text-align: center to the input boxes.

Crosswords are case-insensitive and are usually filled with uppercase letters. Also, there should be one character per input, so it should be centered. (I know that putting a maximum length on an input field is a technical impossibility in MediaWiki, but the users are still expected to type one character) QuickQuokka [⁠talkcontribs] 14:03, 16 January 2024 (UTC)[reply]

@QuickQuokka: Yeah, I banged my head against the task of limiting the fields to one character for a while. My conclusion was that this is simply impossible to do with the abilities we're granted by MediaWiki. The text-transform thing, though, I will be stealing, because that's smart. jp×g🗯️ 01:08, 13 February 2024 (UTC)[reply]
@JPxG: It's not stealing if it's CC BY-SA. I agreed to share my work with others when I signed up to use this platform
Also, is it possible to use JavaScript to limit the number of characters? I know you can't just load JS into articles, so it would have to be sitewide JS edited by an interface admin. QuickQuokka [⁠talkcontribs] 13:32, 13 February 2024 (UTC)[reply]
Not to spoil the fun of discovering ingenious wikitext hacks, but if/when WP:On-demand gadgets are implemented, crosswords could be done more like every other website. – SD0001 (talk) 18:14, 4 February 2024 (UTC)[reply]



       

The Signpost · written by many · served by Sinepost V0.9 · 🄯 CC-BY-SA 4.0