9 - CSS module for per-page styling
nav_first.pngFirst: design:1
1 - Rate Module
Edited: 29 Apr 2012 00:01 by: GoVegan
Comments: 21
Tags:
nav_prev.pngPrevious: design:8
8 - NewPage Module
Edited: 11 Nov 2009 11:49 by: Steven Heynderickx
Comments: 17
Tags:
Last: design:32
32 - Parenthood Module
Edited: 11 Nov 2009 21:47 by: Steven Heynderickx
Comments: 7
Tags:
nav_last.png
Next: design:10
10 - Cross-site includes (CSI)
Edited: 11 Nov 2009 11:52 by: Steven Heynderickx
Comments: 29
Tags:
nav_next.png

9 - CSS module for per-page styling
Created on 07 Sep 2009 16:06
By pieterh

rating: +3+x
This is the Redirect module that redirects the browser directly to the "http://projects.wikidot.com/thread:109" page.

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.

Suggested attributes

  • show="true", to render the CSS in a [[code type="css"]] block
  • disable="true", renders the CSS inactive but remains on the page

Multiple modules

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.

Symbolic replacement

This section removed for now.

Comments: 13

Add a New Comment