Page MenuHomePhorge

Obsolete HTML in CreateWiki
Closed, ResolvedPublic

Description

If users don't select importing starter.shoutwiki when creating a wiki, the Main_Page created contains

<big>Welcome to your new site!</big><br/>
This is your new site! Feel free to start editing right away!

I'm unsure where the text originates, but I suspect the CreateWiki extension.
<big> has been removed from the HTML specification, so it's not even deprecated. It's gone. A functional, compatible option would be something like

<span style="font-size: larger;">Welcome to your new site!</span><br/>
This is your new site! Feel free to start editing right away!

Event Timeline

It's in the i18n files - "createwiki-newmainpage" is the message. Will need to be changed in all language files.

Don't use inline styling, it's harder to maintain and also decreases customizability because of CSS specificity. ( https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity ) It'd be better to add a class, (e.g class="welcome-text") and then style it via

.welcome-text {
   font-size: /*whatever size*/em;
}

em units are used because they're relative, meaning their size changes based on the parent element. Compared to px units, which are absolute values. And if you want finer tuned control over your elements, use a value instead of a defined keyword.

The em is a very useful unit in CSS, since it automatically adapts its length relative to the font that the reader chooses to use. -Mozilla Developer Network

Readability is important, so I'd recommend you usually use em units instead.

https://developer.mozilla.org/en-US/docs/Web/CSS/font-size

Yes, but this is createwiki, which is a mess :P If I was rewriting the whole extension, then I'd have bothered to css it.

What size em corresponds to "large"/"big"? I don't have createwiki installed locally to test such things.

Don't use inline styling, it's harder to maintain and also decreases customizability because of CSS specificity. ( https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity ) It'd be better to add a class,

Which then means CreateWiki has to create the local CSS on the new wiki. The current solution is fine, considering the Main Page in its then form probably won't exist for too long.

...
em units are used because they're relative ...

.sw-whatever {
	font-size: larger;
}

is also relative based on the parent. It's essentially the same as (also obsolete) <font size="+1"> and the same as <big>.

For CreateWiki, though, I'd agree that creating Common.css is overkill. The starter wiki pages are meant to be throw-away. Don't over-think them.

In T124#1700, @CJC wrote:

It's in the i18n files - "createwiki-newmainpage" is the message. Will need to be changed in all language files.

If I create these pages on hub, would that provide a temporary fix until the extension is updated? Or does the extension grab the message on the wiki it's creating, making any hub message useless?

CreateWiki exists only on hub, duh....

@CJC fixed this a while ago, CW has recently been updated so there's nothing else to be done here.

This comment was removed by lewiscawte.