209 lines
6.8 KiB
Plaintext
209 lines
6.8 KiB
Plaintext
head 1.4;
|
|
access;
|
|
symbols;
|
|
locks; strict;
|
|
comment @# @;
|
|
|
|
|
|
1.4
|
|
date 2007.01.16.04.11.59; author TWikiContributor; state Exp;
|
|
branches;
|
|
next 1.3;
|
|
|
|
1.3
|
|
date 2006.06.25.16.26.31; author TWikiContributor; state Exp;
|
|
branches;
|
|
next 1.2;
|
|
|
|
1.2
|
|
date 2006.04.01.05.55.30; author TWikiContributor; state Exp;
|
|
branches;
|
|
next 1.1;
|
|
|
|
1.1
|
|
date 2006.02.01.12.01.22; author TWikiContributor; state Exp;
|
|
branches;
|
|
next ;
|
|
|
|
|
|
desc
|
|
@new-topic
|
|
@
|
|
|
|
|
|
1.4
|
|
log
|
|
@buildrelease
|
|
@
|
|
text
|
|
@%META:TOPICINFO{author="TWikiContributor" date="1129333294" format="1.1" version="4"}%
|
|
|
|
---+!! %TWIKIWEB%.PatternSkin CSS Cookbook
|
|
|
|
*Questions and answers on how to customize the default look of TWiki for your own needs, using style sheets.* For configuring page elements, see PatternSkinCustomization.
|
|
|
|
%TOC%
|
|
|
|
---++ First Read: How to modify !PatternSkin styles
|
|
|
|
!PatternSkin uses 3 style sheets (attached to %TWIKIWEB%.PatternSkin):
|
|
* [[%PUBURLPATH%/%TWIKIWEB%/PatternSkin/layout.css][layout.css]] - the positioning of main page elements (blocks), widths and heights
|
|
* [[%PUBURLPATH%/%TWIKIWEB%/PatternSkin/style.css][style.css]] - fonts, sizes, margins and paddings
|
|
* [[%PUBURLPATH%/%TWIKIWEB%/PatternSkin/colors.css][colors.css]] - border colors, text colors and background colors
|
|
|
|
When customizing your TWiki installation, you can either choose to completely rewrite all css styles, or to selectively override some styles. The latter option is by far less time consuming, but all depends on your graphical wishes.
|
|
|
|
---+++ Changing the color scheme
|
|
Have a look at PatternSkinColorSettings.
|
|
|
|
---+++ When you need lots of graphic changes: Rewriting CSS
|
|
* Create a new topic that will contain your new CSS files
|
|
* Attach 3 new style sheets to the topic
|
|
* Point the CSS variables in [[%TWIKIWEB%.TWikiPreferences]] to your new files:
|
|
<pre>
|
|
* <nop>Set TWIKILAYOUTURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/layout.css
|
|
* <nop>Set TWIKISTYLEURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/style.css
|
|
* <nop>Set TWIKICOLORSURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/colors.css
|
|
</pre>
|
|
|
|
---+++ When you need to make small adjustments: Adding to existing CSS
|
|
With CSS you cannot remove already defined classes, you can only add to it, or overwrite existing styles. <br />
|
|
Overriding default CSS is done with 3 variables: =USERLAYOUTURL=, =USERSTYLEURL=, =USERCOLORSURL=.
|
|
* Create a new topic that will contain your new CSS files
|
|
* Attach 1, 2 or 3 new style sheets to the topic, dependent on your CSS setup (if you don't change much, you might as well put everything in one CSS file, layout, margins and colors)
|
|
* Point the CSS variables in [[%TWIKIWEB%.TWikiPreferences]] to your new files (below the =TWIKIXXXURL= variables):
|
|
<pre>
|
|
* <nop>Set USERLAYOUTURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/layout.css
|
|
* <nop>Set USERSTYLEURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/style.css
|
|
* <nop>Set USERCOLORSURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/colors.css
|
|
</pre>
|
|
* If you use only little CSS and you've only attached one file, write:
|
|
<pre>
|
|
* Set USERSTYLEURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/style.css
|
|
</pre>
|
|
|
|
Instead of setting these variables in [[%TWIKIWEB%.TWikiPreferences]], you can set these in your home topic, or in any other topic. Setting style URL variables in:
|
|
* [[%TWIKIWEB%.TWikiPreferences]]: the style is visible for all users, site-wide
|
|
* WebPreferences: the style is visible for all users in one web
|
|
* Home topic: the style is visible for that one user when viewing the site
|
|
* Some other topic: the style is only visible in that one topic
|
|
|
|
User styles are always loaded after TWiki styles.
|
|
|
|
The rest of this topic shows examples of small CSS changes.
|
|
|
|
---++ Recipes
|
|
|
|
---+++ Hide the left bar
|
|
|
|
See example at: PatternSkinCssCookbookNoLeftBar
|
|
|
|
---+++ Use different fonts
|
|
|
|
See example at: PatternSkinCssCookbookFonts
|
|
|
|
---+++ No top bar
|
|
|
|
See example at: PatternSkinCssCookbookNoTopBar
|
|
|
|
---+++ Centered page
|
|
|
|
See example at: PatternSkinCssCookbookCenterPage
|
|
|
|
---+++ Centered page (with a border around the page)
|
|
|
|
See example at: PatternSkinCssCookbookCenterPageBorder
|
|
|
|
---+++ Setting !EditTablePlugin styles
|
|
|
|
See example at: PatternSkinCssCookbookEditTableStyle
|
|
|
|
---++ Style sheet documentation
|
|
See %TWIKIWEB%.PatternSkinCss for documentation of !PatternSkin CSS classes
|
|
@
|
|
|
|
|
|
1.3
|
|
log
|
|
@buildrelease
|
|
@
|
|
text
|
|
@d1 1
|
|
a1 2
|
|
%META:TOPICINFO{author="TWikiContributor" date="1129333294" format="1.1" version="3"}%
|
|
|
|
d9 1
|
|
a9 1
|
|
---++ Introduction
|
|
d18 3
|
|
d31 1
|
|
a31 1
|
|
---+++ When you need small adjustments: Adding to existing CSS
|
|
d82 3
|
|
@
|
|
|
|
|
|
1.2
|
|
log
|
|
@buildrelease
|
|
@
|
|
text
|
|
@d1 1
|
|
a1 1
|
|
%META:TOPICINFO{author="TWikiContributor" date="1129333294" format="1.1" version="2"}%
|
|
d26 1
|
|
a26 1
|
|
* <nop>Set TWIKICOLORURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/colors.css
|
|
@
|
|
|
|
|
|
1.1
|
|
log
|
|
@buildrelease
|
|
@
|
|
text
|
|
@d1 1
|
|
a1 1
|
|
%META:TOPICINFO{author="TWikiContributor" date="1129333294" format="1.1" version="1"}%
|
|
d13 3
|
|
a15 3
|
|
* [[%PUBURLPATH%/%TWIKIWEB%/PatternSkin/layout.css][layout.css]] - the positioning of main page elements (blocks), widths and heights
|
|
* [[%PUBURLPATH%/%TWIKIWEB%/PatternSkin/style.css][stylestyle.css]] - fonts, sizes, margins and paddings
|
|
* [[%PUBURLPATH%/%TWIKIWEB%/PatternSkin/colors.css][colors.css]] - border colors, text colors and background colors
|
|
d20 3
|
|
a22 3
|
|
* Create a new topic that will contain your new CSS files
|
|
* Attach 3 new style sheets to the topic
|
|
* Point the CSS variables in [[%TWIKIWEB%.TWikiPreferences]] to your new files:
|
|
d24 3
|
|
a26 3
|
|
* <nop>Set TWIKILAYOUTURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/layout.css
|
|
* <nop>Set TWIKISTYLEURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/style.css
|
|
* <nop>Set TWIKICOLORURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/colors.css
|
|
d32 3
|
|
a34 3
|
|
* Create a new topic that will contain your new CSS files
|
|
* Attach 1, 2 or 3 new style sheets to the topic, dependent on your CSS setup (if you don't change much, you might as well put everything in one CSS file, layout, margins and colors)
|
|
* Point the CSS variables in [[%TWIKIWEB%.TWikiPreferences]] to your new files (below the =TWIKIXXXURL= variables):
|
|
d36 3
|
|
a38 3
|
|
* <nop>Set USERLAYOUTURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/layout.css
|
|
* <nop>Set USERSTYLEURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/style.css
|
|
* <nop>Set USERCOLORSURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/colors.css
|
|
d40 1
|
|
a40 1
|
|
* If you use only little CSS and you've only attached one file, write:
|
|
d42 1
|
|
a42 1
|
|
* Set USERSTYLEURL = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/YourNewTopic/style.css
|
|
d46 4
|
|
a49 4
|
|
* [[%TWIKIWEB%.TWikiPreferences]]: the style is visible for all users, site-wide
|
|
* WebPreferences: the style is visible for all users in one web
|
|
* Home topic: the style is visible for that one user when viewing the site
|
|
* Some other topic: the style is only visible in that one topic
|
|
d58 1
|
|
a58 1
|
|
|
|
@
|