The cl-minify-css Reference Manual

This is the cl-minify-css Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:27:37 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-minify-css

To minify css with common lisp.

Maintainer

noloop <>

Author

noloop <>

Home Page

https://github.com/noloop/cl-minify-css

Source Control

(GIT git@github.com:noloop/cl-minify-css.git)

Bug Tracker

https://github.com/noloop/cl-minify-css/issues

License

GPLv3

Version

1.0.0

Source

cl-minify-css.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 cl-minify-css/src

Source

cl-minify-css.asd.

Parent Component

cl-minify-css (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 cl-minify-css/cl-minify-css.asd

Source

cl-minify-css.asd.

Parent Component

cl-minify-css (system).

ASDF Systems

cl-minify-css.


4.1.2 cl-minify-css/src/package.lisp

Source

cl-minify-css.asd.

Parent Component

src (module).

Packages

noloop.cl-minify-css.


4.1.3 cl-minify-css/src/cl-minify-css.lisp

Dependency

package.lisp (file).

Source

cl-minify-css.asd.

Parent Component

src (module).

Public Interface

5 Packages

Packages are listed by definition order.


5.1 noloop.cl-minify-css

Source

package.lisp.

Nickname

cl-minify-css

Use List

common-lisp.

Public Interface

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: class-name-without-spaces (s)

It returns a string without spaces, newlines and tabs for a given css class name. Example: (class-name-without-spaces "div p,
div p + p, h1,
#myid ") => "div p,div p+p,h1,#myid"

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.

Function: end-bracket-index (css start-bracket)

It returns the closing bracket index (here called end-bracket) of a given onpening bracket index (here called start-bracket) of one string (here called css).

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.

Function: make-string-from-chars (char-list)

It returns a string for given char list. Example: (make-string-from-chars ’(#s #o #m #e)) => "some"

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.

Function: minify-css (css &key keep-license-p)

It minify a css code removing spaces, newlines, tabs, comments. If want keep the license comment use :keep-license-p t.

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.

Function: minify-css-class (css &key keep-license-p)

It returns the minified class string for a given css class string. If :keep-license-p t the comments that have "license" (non-case-sensitive) are kept. Example: (minify-css ".myclass { margin: .67em 0; /* some comment */
padding: 5px; } ") => ".myclass{margin:.67em 0;padding:5px;}"

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.

Function: properties-without-spaces (s)

It returns a string without spaces, newlines and tabs in the properties for given css. Example: (properties-without-spaces "margin: .67em 0;
padding: 5px; ") => "margin:.67em 0;padding:5px;"

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.

Function: remove-css-comments-recursive (css &key start-search keep-license-p)

It removes all comments of the css code, if :keep-license-p t the comments that have "license" (non-case-sensitive) are kept. Use :start-search <number> to remove the comments only after a start position string.

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.

Function: remove-spaces-newlines-tabs (s)

It returns a string without all spaces, newlines and tabs for given string. Example: (remove-spaces-newlines-tabs " hi, I’m here! ") => "hi,I’mhere!"

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.

Function: split-css-in-classes (css &optional classes)

It returns a list with splited classes strings of a given css string. If the css has media-queries instead of a string is returned a list where the first is the media query, and the rest is the string classes. Example: (split-css-in-classes "body{color:red;}@media (min-width:30em){body{color:green;}div{font-size:1em;}}")
=> ("body{color:red;}"
("@media (min-width:30em)"
("body{color:green;}"
"div{font-size:1em;}")))

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.

Function: trim (s)

It returns a string without all spaces, newlines and tabs in its extremes, this functions doesn’t make nothing about the middle of the string. Example: (string-trim " hi, I’m here! ") => "hi, I’m here!"

Package

noloop.cl-minify-css.

Source

cl-minify-css.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables