{ "info": { "author": "S\u00e9bastien Pierre", "author_email": "sebastien.pierre@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Utilities" ], "description": "PythonicCSS\n===========\n\n::\n\n Version: 0.0.1\n Updated: 2014-12-08\n URL: http://github.com/sebastien/pythoniccss\n\nPythonicCSS is a pre-compiler that outputs CSS. It was originally\nintended to be CleverCSS 2.0, but as it does not have a fully compatible\nsyntax it did not make sense to keep the same name.\n\nPythonicCSS has the following features:\n\n- Indentation-based structure\n- Automatic prefixing\n- Full CSS3 support (animation, media queries, calc, etc)\n- Modularity (includes) and mixins\n\nSyntax Overview\n===============\n\nPythonicCSS's syntax is based on indentation, just like in Python. The\nmain difference is that PythonicCSS is stricter and always expects the\nright amount of indentation and the use of tabs (not spaces) to do so.\n\nHere's an example of what PythonicCSS looks like (this example is\nactually the same from CleverCSS's documentation).\n\n::\n\n ul#comments, ol#comments:\n margin: 0\n padding: 0\n li:\n padding: 0.4em\n margin: 0.8em 0 0.8em\n h3:\n font-size: 1.2em\n p:\n padding: 0.3em\n p.meta:\n text-align: right\n color: #ddd\n\nSelectors & Rules\n=================\n\nYou can use any CSS-like selector in you rules. You can use ``,`` to\nseparate the selectors on a single line and ``&`` to refer to the parent\nselector in a nested rule.\n\n::\n\n A = 10\n div:\n color: #FF00FF\n content: \"asdasdd\"\n background: #FFAAAAAA.brighten() \n width: 10em * 1.0 + ($A * 10 / 2)\n animation: name 5s\n div, span:\n font-size: 100%\n div:\n &:first-child:\n color: red\n &:last-child:\n color: green\n &:nth-child(2):\n color: yellow\n .Application:\n &.with-base:\n background: 200%\n #Application:\n font-size: 100%\n div[data-type=1.0]:\n font-size: 100%\n *[data-type=1.0]:hover:\n font-size: 100%\n div#Application.widget.application[data-type=Application]:hover:\n font-size: 100%\n\nSome rules will also be automatically prefixed, for instance:\n\n::\n\n -placeholder:\n\nwill generate:\n\n``-moz-placeholder, -webkit-placeholder``\n\nProperties & Expressions\n========================\n\nPCSS allows to evaluate expressions at compile time before generating\nthe resulting CSS code. For instance\n\n::\n\n width: 10em * 3.5\n\nwill result in\n\n::\n\n width: 35em;\n\nProperty values can be expressed relatively to defined variables and\nalso using computations. You can pre-calculate expressions before CSS\nrendering by using PCSS's expressions, or defer the evaluation with\nCSS3's ``calc`` function.\n\nWhile the following will output ``calc(10em * 3.5)``. Note that we need\nto pass the expression as a string parameter, as otherwise the the\nexpression will be evaluted by PCSS.\n\n::\n\n width: calc(\"10em * 3.5\")\n\nAlternatively, you can also quote the whole value, which will just pass\nthe string as-is.\n\n::\n\n width: \"calc(10em * 3.5)\"\n\nPCSS allows for implicit concatenation, as shown in the example below\n\n::\n\n label1:\n padding: $foo + 2 + 3 $foo - 2\n label2:\n padding: ($foo + 2 + 3) ($foo - 2)\n\nAutomatic Prefixing\n===================\n\nPCSS know about which properties and litteral property values to prefix.\nFor instance, in the following example ``transition-property``,\n``transform`` and ``filter`` will be generated with their corresponding\nvendor prefixes.\n\n::\n\n transition-property: color transform filter\n\nSome properties, such as gradients can have different syntaxes,\ndepending on the browser. If CSS3 does not already have a\nrecommendation, WebKit's format will be chosen.\n\n::\n\n background: linear-gradient(to bottom, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%)\n\nwill generated the following CSS code (thanks\nhttp://www.colorzilla.com/gradient-editor/)\n\n.. code:: css\n\n background: #1e5799;\n background: -moz-linear-gradient(top, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);\n background: -webkit-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%);\n background: -o-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%);\n background: -ms-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%);\n background: linear-gradient(to bottom, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%);\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 );\n\nIncludes\n========\n\nThe ``PATH`` will be resolved relatively to the current file, and if not\nfound will be resolved relatively to the current working directory.\n\n::\n\n %include test-include.pcss\n\nVariables\n=========\n\nVariables are declared at the beginning of the file, and can have any\ntype of expression. Note that variables are not evaluated until\nreferenced.\n\nVariables are expected to be ``UPPER_CASE``.\n\n::\n\n FONT_SIZE = 14\n PX = 1em / $FONT_SIZE\n PAD = 20 * $PX\n BACKGROUND_COLOR = white\n BACKGROUND_COLOR_ALT = #F0F0F0\n\nSpecial functions/methods\n=========================\n\nEmbedding URLs\n--------------\n\nIf you would like to embed an image as a data-url, you can do it by\nusing the ``.embed()`` method call after an ``url()`` property.\n\n::\n\n background-image: url(http://ffctn.com/lib/images/nothing.png).embed()\n\nwhich will download/retrieve the file and produce a base-64 encoded data\nURL version of it. Macros ======\n\nMacros allow to define common properties that can be applied all at once\nusing by calling the macro with ``()``\n\n::\n\n @macro cleared:\n clear: bothAA\n content: \"\"\n display: block\n height: 0em\n div.cleared:\n cleared()\n\nCSS3 support\n============\n\nAnimations\n----------\n\nCSS animations can be defined just like in CSS3, using ``from/to`` or\npercentages to define the frames. You can use property groups and macros\njust like in any other PCSS block. Keyframes with from/to\n\n::\n\n @keyframes animation1:\n from:\n background: red\n to:\n background: yellow\n\nKeyframes with %\n\n::\n\n @keyframes animation2:\n 0%:\n background: red\n 100%:\n background: yellow\n\nFont-Face\n---------\n\n::\n\n @font-face:\n font-family: asdas\n\nMedia queries\n-------------\n\n::\n\n @media[screen and (max-width: 300px)]:\n body:\n background-color: lightblue\n\nImport\n------\n\nThe ``@import`` CSS directive is not supported by PCSS.\n\n::\n\n @import url(\"import4.css\") tv, print;\n\nNotable differences with CleverCSS\n==================================\n\nVariables have to be defined with valid expressions::\n\n``FONT_FAMILY = Helvetica, Arial, sans-serif``\n\nWill not work, instead, you'll have to quote the whole text\n\n\\`FONT\\_FAMILY = \"Helvetica, Arial, sans-serif\"\n\nRule trailing colon is optional::\n\n::\n\n div\n color: black\n\nIs a valid PCSS code", "description_content_type": null, "docs_url": null, "download_url": "http://www.github.com/sebastien/pythoniccss/pythoniccss-0.7.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.github.com/sebastien/pythoniccss", "keywords": "css,pre-processor,clever css", "license": "License :: OSI Approved :: BSD License", "maintainer": null, "maintainer_email": null, "name": "pythoniccss", "package_url": "https://pypi.org/project/pythoniccss/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pythoniccss/", "project_urls": { "Download": "http://www.github.com/sebastien/pythoniccss/pythoniccss-0.7.0.tar.gz", "Homepage": "http://www.github.com/sebastien/pythoniccss" }, "release_url": "https://pypi.org/project/pythoniccss/0.7.0/", "requires_dist": null, "requires_python": null, "summary": "A Pythonic CSS pre-processor, designed as a replacement/upgrade to CleverCSS.", "version": "0.7.0" }, "last_serial": 2734296, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7e86774b3c309c4d580d9dc21d36c86c", "sha256": "762ca5f381c62ee428ff69c8f4a51551f5d34d4ecbe4f3a3f39bf7b5544a7da3" }, "downloads": -1, "filename": "pythoniccss-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7e86774b3c309c4d580d9dc21d36c86c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8867, "upload_time": "2014-12-23T22:49:47", "url": "https://files.pythonhosted.org/packages/75/48/ca7b02c1c7e5af963487f5404ff189298bbeca583a05481ea8a37b8cc977/pythoniccss-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "3491cf68ecf8e6a7be7ac99c98485440", "sha256": "c3539a70a39f92821ac20749e2afc2f47dc0140e8727837e7bee3c104aa92e50" }, "downloads": -1, "filename": "pythoniccss-0.0.2.tar.gz", "has_sig": false, "md5_digest": "3491cf68ecf8e6a7be7ac99c98485440", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8854, "upload_time": "2014-12-23T22:59:07", "url": "https://files.pythonhosted.org/packages/22/d6/6f611011f073d4331808e0c529915018262a687c83d1c23ba83dfc135e5e/pythoniccss-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a12fb3f8b9d32c02519615b8f871232e", "sha256": "8f533257f9d13ba3505e946b59316c067184e79305d05fb333c834f9a8a82ef1" }, "downloads": -1, "filename": "pythoniccss-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a12fb3f8b9d32c02519615b8f871232e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8869, "upload_time": "2014-12-23T23:00:02", "url": "https://files.pythonhosted.org/packages/92/a2/400c4b58e3cfbc95152122ca8930738b8766effec904868537408f0aeeac/pythoniccss-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "60389d2a5f36d559a34746953c4b9c3b", "sha256": "5fd1d74e82b9bddff78adbd8c4067912b453e9dd7cfa86079ef8d3b35c727ccd" }, "downloads": -1, "filename": "pythoniccss-0.0.4.tar.gz", "has_sig": false, "md5_digest": "60389d2a5f36d559a34746953c4b9c3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8891, "upload_time": "2014-12-23T23:02:44", "url": "https://files.pythonhosted.org/packages/d0/66/eebd42e97224581c95eeb16acf2b3802182e89cbdefd671a312d712cb548/pythoniccss-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "532ede1ed7766657815198c6d661abf0", "sha256": "170c801dddf07a3983e14d5ba7c9e6b44b9115aa4ee326f9f7e73d1a99625d6a" }, "downloads": -1, "filename": "pythoniccss-0.0.5.tar.gz", "has_sig": false, "md5_digest": "532ede1ed7766657815198c6d661abf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13909, "upload_time": "2014-12-24T18:05:38", "url": "https://files.pythonhosted.org/packages/9d/59/25b9488d0a50c365cbe72ab953c2554d9e728482dccca243c665b66eb983/pythoniccss-0.0.5.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "b6c24f68420a9328f86f25528adbe438", "sha256": "d4e1ea57be09cd7e02aa2ff600046b95abc21266889e471845da068fff4202e9" }, "downloads": -1, "filename": "pythoniccss-0.0.8.tar.gz", "has_sig": false, "md5_digest": "b6c24f68420a9328f86f25528adbe438", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15244, "upload_time": "2014-12-30T21:29:34", "url": "https://files.pythonhosted.org/packages/0d/3a/7618d937c28ab6a3c650a45dd46b24c9326fdcaaf60f402ee4a427c20f21/pythoniccss-0.0.8.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "786aaae4db43b946247a063548525978", "sha256": "0798c79d267357ee88ee33b6c58b9cfbc6799490714f72f6b9c6f2d3b5c7380c" }, "downloads": -1, "filename": "pythoniccss-0.1.0.tar.gz", "has_sig": false, "md5_digest": "786aaae4db43b946247a063548525978", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16933, "upload_time": "2015-01-19T19:16:50", "url": "https://files.pythonhosted.org/packages/68/20/769508054c8b820fe86012d372bbac3c01cdb8f49ef6a523012988d228cf/pythoniccss-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0cd225defb3b07bac80522f737505a4a", "sha256": "b48f2b1aa0aa75a5c6b9c2ab252715b33a180ab171e4287e0605ae0d0b53a0cf" }, "downloads": -1, "filename": "pythoniccss-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0cd225defb3b07bac80522f737505a4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16973, "upload_time": "2015-01-29T16:24:40", "url": "https://files.pythonhosted.org/packages/5a/e1/d4b0fd7a574ec02a6d33c57ac099d8ed947e295c4553554c7cccccf39ef5/pythoniccss-0.1.1.tar.gz" } ], "0.6.5": [ { "comment_text": "", "digests": { "md5": "8f38d53d7cb3112a6aef07e32c8ab94d", "sha256": "6d71cfc859e7bdc6ff5b45bdb25d568da3c3e813aa95c3358a3525c0fba74951" }, "downloads": -1, "filename": "pythoniccss-0.6.5.tar.gz", "has_sig": false, "md5_digest": "8f38d53d7cb3112a6aef07e32c8ab94d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25618, "upload_time": "2016-11-21T16:29:24", "url": "https://files.pythonhosted.org/packages/8e/3a/1d1064f180ac47551a8cb27eae39419c4c25fed8bf4eb33f1b32109aaf54/pythoniccss-0.6.5.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "964413a67e1e417ad1cb3a8dc5b9ddc4", "sha256": "71ece93833a44b2f9778ace09d1a07d760645fb282be3719fa38927116214a0e" }, "downloads": -1, "filename": "pythoniccss-0.7.0.tar.gz", "has_sig": false, "md5_digest": "964413a67e1e417ad1cb3a8dc5b9ddc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26361, "upload_time": "2017-03-27T19:09:22", "url": "https://files.pythonhosted.org/packages/33/b3/f815c6b3e39d3c079b5ef66492571996e1d28c444c33423c5d49a95ef6e5/pythoniccss-0.7.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "964413a67e1e417ad1cb3a8dc5b9ddc4", "sha256": "71ece93833a44b2f9778ace09d1a07d760645fb282be3719fa38927116214a0e" }, "downloads": -1, "filename": "pythoniccss-0.7.0.tar.gz", "has_sig": false, "md5_digest": "964413a67e1e417ad1cb3a8dc5b9ddc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26361, "upload_time": "2017-03-27T19:09:22", "url": "https://files.pythonhosted.org/packages/33/b3/f815c6b3e39d3c079b5ef66492571996e1d28c444c33423c5d49a95ef6e5/pythoniccss-0.7.0.tar.gz" } ] }