This commit is contained in:
Shinmera 2017-04-04 11:06:33 +02:00
parent bda8fe2209
commit 7709927e41
1 changed files with 35 additions and 33 deletions

View File

@ -6,38 +6,41 @@
font-size: 14pt;
padding: 5px;
}
body>header{
display:flex;
align-items: center;
justify-content: center;
flex-direction: column;
max-width: 100%;
text-align: center;
}
body>header img{
max-width: 50%;
}
img{
max-width: 100%;
max-height: 100%;
}
code{
font-family: Consolas, Inconsolata, monospace;
}
a{
text-decoration: none;
color: #0055AA;
}
a img{
border: none;
}
#documentation{
text-align: justify;
}
#documentation pre{
margin-left: 20px;
overflow: auto;
}
#documentation img{
margin: 5px;
}
#symbol-index>ul{
list-style: none;
padding: 0;
@ -68,10 +71,9 @@
white-space: pre-wrap;
font-size: 12pt;
}
@media (max-width: 800px){
body{font-size: 12pt;}
} </style> </head> <body> <header> <h1>lass</h1> <span class="version">0.4.0</span> <p class="description">Lisp Augmented Style Sheets. Compiles LASS to CSS.</p> </header> <main> <article id="documentation"> <div><h2>About LASS</h2> <p>Writing CSS files comes with a lot of repetition and is generally much too verbose. With lispy syntax, shortcuts, and improvements, LASS aims to help you out in writing CSS quick and easy. LASS was largely inspired by <a href="http://sass-lang.com/">SASS</a>.</p> <h2>How To &amp; Examples</h2> <p>LASS supports two modes, one being directly in your lisp code, the other in pure LASS files. Adding LASS into your code is easy:</p> <pre><code>(<a href="#LASS:COMPILE-AND-WRITE">lass:compile-and-write</a>
} </style> </head> <body> <header> <h1>lass</h1> <span class="version">0.5.0</span> <p class="description">Lisp Augmented Style Sheets. Compiles LASS to CSS.</p> </header> <main> <article id="documentation"> <div><h2>About LASS</h2> <p>Writing CSS files comes with a lot of repetition and is generally much too verbose. With lispy syntax, shortcuts, and improvements, LASS aims to help you out in writing CSS quick and easy. LASS was largely inspired by <a href="http://sass-lang.com/">SASS</a>.</p> <h2>How To &amp; Examples</h2> <p>LASS supports two modes, one being directly in your lisp code, the other in pure LASS files. Adding LASS into your code is easy:</p> <pre><code>(<a href="#LASS:COMPILE-AND-WRITE">lass:compile-and-write</a>
'(div
:background black))
@ -212,7 +214,7 @@ foo a.title:hover div
(foo))
</code></pre> <h2>Variables</h2> <p>Often times it is useful to define variables that you can use within your style so that colours and fonts can quickly be exchanged. LASS allows you to do that too using the <code>:let</code> directive and by abusing the vector type. It is probably best illustrated using an example:</p> <pre><code>(:let ((foo &quot;#0088EE&quot;))
((a:active) :color #(foo)))
</code></pre> <h2>Extending LASS</h2> <p>Pretty much every part of LASS is extensible through methods. Most useful will however probably be the <code><a href="#LASS:DEFINE-SPECIAL-PROPERTY">DEFINE-SPECIAL-PROPERTY</a></code>, <code><a href="#LASS:DEFINE-BROWSER-PROPERTY">DEFINE-BROWSER-PROPERTY</a></code> and <code><a href="#LASS:DEFINE-SPECIAL-SELECTOR">DEFINE-SPECIAL-SELECTOR</a></code> helper-macros. Here's some examples from the <code>SPECIAL.LISP</code> file that defines some standard special handlers:</p> <pre><code>(<a href="#LASS:DEFINE-SPECIAL-PROPERTY">define-special-property</a> font-family (&amp;rest faces)
</code></pre> <h2>Extending LASS</h2> <p>Pretty much every part of LASS is extensible through methods. Most useful will however probably be the <code><a href="#LASS:DEFINE-SPECIAL-PROPERTY">DEFINE-SPECIAL-PROPERTY</a></code>, <code><a href="#LASS:DEFINE-BROWSER-PROPERTY">DEFINE-BROWSER-PROPERTY</a></code> and <code><a href="#LASS:DEFINE-SPECIAL-SELECTOR">DEFINE-SPECIAL-SELECTOR</a></code> helper-macros. Here's some examples from the <code>SPECIAL.LISP</code> file that defines some standard special handlers:</p> <pre><code>(<a href="#LASS:DEFINE-SPECIAL-PROPERTY">define-special-property</a> font-family (<a href="http://l1sp.org/cl/&amp;rest">&amp;rest</a> faces)
(<a href="http://l1sp.org/cl/list">list</a> (<a href="#LASS:MAKE-PROPERTY">make-property</a> &quot;font-family&quot; (<a href="http://l1sp.org/cl/format">format</a> NIL &quot;~{~a~^, ~}&quot; (<a href="http://l1sp.org/cl/mapcar">mapcar</a> #'resolve faces)))))
(<a href="#LASS:DEFINE-BROWSER-PROPERTY">define-browser-property</a> linear-gradient (direction &amp;rest colors)
@ -224,25 +226,25 @@ foo a.title:hover div
</code></pre> <p>Once you visit a <code>.lass</code> file, it will automatically start in the <code>LASS</code> major-mode, which is a derived-mode from <code>COMMON-LISP-MODE</code>. Whenever you save, it will automatically try to compile the lass file to its CSS equivalent. If slime is connected, it will try to quickload LASS and evaluate <code><a href="#LASS:GENERATE">GENERATE</a></code>. If slime is not connected, it instead executes a shell command. In order for that to work, the <a href="https://github.com/Shinmera/LASS/releases"><code>lass</code> binary</a> must be in your path.</p> <p>If your operating system is not directly supported with a binary, you can build it yourself using a build tool like <a href="http://www.xach.com/lisp/buildapp/">Buildapp</a>, the ASDF system <code>BINARY-LASS</code> and the entry-point <code>BINARY-LASS:CMD-WRAPPER</code>.</p> <h2>ASDF Integration</h2> <p>If you want to compile LASS files to CSS in your systems, you can now (v0.4+) do this via a <code><a href="#LASS:LASS-FILE">lass-file</a></code> component type, and <code>:defsystem-depends-on</code>-ing LASS.</p> <pre><code>(asdf:defsystem my-system
:defsystem-depends-on (:lass)
:components (<a href="#LASS:LASS-FILE">(:lass-file</a> &quot;test-file&quot;)))
</code></pre> <p>You can also specify an <code>:output</code> argument to a <code><a href="#LASS:LASS-FILE">lass-file</a></code> to specify what the target css file should be.</p> </div> </article> <article id="copyright"> <h2>Copyright</h2> <span>lass</span> is licensed under the <span><a href="https://tldrlegal.com/search?q=Artistic">Artistic</a></span> license. © <span>Nicolas Hafner &lt;shinmera@tymoon.eu&gt;</span> . This library can be obtained on <a href="https://github.com/Shinmera/LASS">https://github.com/Shinmera/LASS</a>. </article> <article id="symbol-index"> <h2>Package Index</h2> <ul><li class="package"> <h3> <a name="LASS" href="#LASS">LASS</a> <span class="nicknames">(ORG.TYMOONNEXT.LASS)</span> </h3> <ul><li> <a name="LASS:*INDENT-LEVEL*"> </a> <article> <header class="special"> <span class="type">special</span> <h4 class="name"><code><a href="#LASS:*INDENT-LEVEL*">*INDENT-LEVEL*</a></code></h4> </header> <pre class="docstring">Directs the current amount of spaces used to indent.</pre> </article> </li><li> <a name="LASS:*PRETTY*"> </a> <article> <header class="special"> <span class="type">special</span> <h4 class="name"><code><a href="#LASS:*PRETTY*">*PRETTY*</a></code></h4> </header> <pre class="docstring">Directs whether to pretty-print using whitespace or not.</pre> </article> </li><li> <a name="LASS:*VARS*"> </a> <article> <header class="special"> <span class="type">special</span> <h4 class="name"><code><a href="#LASS:*VARS*">*VARS*</a></code></h4> </header> <pre class="docstring">Special variable containing LASS-environment variables.
</code></pre> <p>You can also specify an <code>:output</code> argument to a <code><a href="#LASS:LASS-FILE">lass-file</a></code> to specify what the target css file should be.</p> </div> </article> <article id="copyright"> <h2>Copyright</h2> <span>lass</span> is licensed under the <span><a href="https://tldrlegal.com/search?q=Artistic">Artistic</a></span> license. © <span>Nicolas Hafner &lt;shinmera@tymoon.eu&gt;</span> . This library can be obtained on <a href="https://github.com/Shinmera/LASS">https://github.com/Shinmera/LASS</a>. </article> <article id="symbol-index"> <h2>Package Index</h2> <ul><li class="package"> <h3> <a name="LASS" href="#LASS">LASS</a> <span class="nicknames">(ORG.TYMOONNEXT.LASS)</span> </h3> <ul><li> <a name="LASS:*INDENT-LEVEL*"> </a> <article> <header class="special"> <span class="type">special</span> <h4 class="name"><code><a href="#LASS:*INDENT-LEVEL*">*INDENT-LEVEL*</a></code></h4> </header> <div class="docstring"><pre>Directs the current amount of spaces used to indent.</pre></div> </article> </li><li> <a name="LASS:*PRETTY*"> </a> <article> <header class="special"> <span class="type">special</span> <h4 class="name"><code><a href="#LASS:*PRETTY*">*PRETTY*</a></code></h4> </header> <div class="docstring"><pre>Directs whether to pretty-print using whitespace or not.</pre></div> </article> </li><li> <a name="LASS:*VARS*"> </a> <article> <header class="special"> <span class="type">special</span> <h4 class="name"><code><a href="#LASS:*VARS*">*VARS*</a></code></h4> </header> <div class="docstring"><pre>Special variable containing LASS-environment variables.
See the definition of the LET block.</pre> </article> </li><li> <a name="LASS:LASS-FILE"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#LASS:LASS-FILE">LASS-FILE</a></code></h4> </header> <pre class="docstring">An ASDF source-file component to allow compilation of LASS to CSS in ASDF systems.</pre> </article> </li><li> <a name="LASS:PROPERTY-FUNCTION"> </a> <article> <header class="accessor"> <span class="type">accessor</span> <code>(</code><h4 class="name"><code><a href="#LASS:PROPERTY-FUNCTION">PROPERTY-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <pre class="docstring">Returns a function to process a property function of NAME, if any.</pre> </article> </li><li> <a name="LASS:COMPILE-AND-WRITE"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-AND-WRITE">COMPILE-AND-WRITE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST FORMS</code><code>)</code> </header> <pre class="docstring">Shortcut for (WRITE-SHEET (COMPILE-SHEET FORMS*))</pre> </article> </li><li> <a name="LASS:COMPILE-SHEET"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-SHEET">COMPILE-SHEET</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST BLOCKS</code><code>)</code> </header> <pre class="docstring">Compiles a LASS sheet composed of BLOCKS.
See <a href="http://l1sp.org/cl/the">the</a> definition of the LET block.</pre></div> </article> </li><li> <a name="LASS:LASS-FILE"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#LASS:LASS-FILE">LASS-FILE</a></code></h4> </header> <div class="docstring"><pre>An ASDF source-file component to allow compilation of LASS to CSS in ASDF systems.</pre></div> </article> </li><li> <a name="LASS:PROPERTY-FUNCTION"> </a> <article> <header class="accessor"> <span class="type">accessor</span> <code>(</code><h4 class="name"><code><a href="#LASS:PROPERTY-FUNCTION">PROPERTY-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <div class="docstring"><pre>Returns a function to process a property function of NAME, if any.</pre></div> </article> </li><li> <a name="LASS:COMPILE-AND-WRITE"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-AND-WRITE">COMPILE-AND-WRITE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST FORMS</code><code>)</code> </header> <div class="docstring"><pre>Shortcut for (WRITE-SHEET (COMPILE-SHEET FORMS*))</pre></div> </article> </li><li> <a name="LASS:COMPILE-SHEET"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-SHEET">COMPILE-SHEET</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST BLOCKS</code><code>)</code> </header> <div class="docstring"><pre>Compiles a LASS sheet composed of BLOCKS.
Each BLOCK is passed to COMPILE-BLOCK. The results thereof are appended
together into one list of blocks and properties.</pre> </article> </li><li> <a name="LASS:GENERATE"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:GENERATE">GENERATE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">IN &amp;KEY (OUT (MERGE-PATHNAMES (MAKE-PATHNAME :TYPE &quot;css&quot;) IN)) (PRETTY NIL)
(IF-EXISTS :SUPERSEDE)</code><code>)</code> </header> <pre class="docstring">Generate a CSS file from a LASS file.
together into one list of blocks and properties.</pre></div> </article> </li><li> <a name="LASS:GENERATE"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:GENERATE">GENERATE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">IN &amp;KEY (OUT (MERGE-PATHNAMES (MAKE-PATHNAME :TYPE &quot;css&quot;) IN)) (PRETTY NIL)
(IF-EXISTS :SUPERSEDE)</code><code>)</code> </header> <div class="docstring"><pre>Generate a CSS file from a LASS file.
IN --- The LASS input file. Has to be READable.
OUT --- The target file, by default a file of same location and name, but with CSS type.
PRETTY --- Whether to minify or not. See WRITE-SHEET.
IF-EXISTS --- See WITH-OPEN-FILE
Returns OUT</pre> </article> </li><li> <a name="LASS:INDENT"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:INDENT">INDENT</a></code></h4> <code class="qualifiers"></code> <code class="arguments"></code><code>)</code> </header> <pre class="docstring">Returns a string of the appropriate number of spaces depending on *PRETTY* and *INDENT-LEVEL*</pre> </article> </li><li> <a name="LASS:MAKE-BLOCK"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:MAKE-BLOCK">MAKE-BLOCK</a></code></h4> <code class="qualifiers"></code> <code class="arguments">SELECTOR VALUES</code><code>)</code> </header> <pre class="docstring">Creates a block object with SELECTOR and VALUES.</pre> </article> </li><li> <a name="LASS:MAKE-PROPERTY"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:MAKE-PROPERTY">MAKE-PROPERTY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">PROPERTY &amp;OPTIONAL VALUE</code><code>)</code> </header> <pre class="docstring">Creates a property object with PROPERTY as its key and VALUE as its value.</pre> </article> </li><li> <a name="LASS:REMOVE-PROPERTY-FUNCTION"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:REMOVE-PROPERTY-FUNCTION">REMOVE-PROPERTY-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <pre class="docstring">Removes the property function NAME.</pre> </article> </li><li> <a name="LASS:RESOLVE-FUNCTION"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:RESOLVE-FUNCTION">RESOLVE-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">FUNCTION &amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Turns the FUNCTION with its ARGS into a properly usable property value.</pre> </article> </li><li> <a name="LASS:WRITE-SHEET"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:WRITE-SHEET">WRITE-SHEET</a></code></h4> <code class="qualifiers"></code> <code class="arguments">SHEET &amp;KEY (STREAM NIL) (PRETTY *PRETTY*)</code><code>)</code> </header> <pre class="docstring">Writes the compiled SHEET object to STREAM.
Returns OUT</pre></div> </article> </li><li> <a name="LASS:INDENT"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:INDENT">INDENT</a></code></h4> <code class="qualifiers"></code> <code class="arguments"></code><code>)</code> </header> <div class="docstring"><pre>Returns a string of the appropriate number of spaces depending on *PRETTY* and *INDENT-LEVEL*</pre></div> </article> </li><li> <a name="LASS:MAKE-BLOCK"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:MAKE-BLOCK">MAKE-BLOCK</a></code></h4> <code class="qualifiers"></code> <code class="arguments">SELECTOR VALUES</code><code>)</code> </header> <div class="docstring"><pre>Creates a block object with SELECTOR and VALUES.</pre></div> </article> </li><li> <a name="LASS:MAKE-PROPERTY"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:MAKE-PROPERTY">MAKE-PROPERTY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">PROPERTY &amp;OPTIONAL VALUE</code><code>)</code> </header> <div class="docstring"><pre>Creates a property object with PROPERTY as its key and VALUE as its value.</pre></div> </article> </li><li> <a name="LASS:REMOVE-PROPERTY-FUNCTION"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:REMOVE-PROPERTY-FUNCTION">REMOVE-PROPERTY-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <div class="docstring"><pre>Removes the property function NAME.</pre></div> </article> </li><li> <a name="LASS:RESOLVE-FUNCTION"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:RESOLVE-FUNCTION">RESOLVE-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">FUNCTION &amp;REST ARGS</code><code>)</code> </header> <div class="docstring"><pre>Turns the FUNCTION with its ARGS into a properly usable property value.</pre></div> </article> </li><li> <a name="LASS:WRITE-SHEET"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:WRITE-SHEET">WRITE-SHEET</a></code></h4> <code class="qualifiers"></code> <code class="arguments">SHEET &amp;KEY (STREAM NIL) (PRETTY *PRETTY*)</code><code>)</code> </header> <div class="docstring"><pre>Writes the compiled SHEET object to STREAM.
If PRETTY is non-NIL, spaces and newlines are inserted as appropriate
in order to create a human-readable stylesheet. Otherwise whitespace is
only used where necessary, producing a minified version.
STREAM can be a STREAM, T for *STANDARD-OUTPUT*, or NIL for a STRING.</pre> </article> </li><li> <a name="LASS:WRITE-SHEET-PART"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:WRITE-SHEET-PART">WRITE-SHEET-PART</a></code></h4> <code class="qualifiers"></code> <code class="arguments">STREAM BLOCK CP AP</code><code>)</code> </header> <pre class="docstring">Wrapper around WRITE-SHEET-OBJECT so that we can call it from FORMAT.
Calls WRITE-SHEET-OBJECT with (CAR BLOCK) (CDR BLOCK) STREAM.</pre> </article> </li><li> <a name="LASS:COMPILE-BLOCK"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-BLOCK">COMPILE-BLOCK</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HEADER FIELDS</code><code>)</code> </header> <pre class="docstring">Compiles the block with given HEADER and FIELDS list.
STREAM can be a STREAM, T for *STANDARD-OUTPUT*, or NIL for a STRING.</pre></div> </article> </li><li> <a name="LASS:WRITE-SHEET-PART"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#LASS:WRITE-SHEET-PART">WRITE-SHEET-PART</a></code></h4> <code class="qualifiers"></code> <code class="arguments">STREAM BLOCK CP AP</code><code>)</code> </header> <div class="docstring"><pre>Wrapper around WRITE-SHEET-OBJECT so that we can call it from FORMAT.
Calls WRITE-SHEET-OBJECT with (CAR BLOCK) (CDR BLOCK) STREAM.</pre></div> </article> </li><li> <a name="LASS:COMPILE-BLOCK"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-BLOCK">COMPILE-BLOCK</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HEADER FIELDS</code><code>)</code> </header> <div class="docstring"><pre>Compiles the block with given HEADER and FIELDS list.
By default, the following case is handled:
(T T)
@ -260,7 +262,7 @@ selector prepended to the selector of the sub-block.
Special handling of blocks may occur.
See DEFINE-SPECIAL-BLOCK.</pre> </article> </li><li> <a name="LASS:COMPILE-CONSTRAINT"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-CONSTRAINT">COMPILE-CONSTRAINT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">FUNC ARGS</code><code>)</code> </header> <pre class="docstring">Compiles a constraint of type FUNC with arguments ARGS to a list of alternative selectors.
See <a href="NIL">DEFINE-SPECIAL-BLOCK.</a></pre></div> </article> </li><li> <a name="LASS:COMPILE-CONSTRAINT"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-CONSTRAINT">COMPILE-CONSTRAINT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">FUNC ARGS</code><code>)</code> </header> <div class="docstring"><pre>Compiles a constraint of type FUNC with arguments ARGS to a list of alternative selectors.
By default, the following cases are handled:
(T T)
@ -283,7 +285,7 @@ Preserves OR combinations.
Special handling of constraints may occur.
See DEFINE-SPECIAL-SELECTOR.</pre> </article> </li><li> <a name="LASS:COMPILE-PROPERTY"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-PROPERTY">COMPILE-PROPERTY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">KEY VALUE</code><code>)</code> </header> <pre class="docstring">Compile a property of KEY and VALUE to a list of property objects.
See <a href="NIL">DEFINE-SPECIAL-SELECTOR.</a></pre></div> </article> </li><li> <a name="LASS:COMPILE-PROPERTY"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-PROPERTY">COMPILE-PROPERTY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">KEY VALUE</code><code>)</code> </header> <div class="docstring"><pre>Compile a property of KEY and VALUE to a list of property objects.
By default, the following cases are handled:
(T LIST)
@ -296,7 +298,7 @@ RESOLVEd VALUE. The KEY is DOWNCASEd.
Special handling of properties may occur.
See DEFINE-SPECIAL-PROPERTY</pre> </article> </li><li> <a name="LASS:COMPILE-SELECTOR"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-SELECTOR">COMPILE-SELECTOR</a></code></h4> <code class="qualifiers"></code> <code class="arguments">SELECTOR</code><code>)</code> </header> <pre class="docstring">Compiles the SELECTOR form into a list of alternative selectors.
See <a href="#LASS:DEFINE-SPECIAL-PROPERTY">DEFINE-SPECIAL-PROPERTY</a></pre></div> </article> </li><li> <a name="LASS:COMPILE-SELECTOR"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:COMPILE-SELECTOR">COMPILE-SELECTOR</a></code></h4> <code class="qualifiers"></code> <code class="arguments">SELECTOR</code><code>)</code> </header> <div class="docstring"><pre>Compiles the SELECTOR form into a list of alternative selectors.
By default, the following cases are handled:
(NULL)
@ -306,7 +308,7 @@ Returns NIL.
Calls COMPILE-CONSTRAINT with the SELECTOR's CAR and CDR.
(T)
Returns a list with the RESOLVEd SELECTOR.</pre> </article> </li><li> <a name="LASS:CONSUME-ITEM"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:CONSUME-ITEM">CONSUME-ITEM</a></code></h4> <code class="qualifiers"></code> <code class="arguments">ITEM READABLE-LIST</code><code>)</code> </header> <pre class="docstring">Consumes items from READABLE-LIST as required by the ITEM.
Returns a list with the RESOLVEd SELECTOR.</pre></div> </article> </li><li> <a name="LASS:CONSUME-ITEM"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:CONSUME-ITEM">CONSUME-ITEM</a></code></h4> <code class="qualifiers"></code> <code class="arguments">ITEM READABLE-LIST</code><code>)</code> </header> <div class="docstring"><pre>Consumes items from READABLE-LIST as required by the ITEM.
Returned should be two values, the first being a property to compile (or NIL)
and the second a block to compile (or NIL).
By default, the following cases are handled:
@ -321,7 +323,7 @@ in automatically. See DEFINE-PROPERTY-FUNCTION. If it is a regular symbol,
CALL-NEXT-METHOD is invoked.
(T)
Signals an error.</pre> </article> </li><li> <a name="LASS:RESOLVE"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:RESOLVE">RESOLVE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">THING</code><code>)</code> </header> <pre class="docstring">Resolves THING to a value that makes sense for LASS.
Signals an error.</pre></div> </article> </li><li> <a name="LASS:RESOLVE"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:RESOLVE">RESOLVE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">THING</code><code>)</code> </header> <div class="docstring"><pre>Resolves THING to a value that makes sense for LASS.
By default the following types are handled:
NULL: NIL
@ -330,7 +332,7 @@ ARRAY: the variable stored in *VARS* under THING
KEYWORD: Colon-prefixed, downcased symbol-name of THING
SYMBOL: Downcased symbol-name of THING
PATHNAME: If designating an image, base64 encoded inline image data.
T: PRINC-TO-STRING of THING</pre> </article> </li><li> <a name="LASS:WRITE-SHEET-OBJECT"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:WRITE-SHEET-OBJECT">WRITE-SHEET-OBJECT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">TYPE OBJECT STREAM</code><code>)</code> </header> <pre class="docstring">Writes the OBJECT of type TYPE to STREAM.
T: PRINC-TO-STRING of THING</pre></div> </article> </li><li> <a name="LASS:WRITE-SHEET-OBJECT"> </a> <article> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#LASS:WRITE-SHEET-OBJECT">WRITE-SHEET-OBJECT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">TYPE OBJECT STREAM</code><code>)</code> </header> <div class="docstring"><pre>Writes the OBJECT of type TYPE to STREAM.
By default the following TYPEs are handled:
:BLOCK (SELECTOR-LIST OBJECTS*)
@ -342,7 +344,7 @@ necessary if *PRETTY* is non-NIL.
:PROPERTY (KEY VALUE)
Prints the KEY. If VALUE is non-NIL, a colon is printed followed by the
VALUE. Finally a semicolon is printed. Spaces may be inserted where necessary
if *PRETTY* is non-NIL.</pre> </article> </li><li> <a name="LASS:DEFINE-BROWSER-PROPERTY"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-BROWSER-PROPERTY">DEFINE-BROWSER-PROPERTY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Helper macro to define properties that have browser-dependant versions.
if *PRETTY* is non-NIL.</pre></div> </article> </li><li> <a name="LASS:DEFINE-BROWSER-PROPERTY"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-BROWSER-PROPERTY">DEFINE-BROWSER-PROPERTY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME ARGS &amp;BODY BROWSER-OPTIONS</code><code>)</code> </header> <div class="docstring"><pre>Helper macro to define properties that have browser-dependant versions.
NAME --- The base name of the property name or value.
ARGS --- Property arguments, see DEFINE-SPECIAL-PROPERTY.
@ -354,7 +356,7 @@ in the option definition is bound to the computed property name
(eg -moz-NAME for the :MOZ option).
You can define special handling of the browsers by defining options
specifically for them. If no handling is defined, the DEFAULT option
is used as a fallback.</pre> </article> </li><li> <a name="LASS:DEFINE-PRIMITIVE-PROPERTY-CONSUMER"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-PRIMITIVE-PROPERTY-CONSUMER">DEFINE-PRIMITIVE-PROPERTY-CONSUMER</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Defines a CONSUME-ITEM method for the given item SPECIALIZER.
is used as a fallback.</pre></div> </article> </li><li> <a name="LASS:DEFINE-PRIMITIVE-PROPERTY-CONSUMER"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-PRIMITIVE-PROPERTY-CONSUMER">DEFINE-PRIMITIVE-PROPERTY-CONSUMER</a></code></h4> <code class="qualifiers"></code> <code class="arguments">SPECIALIZER (PROPVALS READABLE NEXT) &amp;BODY LOOP-BODY</code><code>)</code> </header> <div class="docstring"><pre>Defines a CONSUME-ITEM method for the given item SPECIALIZER.
SPECIALIZER --- The method specializer for the item.
PROPVALS --- The list that should contain the property values.
@ -363,7 +365,7 @@ NEXT --- Bound to the next (unconsumed) item in the readable-list.
LOOP-BODY --- The body of the reading loop to execute until the readable is empty.
The return value of the loop-body is discarded. You can use (RETURN) to exit the loop,
for example for when you encounter an item you don't want to read.</pre> </article> </li><li> <a name="LASS:DEFINE-PROPERTY-FUNCTION"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-PROPERTY-FUNCTION">DEFINE-PROPERTY-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Define a new property function NAME, accepting ARGS.
for example for when you encounter an item you don't want to read.</pre></div> </article> </li><li> <a name="LASS:DEFINE-PROPERTY-FUNCTION"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-PROPERTY-FUNCTION">DEFINE-PROPERTY-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME ARGS &amp;BODY BODY</code><code>)</code> </header> <div class="docstring"><pre>Define a new property function NAME, accepting ARGS.
The body should return a value to use directly, if possible a string.
The results of a property-function should not be RESOVLEd.
@ -374,7 +376,7 @@ differ depending on the property. Property functions defined with this
are only the defaults available for all properties. If you want to
minimise collision probability or avoid an illegal function for a
certain property, you should define a direct method on CONSUME-ITEM
to handle the reading of the property values manually.</pre> </article> </li><li> <a name="LASS:DEFINE-PROPERTY-FUNCTION-CASE"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-PROPERTY-FUNCTION-CASE">DEFINE-PROPERTY-FUNCTION-CASE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Defines a CONSUME-ITEM method for PROPERTY that has special handling for property-functions.
to handle the reading of the property values manually.</pre></div> </article> </li><li> <a name="LASS:DEFINE-PROPERTY-FUNCTION-CASE"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-PROPERTY-FUNCTION-CASE">DEFINE-PROPERTY-FUNCTION-CASE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">PROPERTY (ARGS) &amp;BODY FUNCTION-CLAUSES</code><code>)</code> </header> <div class="docstring"><pre>Defines a CONSUME-ITEM method for PROPERTY that has special handling for property-functions.
FUNCTION-CLAUSES ::= function-clause*
FUNCTION-CLAUSE ::= (function-name form*)
@ -382,27 +384,27 @@ FUNCTION-CLAUSE ::= (function-name form*)
Each function-name is compared by STRING-EQUAL and each clause should return the
property-value to use in its place, or NIL if it should be skipped.
You can use (RETURN) in a clause body to stop reading values altogether.</pre> </article> </li><li> <a name="LASS:DEFINE-SIMPLE-PROPERTY-FUNCTION"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SIMPLE-PROPERTY-FUNCTION">DEFINE-SIMPLE-PROPERTY-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Defines a property function that returns name(arg1,arg2...).
Only required arguments are allowed.</pre> </article> </li><li> <a name="LASS:DEFINE-SIMPLE-PROPERTY-FUNCTIONS"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SIMPLE-PROPERTY-FUNCTIONS">DEFINE-SIMPLE-PROPERTY-FUNCTIONS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Defines a CONSUME-ITEM method for PROPERTY that has special handling for property-functions.
You can use (RETURN) in a clause body to stop reading values altogether.</pre></div> </article> </li><li> <a name="LASS:DEFINE-SIMPLE-PROPERTY-FUNCTION"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SIMPLE-PROPERTY-FUNCTION">DEFINE-SIMPLE-PROPERTY-FUNCTION</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME ARGS</code><code>)</code> </header> <div class="docstring"><pre>Defines a property function that returns name(arg1,arg2...).
Only required arguments are allowed.</pre></div> </article> </li><li> <a name="LASS:DEFINE-SIMPLE-PROPERTY-FUNCTIONS"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SIMPLE-PROPERTY-FUNCTIONS">DEFINE-SIMPLE-PROPERTY-FUNCTIONS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">PROPERTY &amp;REST FUNCSPECS</code><code>)</code> </header> <div class="docstring"><pre>Defines a CONSUME-ITEM method for PROPERTY that has special handling for property-functions.
FUNCSPECS ::= funcspec*
FUNCSPEC ::= (funcname arg* [&amp;optional arg*] [&amp;key arg*])
See DEFINE-PROPERTY-FUNCTION-CASE.</pre> </article> </li><li> <a name="LASS:DEFINE-SINGLE-ARG-SELECTOR"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SINGLE-ARG-SELECTOR">DEFINE-SINGLE-ARG-SELECTOR</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Helper macro to define a single-argument pseudo-selector like NOT or NTH-CHILD.</pre> </article> </li><li> <a name="LASS:DEFINE-SPECIAL-BLOCK"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SPECIAL-BLOCK">DEFINE-SPECIAL-BLOCK</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Define handling of a special block type.
See <a href="NIL">DEFINE-PROPERTY-FUNCTION-CASE.</a></pre></div> </article> </li><li> <a name="LASS:DEFINE-SINGLE-ARG-SELECTOR"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SINGLE-ARG-SELECTOR">DEFINE-SINGLE-ARG-SELECTOR</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <div class="docstring"><pre>Helper macro to define a single-argument pseudo-selector like NOT or NTH-CHILD.</pre></div> </article> </li><li> <a name="LASS:DEFINE-SPECIAL-BLOCK"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SPECIAL-BLOCK">DEFINE-SPECIAL-BLOCK</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME ARGS &amp;BODY BODY</code><code>)</code> </header> <div class="docstring"><pre>Define handling of a special block type.
In order for the block to be recognised, it has to begin with the NAME as a keyword.
The ARGS is a lambda-list that parses the block contents.
Expected as a return value is a /list/ of either attributes or blocks.
See COMPILE-BLOCK</pre> </article> </li><li> <a name="LASS:DEFINE-SPECIAL-PROPERTY"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SPECIAL-PROPERTY">DEFINE-SPECIAL-PROPERTY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Define handling of a special property.
See <a href="#LASS:COMPILE-BLOCK">COMPILE-BLOCK</a></pre></div> </article> </li><li> <a name="LASS:DEFINE-SPECIAL-PROPERTY"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SPECIAL-PROPERTY">DEFINE-SPECIAL-PROPERTY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME ARGS &amp;BODY BODY</code><code>)</code> </header> <div class="docstring"><pre>Define handling of a special property.
The ARGS is a lambda-list that parses the arguments passed to the property.
Expected as a return value is a /list/ of either attributes or blocks.
See COMPILE-PROPERTY</pre> </article> </li><li> <a name="LASS:DEFINE-SPECIAL-SELECTOR"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SPECIAL-SELECTOR">DEFINE-SPECIAL-SELECTOR</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;REST ARGS</code><code>)</code> </header> <pre class="docstring">Define handling of a special selector type.
See <a href="#LASS:COMPILE-PROPERTY">COMPILE-PROPERTY</a></pre></div> </article> </li><li> <a name="LASS:DEFINE-SPECIAL-SELECTOR"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#LASS:DEFINE-SPECIAL-SELECTOR">DEFINE-SPECIAL-SELECTOR</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME ARGS &amp;BODY BODY</code><code>)</code> </header> <div class="docstring"><pre>Define handling of a special selector type.
In order for the selector to be recognised, it has to begin with the NAME as a keyword.
The ARGS is a lambda-list that parses the selector contents.
Expected as a return value is a /list/ of alternate versions of selectors.
See COMPILE-CONSTRAINT.</pre> </article> </li></ul> </li></ul> </article> </main> </body> </html>
See <a href="NIL">COMPILE-CONSTRAINT.</a></pre></div> </article> </li></ul> </li></ul> </article> </main> </body> </html>