Skip to content

Instantly share code, notes, and snippets.

@klen
Created February 24, 2011 18:19
Show Gist options
  • Save klen/842599 to your computer and use it in GitHub Desktop.
Save klen/842599 to your computer and use it in GitHub Desktop.
from hotshot import Profile
import os.path
import sys
def main():
from scss.parser import Stylecheet
p = Stylecheet()
p.loads("""
@mixin font {
font: {
weight: inherit;
style: inherit;
size: 100%;
family: inherit; };
vertical-align: baseline; }
@mixin global { .global { border:red; @include font; }}
@include global;
@mixin rounded-top {
$side: top;
$radius: 10px;
border-#{$side}-radius: $radius;
-moz-border-radius-#{$side}: $radius;
-webkit-border-#{$side}-radius: $radius; }
#navbar li { @include rounded-top; }
#footer { @include rounded-top; }
""")
if __name__ == '__main__':
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
prof = Profile("hotshot.log")
prof.runcall(main)
prof.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment