{ "info": { "author": "Jared Forsyth", "author_email": "jared@jaredforsyth.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Programming Language :: Python" ], "description": "=========\nCleverCSS\n=========\n\nCleverCSS is a small markup language for CSS inspired by Python that can be used\nto build a style sheet in a clean and structured way. In many ways it's cleaner\nand more powerful than CSS2 is.\n\nThe most obvious difference to CSS is the syntax: it is indentation based and\nnot flat. While this is obviously against the Python Zen, it's nonetheless a\ngood idea for structural styles.\n\n\nNew Syntax Additions\n====================\n\nImports\n----------\n`(commit) `_\n\nThis works like normal css @imports, but expects a ccss file, which is then\nparsed, allowing cross-sheet variables\n\nBackstrings (literal CSS)\n-------------------------------\n`(commit) `_\n\nSometimes CleverCSS is a bit too clever for its own good and you just\nwant to pass something directly to CSS. For instance, functions that\naren't rgb() or url() need to be escaped. Added is a simple new\nbacktick-surrounded string format that will be passed verbatim without\nfurther processing. Example::\n\n .gradient:\n background: `-moz-linear-gradient(...)`\n\nSpritemaps\n------------\n`(commit) `_\n\nCommonly in CSS, you'll have an image of all your UI elements, and then use\nbackground positioning to extract a part of that image. CleverCSS helps you\nwith this, via the `spritemap(fn)` call. For example::\n\n ui = spritemap('ui.sprites')\n some_button = $ui.sprite('some_button.png')\n other_button = $ui.sprite('other_button.png')\n\n div.some_button:\n background: $some_button\n\n div.other_button:\n background: $other_button\n width: $other_button.width()\n height: $other_button.height()\n\nMix-ins!!\n---------\n\nThere is currently only partial mixin support -- arguments are not yet\nimplemented. But they will be...sometime soon. Anyway, the syntax for a macro\nis [currently] pretty pythonic::\n\n def macro:\n color: red\n border-width: 5px - 1px\n\n body:\n $macro\n\nThis syntax may change, though, b/c conceivably \"def macro:blah\" could refer\nto the CSS \"def macro { blah }\", so there is some inconsistent magic going in.\n\nNutshell\n========\n\nTo get an idea of how CleverCSS works you can see a small example below. Note\nthe indentation based syntax and how you can nest rules::\n\n ul#comments, ol#comments:\n margin: 0\n padding: 0\n\n li:\n padding: 0.4em\n margin: 0.8em 0 0.8em\n\n h3:\n font-size: 1.2em\n p:\n padding: 0.3em\n p.meta:\n text-align: right\n color: #ddd\n\nOf course you can do the very same in CSS, but because of its flat nature the\ncode would look more verbose. The following piece of code is the CleverCSS\noutput of the above file::\n\n ul#comments,\n ol#comments {\n margin: 0;\n padding: 0;\n }\n\n ul#comments li,\n ol#comments li {\n padding: 0.4em;\n margin: 0.8em 0 0.8em;\n }\n\n ul#comments li h3,\n ol#comments li h3 {\n font-size: 1.2em;\n }\n\n ul#comments li p,\n ol#comments li p {\n padding: 0.3em;\n }\n\n ul#comments li p.meta,\n ol#comments li p.meta {\n text-align: right;\n color: #dddddd;\n }\n\nBut that's only a small example of what you can do with CleverCSS. Have a look\nat the following documentation of CleverCSS for more details.", "description_content_type": null, "docs_url": null, "download_url": "http://github.com/jabapyth/clevercss2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://sandbox.pocoo.org/clevercss/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "CleverCSS2", "package_url": "https://pypi.org/project/CleverCSS2/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/CleverCSS2/", "project_urls": { "Download": "http://github.com/jabapyth/clevercss2", "Homepage": "http://sandbox.pocoo.org/clevercss/" }, "release_url": "https://pypi.org/project/CleverCSS2/0.5/", "requires_dist": null, "requires_python": null, "summary": "python inspired sass-like css preprocessor", "version": "0.5" }, "last_serial": 783951, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "03729a5606bd1af28617e444fa7f346f", "sha256": "10a1bcacad64f4a1312b62196989d72ee167fea5bbeea117eb259a420c31ad1f" }, "downloads": -1, "filename": "CleverCSS2-0.5.tar.gz", "has_sig": false, "md5_digest": "03729a5606bd1af28617e444fa7f346f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16020, "upload_time": "2010-07-15T18:46:07", "url": "https://files.pythonhosted.org/packages/3c/46/758a884b588dadf2bb6f6efa96d69e008f2e73c318ee00915cd7fdf5dbe5/CleverCSS2-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "03729a5606bd1af28617e444fa7f346f", "sha256": "10a1bcacad64f4a1312b62196989d72ee167fea5bbeea117eb259a420c31ad1f" }, "downloads": -1, "filename": "CleverCSS2-0.5.tar.gz", "has_sig": false, "md5_digest": "03729a5606bd1af28617e444fa7f346f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16020, "upload_time": "2010-07-15T18:46:07", "url": "https://files.pythonhosted.org/packages/3c/46/758a884b588dadf2bb6f6efa96d69e008f2e73c318ee00915cd7fdf5dbe5/CleverCSS2-0.5.tar.gz" } ] }