Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
162 lines (150 sloc) 3.99 KB
__NAME__ purpose
generate CSS file and create a link to it
__END__
__NAME__ missing
no_imagedir option
__END__
__NAME__ synopsis
<row>
<entry>
<arg choice='plain'>name</arg>
</entry>
<entry>Yes</entry><entry>Yes</entry>
<entry></entry>
<entry>
Name of the &glos-CSS; file. The name will be forced to lowercase, and
the ".css" extension will be added unconditionally.
</entry>
</row>
<row>
<entry>
<arg choice='plain'>basefile</arg>
</entry>
<entry></entry><entry></entry>
<entry></entry>
<entry>
If the <option>Variable</option> is being used dynamically via
<option>DirConfig</option>, this should be the filename the CSS is contained
in. The file will be checked for modification time, and the CSS will be
rebuilt if it's older than the source file.
</entry>
</row>
<row>
<entry>
<arg choice='plain'>imagedir</arg>
</entry>
<entry></entry><entry></entry>
<entry>Value of the <option>ImageDir</option> directive</entry>
<entry>
Image prefix to use.
</entry>
</row>
<row>
<entry>
<arg choice='plain'>no_imagedir</arg>
</entry>
<entry></entry><entry></entry>
<entry>0</entry>
<entry>
Don't prepend value of the <arg choice='plain'>imagedir</arg> option to
the generated link URL?
</entry>
</row>
<row>
<entry>
<arg choice='plain'>literal</arg>
</entry>
<entry></entry><entry></entry>
<entry></entry>
<entry>
Literal, in-place &glos-CSS; definition. See <xref linkend="css_examples"/>.
</entry>
</row>
<row>
<entry>
<arg choice='plain'>media</arg>
</entry>
<entry></entry><entry></entry>
<entry></entry>
<entry>
The <arg choice='plain'>media</arg> attribute for the &glos-link; &glos-HTML; tag.
For example, <literal>PRINT</literal>.
</entry>
</row>
&ROW_MODE_0644;
<row>
<entry>
<arg choice='plain'>output_dir</arg>
</entry>
<entry></entry><entry></entry>
<entry><literal>images</literal></entry>
<entry>
Directory to place generated files to. It makes sense to match this with
the <option>ImageDir</option> value.
</entry>
</row>
<row>
<entry>
<arg choice='plain'>relative</arg>
</entry>
<entry></entry><entry></entry>
<entry>0</entry>
<entry>
Copy the directory hierarchy in the output directory. Say, the
<tag>css</tag> tag on the <filename>info/index.html</filename> page
would produce output in <filename>images/info/theme_css.css</filename>.
</entry>
</row>
<row>
<entry>
<arg choice='plain'>timed</arg>
</entry>
<entry></entry><entry></entry>
<entry></entry>
<entry>
Regenerate the file on a timed basis? Default unit are minutes,
but you can pass any standard &glos-interval;.
</entry>
</row>
&TAG_NON_CONTAINER;
__END__
__NAME__ description
This tag builds a &glos-CSS; file (from a <option>Variable</option> or other
sources) and generates a link to it.
</para><para>
Note that if you're providing the <arg choice='plain'>literal</arg> argument,
the CSS file won't be rebuilt when you change the literal, in-place
definition changes. To cause
rebuild, you must explicitly delete the generated
<filename>.css</filename> file.
__END__
__NAME__ notes
When &IC; is ran in RPC &glos-ic-run-mode;, the
&pragma-dynamic_variables_file_only; pragma must be enabled to activate
the standard <varname>THEME_CSS</varname> update mechanism. Namely, that
will force &IC; to always read the latest copy of <varname>THEME_CSS</varname>,
instead of using cached data.
__END__
__NAME__ example: Simplest tag example
<programlisting>
[css THEME_CSS]
</programlisting>
In the example above, the <tag>css</tag> will look for the
<filename>images/theme_css.css</filename>, and generate an HTML link to it
(&lt;link rel="stylesheet" href="/images/theme_css.css"&gt;).
__END__
__NAME__ example2: Using literal
You can either save your CSS in a &glos-scratch;
variable, or provide it
directly in-place. Here are both variants:
<programlisting>
[set my_css]
.title { background-color: #336699; }
[/set]
[css name="test_css1" literal="[scratch my_css]"]
[css name="test_css2" literal="body { background-color: yellow; }"]
</programlisting>
__END__
__NAME__ author
&mheins;, &ICDEVGROUP;
__END__