[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction



July 2010 — updated on : June 2010

All the versions of this article:

The |compacte filter is applied to a CSS or JavaScript file[The file to which the filter is applied must have either ".js" or ".css" as its filename extension.]] and creates a compressed copy which is smaller than the original as it deletes all comments, empty declarations, unnecessary blank spaces and lines etc. [1] (for Javascript files, the filter uses the JavaScriptPacker class).

Ater having archived this new file into the local/ directory, the filter returns the link: [<link rel="stylesheet" href="(#CHEMIN{spip_style.css}|compacte)" type="text/css" media="all" />] which will return something like: <link rel="stylesheet" href="local/cache-css/spip_style-compacte-092e.css" type="text/css" media="all" />


[1For CSS files, the filter transforms all URLs in the file into absolute URLs

#div {
 background : url(../prive/images/fond-gris-anim.gif);  /** image modifiable **/
 width : 48px;
 height : 48px;
 margin : auto;



Show the template of this page Site powered by SPIP | Translation area | Private area