{"id":15677047,"url":"https://github.com/danielgtaylor/django-ccss","last_synced_at":"2025-09-05T11:41:01.730Z","repository":{"id":706410,"uuid":"352908","full_name":"danielgtaylor/django-ccss","owner":"danielgtaylor","description":"Django CleverCSS","archived":false,"fork":false,"pushed_at":"2011-07-03T22:08:25.000Z","size":580,"stargazers_count":13,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T00:43:53.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielgtaylor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-10-28T16:19:15.000Z","updated_at":"2020-10-06T19:16:53.000Z","dependencies_parsed_at":"2022-08-16T10:45:18.608Z","dependency_job_id":null,"html_url":"https://github.com/danielgtaylor/django-ccss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielgtaylor/django-ccss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fdjango-ccss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fdjango-ccss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fdjango-ccss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fdjango-ccss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielgtaylor","download_url":"https://codeload.github.com/danielgtaylor/django-ccss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fdjango-ccss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273752957,"owners_count":25161910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T16:08:16.939Z","updated_at":"2025-09-05T11:41:01.678Z","avatar_url":"https://github.com/danielgtaylor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Django CleverCSS\n================\nThe django-ccss module provides a quick and simple way for you to integrate CleverCSS into your Django workflow. \u003ca href=\"http://sandbox.pocoo.org/clevercss/\"\u003eCleverCSS\u003c/a\u003e is a Python-like syntax for generating CSS that supports nesting, variables, and a few other neat features, making it extremely useful for rapidly developing and managing complex CSS configurations. The goal of this module is to be as simple and straightforward as possible while speeding up the development of your Django site.\n\nFeatures\n--------\nThe django-ccss module has the following features:\n\n * Generate CSS from templates using any valid Django template loader\n     * This includes files, app templates, eggs, etc\n     * The loading order is the same as for any normal Django template\n * Automatically regenerate CSS using the development server\n * Manually generate CSS using the 'ccss' command\n * Requires no database tables, custom views or extra caching\n * The only dependency is Django itself\n\nInstallation \u0026 Overview\n-----------------------\nInstallation of the django-ccss module is incredibly easy!\n\n 1. Download the source to your Django project as 'ccss'\n 1. Add 'ccss' to your INSTALLED_APPS in settings.py\n 1. Create CleverCSS templates in any template directory\n     * By default you must put the files under the styles directory (see settings)\n     * You must name the templates with a .ccss extension\n     * You may use any number of subfolders to organize your templates\n 1. Run the development server with ./manage.py runserver\n 1. Whenever you update your production servers, run ./manage.py ccss\n\nYour CSS files will be in your MEDIA_ROOT under the styles directory by default.\n\nSettings\n--------\nThe following settings are available and can be set in your settings.py:\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eName\u003c/th\u003e\n        \u003cth\u003eDefault\u003c/th\u003e\n        \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eCSS_PATH\u003c/td\u003e\n        \u003ctd\u003e\"styles\"\u003c/td\u003e\n        \u003ctd\u003eThe path, relative to your MEDIA_ROOT, to put rendered CSS templates\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eCCSS_PATH\u003c/td\u003e\n        \u003ctd\u003eCSS_PATH\u003c/td\u003e\n        \u003ctd\u003eThe path, relative to your TEMPLATE_DIRS, to look for CleverCSS templates\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\nLimitations\n-----------\nWhile it is possible to load CleverCSS templates from Python eggs, zip files, and other more exotic sources it is not possible to query those sources for .ccss files easily. This means that those templates will not be automatically found and rendered to CSS; instead you must manually do so with e.g. ./manage.py ccss name1.ccss subdir/name2.ccss ... and if they are found by Django's template loaders the corresponding CSS files will be generated in your media path.\n\nQuick Example\n-------------\nStill a bit confused? Here's a quick and dirty example. After adding 'ccss' to your INSTALLED_APPS create a 'templates' directory in the same location as this file you are currently reading. Inside of that directory create a 'styles' directory. Inside of there, create a file named test.ccss and put the following into it:\n\n    basecolor = red;\n\n    body:\n        color: white\n        background-color: black\n\n    a:\n        color: $basecolor\n        text-decoration: underline\n\n        \u0026:hover:\n            color: $basecolor.brighten(30)\n            text-decoration: underline\n\nThen run ./manage.py ccss and take a look in your MEDIA_ROOT at styles/test.css. That file can now be included like normal in your Django templates. When you've created a default view and base template that includes the CSS file, you can run ./manage.py runserver and go to http://localhost:8000/ in your browser like normal. Anytime you update your test.ccss file the test.css file will be automatically regenerated, all you need to do is hit refresh in your browser. When you deploy to a production server and no longer use the development server, use ./manage.py ccss to regenerate outdated CSS files.\n\nAlternatives\n------------\nSeveral alternatives exist which provide similar functionality in different ways. While I believe they are more complex, more difficult to setup, and more difficult to use you may find that they are exactly what you need.\n\n * \u003ca href=\"http://code.google.com/p/django-clevercss/\"\u003edjango-clevercss\u003c/a\u003e\n * \u003ca href=\"http://github.com/dziegler/django-css\"\u003edjango-css\u003c/a\u003e\n\nLicense\n-------\nCopyright (c) 2009 Daniel G. Taylor \u003cdan@programmer-art.org\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielgtaylor%2Fdjango-ccss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielgtaylor%2Fdjango-ccss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielgtaylor%2Fdjango-ccss/lists"}