aboutsummaryrefslogtreecommitdiff
path: root/readme.rst
blob: f9a3c2df37de32bad8bafced2b00db72e871cb4e (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
=======
CSS_lib
=======

.. default-role:: literal

.. role:: ocaml(code)
   :language: ocaml

`css_lib` is a library for OCaml which allow to work with CSS file. The library
is build on top on `css-parser`_.

.. _css-parser: https://github.com/astrada/ocaml-css-parser/


Installation
============

The repository is hosted at this location :
http://git.chimrod.com/css_lib.git/. You can install the library with opam :

.. code-block:: bash

  opam pin add http://git.chimrod.com/css_lib.git

css_merge
=========

`css_merge` is a standalone program which combine multiple css document into a
single one. It produce a minified output resulting of all the document.

Usage
-----

.. code-block:: bash

 css_merge -out ${out_file} file1.css file2.css …

The file `file1.css` and `file2.css` will be combined together, the rule from
`file2.css` overrides the one given in `file1.css`.

Example
-------

.. code-block:: css

  body, p {
      color: "black";
  }

  body, a {
      color: "red";

  }

will become

.. code-block:: css

  p{color:"black"}a,body{color:"red"}