This is the lass Reference Manual, version 0.6.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:34:59 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
lass
Lisp Augmented Style Sheets. Compiles LASS to CSS.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/LASS.git)
zlib
0.6.0
trivial-indent
(system).
trivial-mimes
(system).
cl-base64
(system).
package.lisp
(file).
readable-list.lisp
(file).
compiler.lisp
(file).
property-funcs.lisp
(file).
writer.lisp
(file).
lass.lisp
(file).
special.lisp
(file).
asdf.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
lass/lass.asd
lass/package.lisp
lass/readable-list.lisp
lass/compiler.lisp
lass/property-funcs.lisp
lass/writer.lisp
lass/lass.lisp
lass/special.lisp
lass/asdf.lisp
lass/readable-list.lisp
package.lisp
(file).
lass
(system).
advance
(function).
consume
(function).
empty-p
(function).
inner
(reader method).
(setf inner)
(writer method).
make-readable-list
(function).
peek
(function).
pushback
(function).
readable-list
(class).
with-empty-check
(macro).
lass/compiler.lisp
readable-list.lisp
(file).
lass
(system).
*vars*
(special variable).
compile-block
(generic function).
compile-constraint
(generic function).
compile-property
(generic function).
compile-selector
(generic function).
compile-sheet
(function).
consume-item
(generic function).
make-block
(function).
make-property
(function).
resolve
(generic function).
compile-media-constraint
(generic function).
compile-media-query
(generic function).
make-superblock
(function).
read-to-vector
(function).
lass/property-funcs.lisp
compiler.lisp
(file).
lass
(system).
consume-item
(method).
define-primitive-property-consumer
(macro).
define-property-function
(macro).
define-property-function-case
(macro).
define-simple-property-function
(macro).
define-simple-property-functions
(macro).
property-function
(function).
(setf property-function)
(function).
remove-property-function
(function).
resolve
(method).
resolve-function
(function).
*property-functions*
(special variable).
lass/writer.lisp
property-funcs.lisp
(file).
lass
(system).
*indent-level*
(special variable).
*indent-spaces*
(special variable).
*pretty*
(special variable).
indent
(function).
write-sheet
(function).
write-sheet-object
(generic function).
write-sheet-part
(function).
lass/lass.lisp
writer.lisp
(file).
lass
(system).
compile-and-write
(function).
define-special-block
(macro).
define-special-property
(macro).
define-special-selector
(macro).
generate
(function).
lass/special.lisp
lass.lisp
(file).
lass
(system).
compile-block
(method).
compile-block
(method).
compile-block
(method).
compile-block
(method).
compile-block
(method).
compile-block
(method).
compile-block
(method).
compile-block
(method).
compile-block
(method).
compile-block
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-constraint
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
compile-property
(method).
consume-item
(method).
define-browser-property
(macro).
define-single-arg-selector
(macro).
bind-vars
(macro).
define-attr-comparator
(macro).
lass/asdf.lisp
special.lisp
(file).
lass
(system).
lass-file
(class).
output-files
(method).
perform
(method).
perform
(method).
source-file-type
(method).
lass-file
(class).
output
(reader method).
(setf output)
(writer method).
Packages are listed by definition order.
lass
org.tymoonnext.lass
common-lisp
.
*indent-level*
(special variable).
*indent-spaces*
(special variable).
*pretty*
(special variable).
*vars*
(special variable).
compile-and-write
(function).
compile-block
(generic function).
compile-constraint
(generic function).
compile-property
(generic function).
compile-selector
(generic function).
compile-sheet
(function).
consume-item
(generic function).
define-browser-property
(macro).
define-primitive-property-consumer
(macro).
define-property-function
(macro).
define-property-function-case
(macro).
define-simple-property-function
(macro).
define-simple-property-functions
(macro).
define-single-arg-selector
(macro).
define-special-block
(macro).
define-special-property
(macro).
define-special-selector
(macro).
generate
(function).
indent
(function).
lass-file
(class).
make-block
(function).
make-property
(function).
property-function
(function).
(setf property-function)
(function).
remove-property-function
(function).
resolve
(generic function).
resolve-function
(function).
write-sheet
(function).
write-sheet-object
(generic function).
write-sheet-part
(function).
*property-functions*
(special variable).
advance
(function).
bind-vars
(macro).
compile-media-constraint
(generic function).
compile-media-query
(generic function).
consume
(function).
define-attr-comparator
(macro).
empty-p
(function).
inner
(generic reader).
(setf inner)
(generic writer).
make-readable-list
(function).
make-superblock
(function).
output
(generic reader).
(setf output)
(generic writer).
peek
(function).
pushback
(function).
read-to-vector
(function).
readable-list
(class).
with-empty-check
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Directs the current amount of spaces used to indent.
lass
.
Specifies the number of spaces to use for indentation.
lass
.
Directs whether to pretty-print using whitespace or not.
lass
.
Special variable containing LASS-environment variables.
See the definition of the LET block.
lass
.
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.
BROWSER-OPTIONS ::= (OPTION (symbol) FORM*)
OPTION ::= :MOZ | :O | :WEBKIT | :MS | :W3C | :DEFAULT
Each browser-option body should return a single property. The SYMBOL
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.
lass
.
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.
READABLE — The readable-list being operated on currently.
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.
lass
.
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.
Property functions are function calls that occur as (part of) the value of a property. Due to ambiguity issues with a general sub-block, property functions need to be explicitly defined and may completely 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.
lass
.
Defines a CONSUME-ITEM method for PROPERTY that has special handling for property-functions.
FUNCTION-CLAUSES ::= function-clause*
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.
lass
.
Defines a property function that returns name(arg1,arg2...). Only required arguments are allowed.
lass
.
Defines a CONSUME-ITEM method for PROPERTY that has special handling for property-functions.
FUNCSPECS ::= funcspec*
FUNCSPEC ::= (funcname arg* [&optional arg*] [&key arg*])
See DEFINE-PROPERTY-FUNCTION-CASE.
lass
.
Helper macro to define a single-argument pseudo-selector like NOT or NTH-CHILD.
lass
.
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
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
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.
Shortcut for (WRITE-SHEET (COMPILE-SHEET FORMS*))
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.
lass
.
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
Returns a string of the appropriate number of spaces depending on *PRETTY* and *INDENT-LEVEL*
lass
.
Creates a block object with SELECTOR and VALUES.
lass
.
Creates a property object with PROPERTY as its key and VALUE as its value.
lass
.
Returns a function to process a property function of NAME, if any.
lass
.
Sets FUNCTION as the new processor for the property function NAME.
lass
.
Removes the property function NAME.
lass
.
Turns the FUNCTION with its ARGS into a properly usable property value.
lass
.
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.
lass
.
Wrapper around WRITE-SHEET-OBJECT so that we can call it from FORMAT. Calls WRITE-SHEET-OBJECT with (CAR BLOCK) (CDR BLOCK) STREAM.
lass
.
Compiles the block with given HEADER and FIELDS list.
By default, the following case is handled:
(T T)
Blocks are handled in the following way:
The HEADER is used as a selector and compiled through COMPILE-SELECTOR.
Fields are semantically segregated through KEYWORDS and LISTS.
Every time a KEYWORD is encountered, it is taken as the current property
and all following objects until either a LIST or a KEYWORD is encountered
are gathered as the property’s values.
Every time a LIST is encountered, it is taken as a SUB-BLOCK and is
passed to COMPILE-BLOCK with the HEADER being the current block’s
selector prepended to the selector of the sub-block.
Special handling of blocks may occur.
See DEFINE-SPECIAL-BLOCK.
lass
.
(eql :let)
) args0) ¶(eql :supports)
) args0) ¶(eql :page)
) args0) ¶(eql :namespace)
) args0) ¶(eql :media)
) args0) ¶(eql :keyframes)
) args0) ¶(eql :import)
) args0) ¶(eql :font-face)
) args0) ¶(eql :document)
) args0) ¶(eql :charset)
) args0) ¶Compiles a constraint of type FUNC with arguments ARGS to a list of alternative selectors.
By default, the following cases are handled:
(T T)
Concatenates its ARGS together with spaces.
Preserves OR combinations.
(NULL NULL)
Returns NIL
(T NULL)
Returns FUNC
(:OR T)
Passes all ARGS to COMPILE-SELECTOR individually and then APPENDS
all the results together.
(:AND T)
Concatenates its ARGS together without spaces.
Preserves OR combinations.
Special handling of constraints may occur.
See DEFINE-SPECIAL-SELECTOR.
lass
.
(eql :has)
) args0) ¶(eql :where)
) args0) ¶(eql :not)
) args0) ¶(eql :is)
) args0) ¶(eql :nth-of-type)
) args0) ¶(eql :nth-last-of-type)
) args0) ¶(eql :nth-last-child)
) args0) ¶(eql :nth-child)
) args0) ¶(eql :lang)
) args0) ¶(eql :dir)
) args0) ¶(eql :/=)
) args0) ¶(eql :^=)
) args0) ¶(eql :$=)
) args0) ¶(eql :*=)
) args0) ¶(eql :~=)
) args0) ¶(eql :=)
) args0) ¶null
) (args null
)) ¶null
)) ¶(eql :constraint)
) args) ¶(eql :or)
) args) ¶(eql :and)
) args) ¶(eql :parent)
) args) ¶Compile a property of KEY and VALUE to a list of property objects.
By default, the following cases are handled:
(T LIST)
A list is created with one property object, wherein the property-value is the
Space-concatenated list of RESOLVEd VALUEs. The KEY is DOWNCASEd.
(T T)
A list is created with one property object, wherein the property-value is the
RESOLVEd VALUE. The KEY is DOWNCASEd.
Special handling of properties may occur.
See DEFINE-SPECIAL-PROPERTY
lass
.
(eql :box-shadow)
) args0) ¶(eql :filter)
) args0) ¶(eql :appearance)
) args0) ¶(eql :user-select)
) args0) ¶(eql :transition-timing-function)
) args0) ¶(eql :transition-property)
) args0) ¶(eql :transition-duration)
) args0) ¶(eql :transition-delay)
) args0) ¶(eql :transition)
) args0) ¶(eql :transform-style)
) args0) ¶(eql :transform-origin)
) args0) ¶(eql :transform)
) args0) ¶(eql :repeating-radial-gradient)
) args0) ¶(eql :radial-gradient)
) args0) ¶(eql :linear-gradient)
) args0) ¶(eql :text-stroke)
) args0) ¶(eql :content)
) args0) ¶(eql :font-family)
) args0) ¶list
)) ¶Compiles the SELECTOR form into a list of alternative selectors.
By default, the following cases are handled:
(NULL)
Returns NIL.
(LIST)
Calls COMPILE-CONSTRAINT with the SELECTOR’s CAR and CDR.
(T)
Returns a list with the RESOLVEd SELECTOR.
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:
(LIST)
Simply returns the ITEM as a block.
(SYMBOL)
If it’s a keyword, reads until the next keyword or list and returns that as a
property to compile. With property-functions, some sublists may also be read
in automatically. See DEFINE-PROPERTY-FUNCTION. If it is a regular symbol,
CALL-NEXT-METHOD is invoked.
(T)
Signals an error.
lass
.
(eql :filter)
) readable2) ¶symbol
) readable-list) ¶list
) readable-list) ¶array
) readable-list) ¶Resolves THING to a value that makes sense for LASS.
By default the following types are handled:
NULL: NIL
STRING: the THING itself
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
Writes the OBJECT of type TYPE to STREAM.
By default the following TYPEs are handled:
:BLOCK (SELECTOR-LIST OBJECTS*)
Prints the SELECTOR-LIST separated by commas, followed by an opening brace
and the printed list of OBJECTS using WRITE-SHEET-PART. Finally the body is
closed off with a closing brace. Newlines and spaces may be inserted where
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.
lass
.
(eql :superblock)
) block stream) ¶(eql :block)
) block stream) ¶(eql :property)
) attribute stream) ¶(eql :constraint)
) constraint stream) ¶(eql :text)
) block stream) ¶(eql :selector)
) constraints stream) ¶An ASDF source-file component to allow compilation of LASS to CSS in ASDF systems.
Helper macro to define an attribute comparator selector.
lass
.
Creates a block object that can contain other blocks, such as @media, etc.
lass
.
lass
.
null
) (args null
)) ¶null
)) ¶(eql :constraint)
) args) ¶(eql :property)
) args) ¶(eql :or)
) args) ¶(eql :and)
) args) ¶(eql :url)
) args) ¶(eql :url-prefix)
) args) ¶(eql :domain)
) args) ¶(eql :regexp)
) args) ¶lass
.
readable-list
)) ¶automatically generated reader method
lass
.
readable-list
)) ¶automatically generated writer method
Jump to: | (
A B C D E F G I M O P R S W |
---|
Jump to: | (
A B C D E F G I M O P R S W |
---|
Jump to: | *
I O S |
---|
Jump to: | *
I O S |
---|
Jump to: | A C F L P R S W |
---|
Jump to: | A C F L P R S W |
---|