txp:css

The css tag is a Single Tag. This tag is used in the header of your document, where it will output the URL of the style sheet assigned in the Sections Subtab.

Syntax

<txp:css />

Attributes

Tag will accept the following attributes (case-sensitive):

n="style name"

Link to specified style.

format="value"

How to format output: either return complete (X)HTML link tag with necessary (X)HTML attributes, or only the StyleSheet's URL. Available values are link or url. Default is url.

rel="value"

(X)HTML rel attribute to be applied to link tag (when invoked with format=“link”). Default is stylesheet.

media="value"

(X)HTML media attribute to be applied to link tag (when invoked with format=“link”). Default is screen.

title="value"

(X)HTML title attribute to be applied to link tag (when invoked with format=“link”). Default is unset.

Examples

Output the URL to the section's default style sheet

<head>
<!-- ...tags... -->
<txp:css />
<!-- ...more tags... -->
</head>

Output the URL to a named style sheet

<head>
<!-- ...tags... -->
<txp:css n="style_name" />
<!-- ...more tags... -->
</head>

Output print and alternate style sheets

<head>
<!-- ...tags... -->
<txp:css n="plain" rel="alternate" title="Plain and Simple Style" />
<txp:css n="glossy" rel="alternate" title="Glossy Style"/>
 
<txp:css n="print" media="print" />
<!-- ...more tags... -->
</head>

Genealogy

Version 4.0.4

  • format, media, rel, title added.
txp/css.txt · Last modified: 2008/02/02 07:15 by hcgtv

Home Page | User Forums | Driven by DokuWiki
Copyright © 2008 xPattern