#Enable Extension:TemplateStyles

9 messages · Page 1 of 1 (latest)

stiff linden
#

Extension:TemplateStyles is a MediaWiki extension that wiki.gg supports which allows the separation of CSS from template pages. This reduces clutter massively and puts less stress on Common.css to do most of the heavy lifting.

Not only would this make it easier to edit a template's CSS, but also understandably motivate more people to put more effort into it, since it would be less of a hassle.

MediaWiki

TemplateStyles is a parser extension that allows users to store custom CSS code on wiki pages and to embed these styles into articles via the ‎<templatestyles> tag. The extension allows only a safe subset of CSS syntax stored in embeddable style pages. This is powered by the css-sanitizer library.
Editors are encouraged to include styles for a...

#

Editing templates without it really is a pain

#
Samurai vs Zombies Defense Wiki

.paper-scroll-quote {
display: flex;
justify-content: center;
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6));
font-family: "Reggae One", serif;
margin-bottom: 15px;
}
.paper-scroll-quote.noexcerpt {
position: relative;
display: table;
background: url(/images/5/50/Paper_scroll_middle.png) no-repeat...

stiff linden
#

There's actually a styles.css page on the wiki already lol
https://plantsvszombies.wiki.gg/wiki/Template:YT/styles.css

Plants vs. Zombies Wiki

.embedvideo figcaption {
font-size: 100%;
padding: 3px 0;
text-align: center;
background-color: rgb(30, 30, 30);
color: white;
margin-top: 3px;
}
figure.embedvideo.mw-halign-center {
margin: auto;
}
.embedvideo {
margin: 5px;
}

#

but it hasn't applied to the template yet because the extension needs to be enabled

stiff linden
#

I've sent a request to wiki.gg to get the extension enabled

#

so hopefully that gets approved soon!

stiff linden
#

It's now enabled!

Keep in mind that you'll need the CSS pages to be "Sanitised CSS"