Created
February 24, 2011 18:19
-
-
Save klen/842599 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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