tinycss
tinycss copied to clipboard
tinycss is a complete yet simple CSS parser for Python.
The generated speedups.c file included in the tinycss 0.4 release on PyPI doesn't build correctly on Python 3.7. The file was generated with an old version of Cython that didn't...
How can a get a list of all the links inside the parsed sheet?
The readthedocs.io docs for this do not include the docstrings. So I am forced to go and read the code to find out how the classes work. Not that that's...
``` Python 3.5.1 |Continuum Analytics, Inc.| (default, Dec 7 2015, 11:16:01) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import...
It's ... really confusing, and appears to be missing pieces.
While parsing a CSS file I'd like to convert any colours from "white" or "#FFF" to "#FFFFFF". I tried modifying the token's value accordingly but calling as_css() doesn't appear to...
See https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes for a description of this CSS feature. `test.css`: ``` @keyframes identifier { 0% { top: 0; left: 0; } 30% { top: 50px; } 68%, 72% { left:...
I was trying to explore the parser options for tinycss. When typing in 'css21' as the parser, I got the below error. Here is the IPython snippet. ``` python In...
Hi there, just wondering if you ever considered something that could help one get the styles for a certain element and/or class from the list of rules.. say if I...
Currently tinycss just drops tokens for invalid declarations or rules. This is fine for an UA like WeasyPrint, but not for a minifier: what is invalid now may become valid...