Home > csstty

csstty

Csstty is a project mainly written in Python, it's free.

CSS implementation for tty media

csstty

csstty is a CSS implementation for tty media written in Python. It uses html5lib to parse HTML, cssutils to parse CSS, lxml.cssselect to apply CSS, and termcolor for rendering.

cssselect.py is a patched version of lxml.cssselect to handle a default namespace.

Running CSS Test Suite

There is an official W3C CSS Test Suite. You can get it with Mercurial. Be warned that the suite is pretty big: it weighs more than 300 MB.

hg clone http://hg.csswg.org/test/
ln -s test/approved/css2.1/src css21

Some tests even pass on csstty! You can run an individual test like this:

python csstty.py css21/box-display/display-001.xht

Tests that the author has confirmed to pass are listed in PASS file.

Previous:rbvis