stylesheet-theme-source.mustache revision d9ebfd930512585c2a500e2aea7a6a96578df907
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<!doctype html>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<html lang="en">
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff <title>Style Sheets in HTML documents</title>
fe0e87d09da3f6bc93c56f8cf194455b06039fd4Jeff Conniff <link rel="stylesheet" type="text/css" href="<?php echo($assetsDirectory); ?>w3.css">
fe0e87d09da3f6bc93c56f8cf194455b06039fd4Jeff Conniff <link rel="stylesheet" type="text/css" href="<?php echo($assetsDirectory); ?>theme.css">
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<div class="navbar" align="center">
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff <a href="http://www.w3.org/TR/html401/struct/objects.html">
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniffprevious</a> <a href="http://www.w3.org/TR/html401/present/graphics.html">next</a> <a href="http://www.w3.org/TR/html401/cover.html#minitoc">contents</a> <a href="http://www.w3.org/TR/html401/index/elements.html">
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniffelements</a> <a href="http://www.w3.org/TR/html401/index/attributes.html">attributes</a> <a href="http://www.w3.org/TR/html401/index/list.html">index</a>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<h1 align="center"><a name="h-14">14</a> <a name="stylesheets">Style
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff ConniffSheets</a></h1>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<div class="subtoc">
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<p><strong>Contents</strong></p>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.1">Introduction to style sheets</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.2">Adding style to HTML</a>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.2.1">Setting the default style sheet
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Connifflanguage</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.2.2">Inline style information</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.2.3">Header style information: the <samp class="einst2">STYLE</samp> element</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.2.4">Media types</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.3">External style sheets</a>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.3.1">Preferred and alternate style
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniffsheets</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.3.2">Specifying external style
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniffsheets</a></li>
5cdd1d5bb84599836fa8ad9e8ced04ff5bceabccJeff Conniff<li><a class="tocxref" href="#h-14.4">Cascading style sheets</a>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.4.1">Media-dependent cascades</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.4.2">Inheritance and cascading</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.5">Hiding style data from user
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniffagents</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<li><a class="tocxref" href="#h-14.6">Linking to style sheets with HTTP
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniffheaders</a></li>
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniff<h2><a name="h-14.1">14.1</a> <span class="index-inst" title="style
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniffsheet::introduction to"><a name="idx-style_sheet-3">Introduction to style
5cdd1d5bb84599836fa8ad9e8ced04ff5bceabccJeff Conniffsheets</a></span></h2>
5cdd1d5bb84599836fa8ad9e8ced04ff5bceabccJeff Conniff<p>Style sheets represent a major breakthrough for Web page designers,
2ce1b062532c7895a7093b67252dbaf239fbe6a7Jeff Conniffexpanding their ability to improve the appearance of their pages. In the
"special.css"), sets the text color of a paragraph to green and surrounds it
<pre>P.special {
<p>Authors may link this style sheet to their source HTML document with the <a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">
(Cascading Style Sheets) language <a rel="biblioentry" href="http://www.w3.org/TR/html401/references.html#ref-CSS1" class="informref">[CSS1]</a>, but other style
<dt><span class="index-inst" title="accessibility::and style sheets"><a name="idx-accessibility"><b>Media dependencies</b></a></span></dt>
e.g., graphical displays for computers running Windows, Macintosh OS, and X11,
included in <a rel="biblioentry" href="http://www.w3.org/TR/html401/references.html#ref-CSS2" class="informref">[CSS2]</a> expresses generally accepted default style information
language "Cascading Style Sheets" (<a rel="biblioentry" href="http://www.w3.org/TR/html401/references.html#ref-CSS1" class="informref">[CSS1]</a>), abbreviated CSS,
<p>The <a href="http://www.w3.org/TR/html401/types.html#type-style">syntax of style data</a> depends on
<h3><a name="h-14.2.1">14.2.1</a> <span class="index-inst" title="default::style sheet language|style sheet
language::default|HTTP::Content-Style-Type header|Content-Style-Type header"><a name="default-style">Setting the default style sheet language</a></span></h3>
<p>Authors should use the <a href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref"><samp class="einst">META</samp></a> element to set the default style
should put the following declaration in the <a href="http://www.w3.org/TR/html401/struct/global.html#edef-HEAD" class="noxref"><samp class="einst">
<pre><META http-equiv="Content-Style-Type" content="text/css">
above <a href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref"><samp class="einst">META</samp></a> declaration is equivalent to the HTTP header:</p>
<pre>Content-Style-Type: text/css
<li>If any <a href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref"><samp class="einst">META</samp></a> declarations specify the "Content-Style-Type",
<li>Otherwise, the default style sheet language is "text/css".</li>
<p>Documents that include elements that set the <a href="http://www.w3.org/TR/html401/present/styles.html#adef-style" class="noxref"><samp class="ainst">style</samp></a>
generate default style sheet language information (typically a <a href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref"><samp class="einst">
default of "text/css".</p>
<dt><a name="adef-style"><samp class="adef">style</samp></a> = <a href="http://www.w3.org/TR/html401/types.html#type-style"><em>style</em></a> <a href="http://www.w3.org/TR/html401/types.html#case-neutral">[CN]</a></dt>
<p><span class="index-inst" title="style sheet::inline rules"><a name="idx-style_sheet-4">The</a></span> <a href="http://www.w3.org/TR/html401/types.html#type-style">
syntax</a> of the value of the <a href="http://www.w3.org/TR/html401/present/styles.html#adef-style" class="noxref">
<samp class="ainst">style</samp></a> attribute is determined by the <a href="#default-style">default style sheet language</a>. For example, for [[CSS2]]
<pre class="dtd-fragment"><!ELEMENT <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">STYLE</samp></a> - - <a href="http://www.w3.org/TR/html401/sgml/dtd.html#StyleSheet">%StyleSheet</a> -- style info -->
<a href="http://www.w3.org/TR/html401/sgml/dtd.html#i18n">%i18n;</a> -- <a href="http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang">lang</a>, <a href="http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir">dir</a>, for use with title --
<a href="http://www.w3.org/TR/html401/present/styles.html#adef-type-STYLE" class="noxref"><samp class="ainst-STYLE">type</samp></a> <a href="http://www.w3.org/TR/html401/sgml/dtd.html#ContentType">%ContentType;</a> #REQUIRED -- content type of style language --
<a href="http://www.w3.org/TR/html401/present/styles.html#adef-media" class="noxref"><samp class="ainst-STYLE">media</samp></a> <a href="http://www.w3.org/TR/html401/sgml/dtd.html#MediaDesc">%MediaDesc;</a> #IMPLIED -- designed for use with these media --
<a href="http://www.w3.org/TR/html401/struct/global.html#adef-title" class="noxref"><samp class="ainst-STYLE">title</samp></a> <a href="http://www.w3.org/TR/html401/sgml/dtd.html#Text">%Text;</a> #IMPLIED -- advisory title --
<dt><a name="adef-type-STYLE"><samp class="adef">type</samp></a> = <a href="http://www.w3.org/TR/html401/types.html#type-content-type"><em>content-type</em></a> <a href="http://www.w3.org/TR/html401/types.html#case-insensitive">[CI]</a></dt>
<dt><a name="adef-media"><samp class="adef">media</samp></a> = <a href="http://www.w3.org/TR/html401/types.html#type-media-descriptors"><em>media-descriptors</em></a> <a href="http://www.w3.org/TR/html401/types.html#case-insensitive">[CI]</a></dt>
<li><a href="http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang" class="noxref"><samp class="ainst">lang</samp></a> (<a href="http://www.w3.org/TR/html401/struct/dirlang.html#language-info">language information</a>), <a href="http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir" class="noxref"><samp class="ainst">
dir</samp></a> (<a href="http://www.w3.org/TR/html401/struct/dirlang.html#bidirection">text
<li><a href="http://www.w3.org/TR/html401/struct/global.html#adef-title" class="noxref"><samp class="ainst">title</samp></a> (<a href="http://www.w3.org/TR/html401/struct/global.html#title">element
<p>The <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">
STYLE</samp></a> element allows authors to put style sheet rules in the <span class="index-inst" title="style sheet::rules in HEAD"><a name="idx-style_sheet-5">head</a></span> of the document. HTML permits any number of
<a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">
STYLE</samp></a> elements in the <a href="http://www.w3.org/TR/html401/struct/global.html#edef-HEAD" class="noxref"><samp class="einst">HEAD</samp></a> section of a document.</p>
style sheet language used by a <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref">
<samp class="einst">STYLE</samp></a> element, must hide the contents of the <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">
<p>The <a href="http://www.w3.org/TR/html401/types.html#type-style">syntax of style data</a> depends on
<a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">
STYLE</samp></a> element than in the <a href="http://www.w3.org/TR/html401/present/styles.html#adef-style" class="noxref"><samp class="ainst">style</samp></a> attribute. For example, with CSS,
rules may be declared within a <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref">
<li>All instances of a specific HTML element (e.g., all <a href="http://www.w3.org/TR/html401/struct/text.html#edef-P" class="noxref"><samp class="einst">P</samp></a>
elements, all <a href="http://www.w3.org/TR/html401/struct/global.html#edef-H1" class="noxref"><samp class="einst">H1</samp></a> elements, etc.)</li>
<li>All instances of an HTML element belonging to a specific class (i.e., whose
<a href="http://www.w3.org/TR/html401/struct/global.html#adef-class" class="noxref"><samp class="ainst">
<li>Single instances of an HTML element (i.e., whose <a href="http://www.w3.org/TR/html401/struct/global.html#adef-id" class="noxref"><samp class="ainst">
<p>The following CSS <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">STYLE</samp></a> declaration puts a border around every <a href="http://www.w3.org/TR/html401/struct/global.html#edef-H1" class="noxref"><samp class="einst">
<STYLE type="text/css">
<p>To specify that this style information should only apply to <a href="http://www.w3.org/TR/html401/struct/global.html#edef-H1" class="noxref"><samp class="einst">
<STYLE type="text/css">
H1.myclass {border-width: 1; border: solid; text-align: center}
<a href="http://www.w3.org/TR/html401/struct/global.html#edef-H1" class="noxref"><samp class="einst">
H1</samp></a>, set the <a href="http://www.w3.org/TR/html401/struct/global.html#adef-id" class="noxref">
<STYLE type="text/css">
<p><span class="index-inst" title="style sheet::used with DIV and SPAN"><a name="idx-style_sheet-6">Although style information</a></span> may be set for
almost every HTML element, two elements, <a href="http://www.w3.org/TR/html401/struct/global.html#edef-DIV" class="noxref"><samp class="einst">
DIV</samp></a> and <a href="http://www.w3.org/TR/html401/struct/global.html#edef-SPAN" class="noxref">
not impose any presentation semantics (besides <a href="http://www.w3.org/TR/html401/struct/global.html#block-inline">block-level vs. inline</a>). When combined
particularly when used with the <a href="http://www.w3.org/TR/html401/struct/global.html#adef-class" class="noxref"><samp class="ainst">class</samp></a> and <a href="http://www.w3.org/TR/html401/struct/global.html#adef-id" class="noxref"><samp class="ainst">
<p>In the following example, we use the <a href="http://www.w3.org/TR/html401/struct/global.html#edef-SPAN" class="noxref"><samp class="einst">
<STYLE type="text/css">
SPAN.sc-ex { font-variant: small-caps }
<p>In the following example, we use <a href="http://www.w3.org/TR/html401/struct/global.html#edef-DIV" class="noxref"><samp class="einst">DIV</samp></a> and the <a href="http://www.w3.org/TR/html401/struct/global.html#adef-class" class="noxref"><samp class="ainst">
style information could be reused for other abstract sections by setting the <a href="http://www.w3.org/TR/html401/struct/global.html#adef-class" class="noxref"><samp class="ainst">
<STYLE type="text/css">
DIV.Abstract { text-align: justify }
characteristics of the media where the document is to be rendered (e.g.,
browsers, braille-based tactile devices, etc.). By specifying the <a href="http://www.w3.org/TR/html401/present/styles.html#adef-media" class="noxref"><samp class="ainst">media</samp></a>
selectively. Please consult the list of recognized <a href="http://www.w3.org/TR/html401/types.html#type-media-descriptors">media descriptors</a>.</p>
<p>The following sample declarations apply to <a href="http://www.w3.org/TR/html401/struct/global.html#edef-H1" class="noxref"><samp class="einst">
<STYLE type="text/css" media="projection">
<STYLE type="text/css" media="print">
<pre> <STYLE type="text/css" media="aural">
another for users with weak vision (e.g., large fonts). User agents should
<p>User agents must respect <a href="http://www.w3.org/TR/html401/types.html#type-media-descriptors">
sheet::specification of external|link::and external style sheets"><a name="specifying-external">Specifying external style sheets</a></span></h3>
<a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">
<li>Set the value of <a href="http://www.w3.org/TR/html401/struct/links.html#adef-href" class="noxref">
The value of <a href="http://www.w3.org/TR/html401/struct/links.html#adef-href" class="noxref"><samp class="ainst">href</samp></a> is a <a href="http://www.w3.org/TR/html401/types.html#type-uri">
<li>Set the value of the <a href="http://www.w3.org/TR/html401/struct/links.html#adef-type-A" class="noxref"><samp class="ainst-A">type</samp></a> attribute to indicate the
<li>To make a style sheet persistent, set the <a href="http://www.w3.org/TR/html401/struct/links.html#adef-rel" class="noxref"><samp class="ainst">
rel</samp></a> attribute to "stylesheet" and don't set the <a href="http://www.w3.org/TR/html401/struct/global.html#adef-title" class="noxref"><samp class="ainst">
<li>To make a style sheet preferred, set the <a href="http://www.w3.org/TR/html401/struct/links.html#adef-rel" class="noxref"><samp class="ainst">
rel</samp></a> attribute to "stylesheet" and name the style sheet with the <a href="http://www.w3.org/TR/html401/struct/global.html#adef-title" class="noxref"><samp class="ainst">
<li>To specify an alternate style sheet, set the <a href="http://www.w3.org/TR/html401/struct/links.html#adef-rel" class="noxref"><samp class="ainst">
with the <a href="http://www.w3.org/TR/html401/struct/global.html#adef-title" class="noxref"><samp class="ainst">title</samp></a> attribute.</li>
of alternate styles. The value of the <a href="http://www.w3.org/TR/html401/struct/global.html#adef-title" class="noxref"><samp class="ainst">
file <tt>mystyle.css</tt>:</p>
<p>Setting the <a href="http://www.w3.org/TR/html401/struct/global.html#adef-title" class="noxref"><samp class="ainst">title</samp></a> attribute makes this the author's preferred
<p>Adding the keyword "alternate" to the <a href="http://www.w3.org/TR/html401/struct/links.html#adef-rel" class="noxref"><samp class="ainst">
<a href="http://www.w3.org/TR/html401/struct/links.html#linksandss">links and external style
sheet::specification of preferred">Authors may also use the <a name="idx-HTTP-1" href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref"><samp class="einst">META</samp></a> element to set the document's preferred style
the preceding example), authors may include the following line in the <a href="http://www.w3.org/TR/html401/struct/global.html#edef-HEAD" class="noxref"><samp class="einst">
<a href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref"><samp class="einst">
<p>If two or more <a href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref">
considered to occur earlier than the document <a href="http://www.w3.org/TR/html401/struct/global.html#edef-HEAD" class="noxref"><samp class="einst">
<p>If two or more <a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">LINK</samp></a> elements specify a preferred style sheet, the
<p>Preferred style sheets specified with <a href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref"><samp class="einst">
<a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">
sequence of <a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">LINK</samp></a> and/or <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">STYLE</samp></a> elements. The style information
is cascaded in the order the elements appear in the <a href="http://www.w3.org/TR/html401/struct/global.html#edef-HEAD" class="noxref"><samp class="einst">
both external style sheets, as well as the persistent "common.css" style sheet.
<p>Here is a cascade example that involves both the <a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">
LINK</samp></a> and <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">STYLE</samp></a> elements.</p>
<STYLE type="text/css">
p.special { color: rgb(230, 100, 180) }
external style sheets|link::and media-dependent style sheets"><a name="media-cascades">Media-dependent cascades</a></span></h3>
<p>A cascade may include style sheets applicable to different media. Both <a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">
LINK</samp></a> and <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">STYLE</samp></a> may be used with the <a href="http://www.w3.org/TR/html401/present/styles.html#adef-media" class="noxref"><samp class="ainst">media</samp></a>
by the <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">
<STYLE media="screen, print" type="text/css">
p.special { color: rgb(230, 100, 180) }
style properties, e.g. the font family, font style, size, line height, text
elements within the <a href="http://www.w3.org/TR/html401/struct/global.html#edef-BODY" class="noxref">
<samp class="einst">BODY</samp></a> by a single rule that applies to the <a href="http://www.w3.org/TR/html401/struct/global.html#edef-BODY" class="noxref"><samp class="einst">
the content of <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">STYLE</samp></a> elements from non-conforming user agents.</p>
<p>This example illustrates for CSS how to comment out the content of <a href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE" class="noxref"><samp class="einst">STYLE</samp></a>
<pre><STYLE type="text/css">
that define a Link header field. Note that HTTP 1.1 as defined by <a rel="biblioentry" href="http://www.w3.org/TR/html401/references.html#ref-RFC2616" class="informref">
has the same effect as a <a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">LINK</samp></a> element with the same attributes
and values. Multiple <tt>Link</tt> headers correspond to multiple <a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">
<pre>Link: <http://www.acme.com/corporate.css>; REL=stylesheet
<pre><LINK rel="stylesheet" href="http://www.acme.com/corporate.css">
Link</tt> headers, and then use the <a href="http://www.w3.org/TR/html401/struct/links.html#adef-rel" class="noxref"><samp class="ainst">rel</samp></a> attribute to determine the
"alternate" keyword for the <a href="http://www.w3.org/TR/html401/struct/links.html#adef-rel" class="noxref"><samp class="ainst">rel</samp></a> attribute.</p>
<pre>Link: <compact.css>; rel="stylesheet"; title="compact"
Link: <bigprint.css>; rel="alternate stylesheet"; title="big print"
agents can alter the ordering of <a rel="biblioentry" href="http://www.w3.org/TR/html401/references.html#ref-RFC822" class="informref">[RFC822]</a> headers. To
<p><a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">
LINK</samp></a> and <a href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref">
defined as occurring before any explicit <a href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" class="noxref"><samp class="einst">
LINK</samp></a> and <a href="http://www.w3.org/TR/html401/struct/global.html#edef-META" class="noxref">
<samp class="einst">META</samp></a> elements in the document's <a href="http://www.w3.org/TR/html401/struct/global.html#edef-HEAD" class="noxref"><samp class="einst">
<hr><a href="http://www.w3.org/TR/html401/struct/objects.html">previous</a> <a href="http://www.w3.org/TR/html401/present/graphics.html">next</a> <a href="http://www.w3.org/TR/html401/cover.html#minitoc">contents</a>
<a href="http://www.w3.org/TR/html401/index/elements.html">elements</a> <a href="http://www.w3.org/TR/html401/index/attributes.html">attributes</a> <a href="http://www.w3.org/TR/html401/index/list.html">
<script src="<?php echo($buildDirectory); ?>yui/yui-min.js"></script>
var myStyleSheet = new Y.StyleSheet(),
overlayContent = Y.one('#form_container'),
// using Y.Plugin.Drag, provided by the dd-plugin module.
overlay = new Y.Overlay({
plugins: [ Y.Plugin.Drag ]
overlayContent.addClass('yui3-skin-sam');
fontSizeInput = Y.one('#font_size');
fontSizeInput.set('type','hidden');
fontSizeInput.get('parentNode').insertBefore(
Y.Node.create('6 <span></span> 36'),
slider_container = fontSizeInput.previous( "span" );
slider = new Y.Slider({
value: parseInt(Y.one('body').getStyle('fontSize')) || 13,
var size = e.newVal + 'px';
this.thumb.set('title', size);
fontSizeInput.set('value', size);
myStyleSheet.set('body', { fontSize: size });
Y.on('keyup', function (e) {
var color = this.get('value');
myStyleSheet.set('h1, h2, h3', { color: color });
Y.on('keyup', function (e) {
var color = this.get('value');
myStyleSheet.set('a:hover', { backgroundColor: color });
Y.one('#theme_form input[type=submit]').remove();
Y.on('submit', function (e) {
e.halt();
return /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(v) ||
/^[a-z]{3,}$/i.test(v);