This is a documentation subpage for Template:Stupid t-shirt. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses TemplateStyles: |
Usage
editTakes two parameters:
- The text on the shirt
- (Optional):
shirt
, which specifies which pic to use, and can be1
or2
.
You can put basically anything on the shirt, but if you do complicated stuff (i.e. anything with an equals sign in it) you need to format the param as 1=
.
Code | Output | |
---|---|---|
{{stupid t-shirt|'''I DELETED THE MAIN PAGE AND ALL I GOT WAS THIS STUPID T-SHIRT'''|shirt=1}}
|
||
{{stupid t-shirt|1=<span style="font-size: 4em;">➠</span><br/>I'm With Tendentious|shirt=3}}
|
Technical notes =
editThis template was made almost entirely as an excuse to practice some CSS stuff, as well as test out various techniques for applying it with wikitext. One notable side effect is that it created some mildly funny templates. Some things worthy of note:
- Almost all style properties can be taken out of inline styling, and applied with TemplateStyles
- Except for the
perspective
property and therotate3d
value for thetransform
property. For whatever impenetrable reason, these cannot be saved into a page with the content model "Sanitized CSS"! So they MUST be applied in the tags themselves. This is kind of goofy, and you will see that the template code (and the stylesheet) look weird as a result, but it cannot be fixed without a phab ticket probably.
- Except for the
- Due to MediaWiki, images MUST be specified in
px
. The positioning for the other elements in this template is done withem
. This looks fine most of the time, becausepx
andem
have a fixed relationship most of the time... but sometimes they don't. We could easily fix this by making the image size be in em, but MediaWiki doesn't let us do this, so instead we have the image in a div and then we apply a CSS rule to all image elements in that div to set the width in em and set the height to auto.