Difference: PatternSkinCssCookbook (1 vs. 5)

Revision 52005-10-14 - TWikiContributor

Line: 1 to 1
 
Changed:
<
<

PatternSkin CSS Cookbook

>
>

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.
Line: 8 to 8
 

First Read: How to modify PatternSkin styles

Changed:
<
<
PatternSkin uses 3 style sheets (attached to PatternSkin):
  • layout.css - the positioning of main page elements (blocks), widths and heights
  • style.css - fonts, sizes, margins and paddings
  • colors.css - border colors, text colors and background colors
>
>
PatternSkin uses 3 style sheets (attached to PatternSkin):
  • layout.css - the positioning of main page elements (blocks), widths and heights
  • style.css - fonts, sizes, margins and paddings
  • 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.
Line: 21 to 21
 

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
Changed:
<
<
>
>
 

Changed:
<
<
    • Set TWIKILAYOUTURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/layout.css
    • Set TWIKISTYLEURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/style.css
    • Set TWIKICOLORSURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/colors.css
>
>
    • Set TWIKILAYOUTURL = %PUBURLPATH%/%SYSTEMWEB%/YourNewTopic/layout.css
    • Set TWIKISTYLEURL = %PUBURLPATH%/%SYSTEMWEB%/YourNewTopic/style.css
    • Set TWIKICOLORSURL = %PUBURLPATH%/%SYSTEMWEB%/YourNewTopic/colors.css
 

When you need to make small adjustments: Adding to existing CSS

Line: 33 to 33
 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)
Changed:
<
<
>
>
 

Changed:
<
<
    • Set USERLAYOUTURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/layout.css
    • Set USERSTYLEURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/style.css
    • Set USERCOLORSURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/colors.css
>
>
    • Set USERLAYOUTURL = %PUBURLPATH%/%SYSTEMWEB%/YourNewTopic/layout.css
    • Set USERSTYLEURL = %PUBURLPATH%/%SYSTEMWEB%/YourNewTopic/style.css
    • Set USERCOLORSURL = %PUBURLPATH%/%SYSTEMWEB%/YourNewTopic/colors.css
 
  • If you use only little CSS and you've only attached one file, write:

Changed:
<
<
    • Set USERSTYLEURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/style.css
>
>
    • Set USERSTYLEURL = %PUBURLPATH%/%SYSTEMWEB%/YourNewTopic/style.css
 
Changed:
<
<
Instead of setting these variables in TWiki.TWikiPreferences, you can set these in your home topic, or in any other topic. Setting style URL variables in:
>
>
Instead of setting these variables in TWiki.TWikiPreferences, you can set these in your home topic, or in any other topic. Setting style URL variables in:
 
  • 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
Line: 81 to 81
 See example at: PatternSkinCssCookbookEditTableStyle

Style sheet documentation

Changed:
<
<
See PatternSkinCss for documentation of PatternSkin CSS classes
>
>
See PatternSkinCss for documentation of PatternSkin CSS classes

Revision 42005-10-14 - TWikiContributor

Line: 1 to 1
Deleted:
<
<
 

PatternSkin CSS Cookbook

Line: 7 to 6
 
Changed:
<
<

Introduction

>
>

First Read: How to modify PatternSkin styles

  PatternSkin uses 3 style sheets (attached to PatternSkin):
  • layout.css - the positioning of main page elements (blocks), widths and heights
Line: 16 to 15
  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.
Added:
>
>

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
Line: 26 to 28
 
    • Set TWIKICOLORSURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/colors.css
Changed:
<
<

When you need small adjustments: Adding to existing CSS

>
>

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.
Overriding default CSS is done with 3 variables: USERLAYOUTURL, USERSTYLEURL, USERCOLORSURL.
  • Create a new topic that will contain your new CSS files
Line: 77 to 79
 

Setting EditTablePlugin styles

See example at: PatternSkinCssCookbookEditTableStyle

Added:
>
>

Style sheet documentation

See PatternSkinCss for documentation of PatternSkin CSS classes

Revision 32005-10-14 - TWikiContributor

Line: 1 to 1
 

PatternSkin CSS Cookbook

Line: 23 to 23
 
      * Set TWIKILAYOUTURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/layout.css
      * Set TWIKISTYLEURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/style.css

Changed:
<
<
    • Set TWIKICOLORURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/colors.css
>
>
    • Set TWIKICOLORSURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/colors.css
 

When you need small adjustments: Adding to existing CSS

Revision 22005-10-14 - TWikiContributor

Line: 1 to 1
 

PatternSkin CSS Cookbook

Line: 11 to 11
  PatternSkin uses 3 style sheets (attached to PatternSkin):
  • layout.css - the positioning of main page elements (blocks), widths and heights
Changed:
<
<
>
>
  • style.css - fonts, sizes, margins and paddings
 
  • 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.

Revision 12005-10-14 - TWikiContributor

Line: 1 to 1
Added:
>
>

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.

Introduction

PatternSkin uses 3 style sheets (attached to PatternSkin):

  • layout.css - the positioning of main page elements (blocks), widths and heights
  • stylestyle.css - fonts, sizes, margins and paddings
  • 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.

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 TWiki.TWikiPreferences to your new files:
		* Set TWIKILAYOUTURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/layout.css
		* Set TWIKISTYLEURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/style.css
		* Set TWIKICOLORURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/colors.css
 

When you need small adjustments: Adding to existing CSS

With CSS you cannot remove already defined classes, you can only add to it, or overwrite existing styles.
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 TWiki.TWikiPreferences to your new files (below the TWIKIXXXURL variables):
		* Set USERLAYOUTURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/layout.css
		* Set USERSTYLEURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/style.css
		* Set USERCOLORSURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/colors.css
 
  • If you use only little CSS and you've only attached one file, write:
		* Set USERSTYLEURL = %PUBURLPATH%/%TWIKIWEB%/YourNewTopic/style.css
 

Instead of setting these variables in TWiki.TWikiPreferences, you can set these in your home topic, or in any other topic. Setting style URL variables in:

  • TWiki.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

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.PatternSkinCssCookbook.