{ "info": { "author": "Rim Valiulin", "author_email": "rim.valiulin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP" ], "description": "====\r\nPass\r\n====\r\nhttp://github.com/rimvaliulin/pass\r\n\r\nThe **pythonic awesome** stylesheet language.\r\n\r\nAbout\r\n=====\r\nPass is a dynamic stylesheet language and css preprocessor for web-developers that makes ccs coding simple and\r\nbeautiful by having dynamic behavior such as variables, inheritance, operations and functions with python like indented syntax.\r\n\r\nInstallation\r\n------------\r\n\r\n::\r\n\r\n pip install pass\r\n\r\nCommand-line usage\r\n------------------\r\n\r\n::\r\n\r\n pass style.pass\r\n\r\nUsage in Code\r\n-------------\r\n\r\n::\r\n\r\n import Pass\r\n\r\n Pass('style.pass')\r\n\r\nSyntax\r\n======\r\n - Every piece of knowledge must have a single, unambiguous, authoritative representation within a system. `\"DRY - don't repeat yourself\" `_\r\n - There should be one \u2014 and preferably only one \u2014 obvious way to do it\", from `\"The Zen of Python\" `_.\r\n\r\nVariables and operators\r\n-----------------------\r\nVariables allow you to specify widely used values in a single place, and then re-use them throughout the stylesheet,\r\nmaking global changes as easy as changing one line of code.\r\n\r\n+------------------------------------------+------------------------------------------+\r\n|:: |:: |\r\n| | |\r\n| // Pass | /* Compiled CSS */ |\r\n| link_active = #1f6ba2 | .menu-item { |\r\n| link_hover = #ccc | color: #1f6ba2; |\r\n| link_height = 32px | line-height: 16px |\r\n| link_size = 1em | } |\r\n| | a:hover { |\r\n| .menu-item | color: #ccc |\r\n| color link_active | font-size: 1.5em |\r\n| line-height link_height / 2 | background: #000 |\r\n| | } |\r\n| a:hover | |\r\n| color link_hover | |\r\n| font-size link_size + 0.5 | |\r\n| background #000 | |\r\n| | |\r\n+------------------------------------------+------------------------------------------+\r\n\r\nNested selectors\r\n----------------\r\nRather than constructing long selector names to specify inheritance, you can simply nest selectors\r\ninside other selectors.\r\n\r\n+------------------------------------------+------------------------------------------+\r\n|:: |:: |\r\n| | |\r\n| // Pass | /* Compiled CSS */ |\r\n| line_height = 16px | .menu { |\r\n| .menu | margin-bottom 8px |\r\n| margin-bottom line_height/2 | } |\r\n| -item | .menu-item { |\r\n| float left | float left |\r\n| color #fff | color #fff |\r\n| :visited | } |\r\n| color #eee | .menu-item:visited { |\r\n| _active | color #eee |\r\n| :hover | } |\r\n| color #ccc | .menu-item_active, .menu-item:hover { |\r\n| span | color #ccc |\r\n| background-color #ccc | } |\r\n| | .menu span { |\r\n| | background-color #ccc |\r\n| | } |\r\n| | |\r\n+------------------------------------------+------------------------------------------+\r\n\r\nSelector inheritance\r\n--------------------\r\nClass naming scheme::\r\n\r\n block-[element]\r\n [child_]parent-[[parent]_child]\r\n\r\n+------------------------------------------+------------------------------------------+\r\n|:: |:: |\r\n| | |\r\n| // Pass | /* Compiled CSS */ |\r\n| ._foo | ._foo,.foo,.\u0441hild_foo,.new_child_foo{}|\r\n| pass | .foo{} |\r\n| | .child_foo,.new_child_foo{} |\r\n| .foo | .new_child_foo{} |\r\n| pass | |\r\n| | |\r\n| .\u0441hild_foo | |\r\n| pass | |\r\n| | |\r\n| .new_child_foo | |\r\n| pass | .bar-link,bar-link_active{} |\r\n| | bar-link_active{} |\r\n| .bar | |\r\n| -link | |\r\n| pass | |\r\n| _acive | |\r\n| pass | |\r\n+------------------------------------------+------------------------------------------+\r\n\r\n\r\nParent directive\r\n--------------------\r\nUsage::\r\n\r\n @parent \"style.pass\"\r\n\r\n\r\nFunctions\r\n---------\r\n\r\nColor initialization\r\n####################\r\n\r\nrgb(r, g, b) - Converts an Rgb(r, g, b) triplet into a color\r\n\r\nrgba(r, g, b, a) - Converts an Rgba(r, g, b, a) quadruplet into a color.\r\n\r\nhsl(h, s, l) - Converts an Hsl(h, s, l) triplet into a color.\r\n\r\nhsla(h, s, l, a) - Converts an Hsla(h, s, l) quadruplet into a color.\r\n\r\n\r\nGet/set color components\r\n########################\r\n\r\nred(color, value=None) - Return the red component of the given color.\r\n\r\ngreen(color, value=None) - Return the green component of the given color.\r\n\r\nblue(color, value=None) - Return the blue component of the given color.\r\n\r\nhue(color, value=None) - Return the hue of the given color.\r\n\r\nsaturation(color, value=None) - Return the saturation of the given color.\r\n\r\nlightness(color, value=None) - Return the lightness of the given color.\r\n\r\nalpha(color, value=None) - Return the alpha component of the given color.\r\n\r\nColor adjustment\r\n################\r\n\r\nspinin(color, value=Pr(10)) - Changes the hue of a color.\r\n\r\nspinout(color, value=Pr(10)) - Changes the hue of a color.\r\n\r\nlighten(color, value=Pr(10)) - Makes a color lighten.\r\n\r\ndarken(color, value=Pr(10)) - Makes a color darker.\r\n\r\nsaturate(color, value=Pr(10)) - Makes a color more saturated.\r\n\r\nesaturate(color, value=Pr(10)) - Makes a color less saturated.\r\n\r\nfadein(color, value=Pr(10)) - Add or change an alpha layer for any color value.\r\n\r\nfadeout(color, value=Pr(10)) - Add or change an alpha layer for any color value.\r\n\r\ngrayscale(color) - Converts a color to grayscale.\r\n\r\ncomplement(color) - Returns the complement of a color.\r\n\r\ninvert(color) - Returns the inverse of a color.\r\n\r\nmix(color, color1, weight=Pr(50)) - Mixes two colors together.\r\n\r\nString Functions\r\n################\r\n\r\nquote(s) - Removes the quotes from a string.\r\n\r\nunquote(s) - Adds quotes to a string.\r\n\r\nNumber Functions\r\n################\r\n\r\npercentage(value) - Converts a unitless number to a percentage.\r\n\r\nround_(value, digits=0) - Rounds a number to the nearest whole number.\r\n\r\nceil(value) - Rounds a number up to the nearest whole number.\r\n\r\nfloor(value) - Rounds a number down to the nearest whole number.\r\n\r\n\r\nCommand-line options\r\n--------------------\r\n\r\n--version show program's version number and exit\r\n-h, --help show this help message and exit\r\n-i, --inherit use selector inheritance, rather then property duplication\r\n-c, --compressed compress imported .css files\r\n-e, --empty-selectors keep empty selectors\r\n-r, --respect-indents respect indentes\r\n-n, --newlines use newlines\r\n-I INDENT, --indent=INDENT .pass file indentation. default 2 breaks\r\n-C CSS_INDENT, --css-indent=CSS_INDENT .css file indentation. default 4 breaks\r\n-C CSS_INDENT, --css-indent=CSS_INDENT .css file indentation. default 4 breaks\r\n\r\nLicense\r\n=======\r\n\r\nSee ``LICENSE`` file.\r\n\r\n::\r\n\r\n> Copyright (c) 2012 Rim Valiulin\r\n\r\n\r\n:Author: Rim Valiulin", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/rimvaliulin/pass", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rimvaliulin/pass", "keywords": "css,css3,process pass,css nesting,css variable,css,gradients css,gradients css3,pass compiler,pass css,pass inheritance,pass,nested css,parser,preprocessor,bootstrap css,bootstrap pass,style,styles,stylesheet,variables in css,css pass", "license": "Copyright (c) 2012-2013 Valiulin Rim Mahamatovich\r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without modification,\r\nare permitted provided that the following conditions are met:\r\n\r\n 1. Redistributions of source code must retain the above copyright notice,\r\n this list of conditions and the following disclaimer.\r\n\r\n 2. Redistributions in binary form must reproduce the above copyright\r\n notice, this list of conditions and the following disclaimer in the\r\n documentation and/or other materials provided with the distribution.\r\n\r\n 3. Neither the name of Pass nor the names of its contributors may be used\r\n to endorse or promote products derived from this software without\r\n specific prior written permission.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\r\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\r\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\r\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "maintainer": "Rim Valiulin", "maintainer_email": "rim.valiulin@gmail.com", "name": "Pass", "package_url": "https://pypi.org/project/Pass/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Pass/", "project_urls": { "Download": "https://github.com/rimvaliulin/pass", "Homepage": "https://github.com/rimvaliulin/pass" }, "release_url": "https://pypi.org/project/Pass/1.0.5/", "requires_dist": null, "requires_python": null, "summary": "The pythonic awesome stylesheet language", "version": "1.0.5" }, "last_serial": 1873971, "releases": { "1.0.2": [ { "comment_text": "", "digests": { "md5": "8ee6ca36ba6ec316130e897ae089b632", "sha256": "2939dd9f7ffda2c638f2109b8d33578aee62886ee959aea3c169d8d207267084" }, "downloads": -1, "filename": "Pass-1.0.2.tar.gz", "has_sig": false, "md5_digest": "8ee6ca36ba6ec316130e897ae089b632", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27574, "upload_time": "2013-08-21T11:42:56", "url": "https://files.pythonhosted.org/packages/48/c1/fa22416041b5bd6bb4b41ed50713af3ee7ef5a926a88005cc5fd1421911f/Pass-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "76b6f12a78aba8125aa942cc4112d0dc", "sha256": "f5fa09b5d25d3047c30fa093f74cac751d23bf48025cc9aa7a0d8bbbb3cc2998" }, "downloads": -1, "filename": "Pass-1.0.3.tar.gz", "has_sig": false, "md5_digest": "76b6f12a78aba8125aa942cc4112d0dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27432, "upload_time": "2013-08-21T11:51:00", "url": "https://files.pythonhosted.org/packages/b3/e0/ec50906b3988ba80c9ee1019655df1dbdecb538be23283db3ae22bfc8e64/Pass-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "9437f092f05353d09cce91a004a42faa", "sha256": "e2f9ad9a99afd2b17d45843be51625f5baf4c0748c67c7106db7805843d4596b" }, "downloads": -1, "filename": "Pass-1.0.4.tar.gz", "has_sig": false, "md5_digest": "9437f092f05353d09cce91a004a42faa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27422, "upload_time": "2013-08-21T11:53:34", "url": "https://files.pythonhosted.org/packages/a6/87/9fe4e7330c40a6d7829bf79eb59275dd4ec502cb8b01ea6dcc2ac2aceb61/Pass-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "b71c915eb8764cb2298619eef3016af5", "sha256": "e1bde279afed9b238390565ed3d2dd6bc52ededb966bef0d394340f8e0d63538" }, "downloads": -1, "filename": "Pass-1.0.5.tar.gz", "has_sig": false, "md5_digest": "b71c915eb8764cb2298619eef3016af5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30653, "upload_time": "2014-02-26T13:23:14", "url": "https://files.pythonhosted.org/packages/08/53/e4161ff2546d69216940bf3443225dbf19fcae1ca4c24b537bb61f31f95f/Pass-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b71c915eb8764cb2298619eef3016af5", "sha256": "e1bde279afed9b238390565ed3d2dd6bc52ededb966bef0d394340f8e0d63538" }, "downloads": -1, "filename": "Pass-1.0.5.tar.gz", "has_sig": false, "md5_digest": "b71c915eb8764cb2298619eef3016af5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30653, "upload_time": "2014-02-26T13:23:14", "url": "https://files.pythonhosted.org/packages/08/53/e4161ff2546d69216940bf3443225dbf19fcae1ca4c24b537bb61f31f95f/Pass-1.0.5.tar.gz" } ] }