It can be very useful to add CSS to a particular page, but this is currently not possible without some admin-level work and affecting all pages in a category. The main use case for per-page CSS is to allow people to customize 'their' pages on shared sites such as HaveMyCV.com, profiles.wikidot.com or any other social site that offers page-based user spaces.
This is a sketch for a new CSS module that lets the page author inject custom CSS into the page:
[[module CSS]]
Some CSS code
[[/module]]
The module can be used anywhere in the page but will put all CSS into the <head> of the page.
If multiple CSS modules are used on the same page, they will all (except disabled modules) be injected into the <head> of the page, in the order that the CSS modules appear on the page.
This section removed for now.
It's nice and useful.
If it's used smartly, you can do thing like this:
If it's used non-smartly, this can lead to vandalism. But vandalism can be done already
Piotr Gabryjeluk
visit my blog
In fact in-page CSS is essential for making building blocks.
Portfolio
I am not really sure about what you mean with Symbolic insertion, so the thought that jumped to my mind is maybe a stupid one but…
if %%css%% inserts the value of the first tag…
maybe %%css{n}%% can insert the Nth value
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
I'm thinking about 'tag variables', which are tags in the form 'name:value', so that setting a new value replaces existing ones. This would let you do things like 'state:_open' in an issue tracker, or 'assign:steven', or 'status:green'.
That's independent of the CSS module. There would be only one value, so no {n}.
I'll clarify the symbolic insertion section.
Portfolio
pieterh wrote: I'll clarify the symbolic insertion section.
Yep, that's definitely clarified. No room for misunderstanding now! =)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
This looks useful. Can't say I'd use it regularly, but well worth implementing in my opinion.
Not sure I understand the "suggested attributes" section though. Are you saying that it should be possible to hide a code block?
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Well, the module shouldn't be visible at all, you know? It's just adding CSS to the page.
But on places like the Wikidot Community Forums, we may want to show the CSS code we're using, and it doesn't make much sense to duplicate code on a page. So by choosing the having show="true", we are making the code visible, without creating a duplicate [[code]] block with the same data within it.
Okay, that sounds logical.
What about show = "true | false" , instead of two separate attributes, show and disable ?
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Well, you have two independent options:
You need two options, or one option with four values (clumsy).
Portfolio
Huh? Shall I requote myself?
Edit: I see the page has been updated
I don't understand the second option… if you don't want the code to appear in the html head, then why would you put it in a CSS module?
I can think of a few use cases. E.g. you have two or three CSS schemes you want to switch between, but have all visible. Or you are working on some CSS but it's caused some problems and you want to disable it for now, but still have visible.
Portfolio
Hmm. And what if one were to use the code:
Then you could make an include on another page:
Good idea Pieter :D
Wow XD good idea James!
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)