This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

About tgext.scss

SCSS is a cool and useful extension to CSS, but it always required some effort to be used and even specific production environment configurations for some systems.

tgext.scss has born to make life easier for TurboGears2 developers, it will rely on an internal minimal SCSS compiler (based on Zeta-Library SCSS parser) to serve all the files in your public directory that end with .scss as text/css converting them and minifying them.

Installing

tgext.scss can be installed both from pypi or from bitbucket:

easy_install tgext.scss

should just work for most of the users

Enabling tgext.scss

If tgext.pluggable is available enabling tgext.scss is just a matter of appending to your config/app_cfg.py:

from tgext.pluggable import plug
plug(base_config, 'tgext.scss')

Otherwise manually using tgext.scss is really simple, you edit your config/middeware.py and just after the #Wrap your base TurboGears 2 application with custom middleware here comment wrap app with SCSSMiddleware:

from tgext.scss import SCSSMiddleware

make_base_app = base_config.setup_tg_wsgi_app(load_environment)

def make_app(global_conf, full_stack=True, **app_conf):
    app = make_base_app(global_conf, full_stack=True, **app_conf)

    # Wrap your base TurboGears 2 application with custom middleware here
    app = SCSSMiddleware(app)

    return app

Now you just have to put your .scss file inside public/css and they will be served as CSS.

@Import Support

tgext.scss provides minimal support for @import command. The required syntax is in the form:

@import url('/css/file.scss');

The specified path is relative to your project public files directory. Nested imports are not implemented right now, this means that imported files cannot import another scss

How much it will slow me down?

Actually as tgext.scss uses aggressive caching it won’t you slow down at all, indeed it might even be able to serve you CSS files even faster.

Here is the report of a benchmark (absolutely not reliable as every other benchmark) made on paster serving the same CSS file or SCSS:

$ /usr/sbin/ab -n 1000 http://localhost:8080/css/style.css
Requests per second:    961.26 [#/sec] (mean)

$ /usr/sbin/ab -n 1000 http://localhost:8080/css/style.scss
Requests per second:    1200.34 [#/sec] (mean)

In these case SCSS is even faster than directly serving the same css file as it is served from memory (due to caching performed by tgext.scss) and is also minified resulting in less bandwith usage.

Off course this means that tgext.scss will require a bit more memory than serving your css files alone, but as css files are usually small this amount is trascurable.

Release History

Release History

0.4.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0dev

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1dev

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1dev

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tgext.scss-0.4.3.tar.gz (4.5 kB) Copy SHA256 Checksum SHA256 Source Mar 19, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting