Menu

[r7]: / docs / includes.html  Maximize  Restore  History

Download this file

41 lines (39 with data), 2.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>@include - File includes: Switch</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link type="text/css" rel="stylesheet" title="Default Stylesheet" href="global.css" />
</head>
<body id="includes" class="documentation">
<div id="header">
</div>
<div id="localNav">
<h2>Switch</h2>
<ul id="extensionsNav">
<li><a href="install_mac.html">Installation (Mac)</a></li>
<li><a href="install_windows.html">Installation (Windows)</a></li>
<li><a href="variables.html">Variables</a></li>
<li><a href="constants.html">Constants</a></li>
<li><a href="includes.html">Includes</a></li>
<li><a href="comments.html">Comments</a></li>
<li><a href="ignore.html">Ignore</a>
<li><a href="auto_prepending.html">Automatic Selector Prepending</a></li>
<li><a href="inheritance.html">Inheritance</a></li>
<li><a href="copy.html">Property Duplication</a></li>
<li><a href="property_lookup.html">Property Look-ups</a></li>
</ul>
</div>
<div id="mainContent">
<h2>Includes: <code>@include</code></h2>
<p>The include directive (<code>@include</code>) Copy the contents of a file into the current stylesheet instead of creating a reference like with <code>@import</code>. Unlike <code>@import</code>, there are no restrictions on where <code>@include</code> can be used, <strike>although the parent of a <code>@import</code> rule must be a stylesheet (not a directive or style rule)</strike>.</p>
<div class="example">
<pre class="input"><code>@include <span class="parameter">url(...);</code></pre>
</div>
<p>The <code>url</code> primitive is required. <code>@import</code> also accepts a second parameter, <code>parse-only</code>, which instructs the parser not to output the contents of the file. This is useful in cases where you want to load a file, copy portions of it or use variables/constants in it, but do not actually want the contents in the final output.</p>
<div class="example">
<pre class="input"><code>@include <span class="parameter">url(style_library.sss) parse-only;</code></pre>
</div>
</div>
</body>
</html>
MongoDB Logo MongoDB