summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG10
-rw-r--r--README.rst13
-rw-r--r--pyScss.egg-info/PKG-INFO387
-rw-r--r--scss/scss_meta.py32
-rw-r--r--setup.py7
5 files changed, 218 insertions, 231 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0b5f454..808827d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,16 @@
Changelog
=========
+1.0.9 - Dec 22, 2011
+ + Optimizations in the scanner.
+ + Added background-noise() for compass-recipes support.
+ + enumerate() and range() can go backwards. Ex.: range(3, 0) goes from 3 to 0.
+ + Added line numbers and files for errors.
+ + Added support for FireSass for Firebug
+ + nth(n) is round (returns nth mod len item of the list).
+ + --watch added to the command line.
+ + Several bugs fixed.
+
1.0.8 - May 13, 2011
+ Changed source color ($src-color) default to black.
+ Moved the module filename to __init__.py and module renamed back to scss.
diff --git a/README.rst b/README.rst
index 675d238..5b3b4f2 100644
--- a/README.rst
+++ b/README.rst
@@ -258,19 +258,6 @@ following `myfile.css`::
// Stuff goes here...
-Benchmarks
-==========
-pyScss has been optimized for speed. Compiling **Compass 0.11.beta.2**
-(`compass/doc-src/content/stylesheets/screen.scss`)
-
-...using **Sass 3.1.0.alpha.221**::
-
- Compilation took 2.683s (w/o cache)
- Compilation took 1.35s (cached)
-
-...using **pyScss 1.0 beta**::
-
- Compilation took 0.614s
Bug tracker
===========
diff --git a/pyScss.egg-info/PKG-INFO b/pyScss.egg-info/PKG-INFO
index 67ec6a8..f6010a5 100644
--- a/pyScss.egg-info/PKG-INFO
+++ b/pyScss.egg-info/PKG-INFO
@@ -1,16 +1,16 @@
Metadata-Version: 1.0
Name: pyScss
-Version: 1.0.8
+Version: 1.0.9
Summary: pyScss, a Scss compiler for Python
Home-page: http://github.com/Kronuz/pyScss
Author: German M. Bravo (Kronuz)
Author-email: german.mb@gmail.com
License: MIT
-Download-URL: http://github.com/Kronuz/pyScss/tarball/v1.0
+Download-URL: http://github.com/Kronuz/pyScss/tarball/v1.0.9
Description: pyScss, a Scss compiler for Python
==================================
:Author:
- German M. Bravo (Kronuz) <german.mb@gmail.com>
+ German M. Bravo (Kronuz) <german.mb@gmail.com>
About
=====
@@ -31,209 +31,209 @@ Description: pyScss, a Scss compiler for Python
========
pyScss is fully compatible with SCSS (Sass) 3.2 ...it has:
- * **Compass**: Compass 0.11 Support
- * **Nested rules**
- * **Keyword arguments**
- * **Mixins**: `@mixin`, `@include`
- * **Functions**: `@function`, `@return`
- * **Inheritance**: `@extend`
- * **Conditions**: `@if`, `@else if`, `@else`
- * **Loops**: `@for`, `@each`
- * **Variables**: `$`, `@variables`, `@vars`
- * **Sprites**: `sprite-map()`, `sprite()`, `sprite-position()`, `sprite-url()`, ...
- * **Images**: `image-url()`, `image-width()`, `image-height()`, ...
- * **Embedded (inline) images**: `inline-image()`
- * **Colors handling**: `adjust-color()`, `scale-color()`, `opacify()`/`transparentize()`, `lighten()`/`darken()`, `mix()`, ...
- * **Math functions**: `sin()`, `cos()`, `tan()`, `round()`, `ceil()`, `floor()`, `pi()`, ...
- * **CSS Compression**: `@option compress:yes;`
+ * **Compass**: Compass 0.11 Support
+ * **Nested rules**
+ * **Keyword arguments**
+ * **Mixins**: `@mixin`, `@include`
+ * **Functions**: `@function`, `@return`
+ * **Inheritance**: `@extend`
+ * **Conditions**: `@if`, `@else if`, `@else`
+ * **Loops**: `@for`, `@each`
+ * **Variables**: `$`, `@variables`, `@vars`
+ * **Sprites**: `sprite-map()`, `sprite()`, `sprite-position()`, `sprite-url()`, ...
+ * **Images**: `image-url()`, `image-width()`, `image-height()`, ...
+ * **Embedded (inline) images**: `inline-image()`
+ * **Colors handling**: `adjust-color()`, `scale-color()`, `opacify()`/`transparentize()`, `lighten()`/`darken()`, `mix()`, ...
+ * **Math functions**: `sin()`, `cos()`, `tan()`, `round()`, `ceil()`, `floor()`, `pi()`, ...
+ * **CSS Compression**: `@option compress:yes;`
Requirements
============
- * python >= 2.5
+ * python >= 2.5
Installation
============
pyScss should be installed using pip or setuptools::
- pip install pyScss
+ pip install pyScss
- easy_install pyScss
+ easy_install pyScss
Usage
=====
Usage example::
- from scss import Scss
- css = Scss()
- css.compile("a { color: red + green; }")
+ from scss import Scss
+ css = Scss()
+ css.compile("a { color: red + green; }")
Or compile from the command line::
- python scss.py < file.scss
+ python scss.py < file.scss
Interactive mode::
- python scss.py --interactive
+ python scss.py --interactive
Examples
========
#. **Nested Rules**
- Example::
-
- @option compress: no;
- .selector {
- a {
- display: block;
- }
- strong {
- color: blue;
- }
- }
-
- ...produces::
-
- .selector a {
- display: block;
- }
- .selector strong {
- color: #00f;
- }
+ Example::
+
+ @option compress: no;
+ .selector {
+ a {
+ display: block;
+ }
+ strong {
+ color: blue;
+ }
+ }
+
+ ...produces::
+
+ .selector a {
+ display: block;
+ }
+ .selector strong {
+ color: #00f;
+ }
#. **Variables**
- Example::
-
- @option compress: no;
- $main-color: #ce4dd6;
- $style: solid;
- $side: bottom;
- #navbar {
- border-#{$side}: {
- color: $main-color;
- style: $style;
- }
- }
-
- ...produces::
-
- #navbar {
- border-bottom-color: #ce4dd6;
- border-bottom-style: solid;
- }
+ Example::
+
+ @option compress: no;
+ $main-color: #ce4dd6;
+ $style: solid;
+ $side: bottom;
+ #navbar {
+ border-#{$side}: {
+ color: $main-color;
+ style: $style;
+ }
+ }
+
+ ...produces::
+
+ #navbar {
+ border-bottom-color: #ce4dd6;
+ border-bottom-style: solid;
+ }
#. **Mixins**
- Example::
-
- @option compress: no;
- @mixin rounded($side, $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, 5px); }
- #sidebar { @include rounded(left, 8px); }
-
- ...produces::
-
- #navbar li {
- border-top-radius: 10px;
- -moz-border-radius-top: 10px;
- -webkit-border-top-radius: 10px;
- }
- #footer {
- border-top-radius: 5px;
- -moz-border-radius-top: 5px;
- -webkit-border-top-radius: 5px;
- }
- #sidebar {
- border-left-radius: 8px;
- -moz-border-radius-left: 8px;
- -webkit-border-left-radius: 8px;
- }
+ Example::
+
+ @option compress: no;
+ @mixin rounded($side, $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, 5px); }
+ #sidebar { @include rounded(left, 8px); }
+
+ ...produces::
+
+ #navbar li {
+ border-top-radius: 10px;
+ -moz-border-radius-top: 10px;
+ -webkit-border-top-radius: 10px;
+ }
+ #footer {
+ border-top-radius: 5px;
+ -moz-border-radius-top: 5px;
+ -webkit-border-top-radius: 5px;
+ }
+ #sidebar {
+ border-left-radius: 8px;
+ -moz-border-radius-left: 8px;
+ -webkit-border-left-radius: 8px;
+ }
#. **Extend** (using `@extend`)
- Example::
-
- @option compress: no;
- .error {
- border: 1px #f00;
- background-color: #fdd;
- }
- .error.intrusion {
- background-image: url("/image/hacked.png");
- }
- .seriousError {
- @extend .error;
- border-width: 3px;
- }
-
- ...produces::
-
- .error,
- .seriousError {
- border: 1px red;
- background-color: #fdd;
- }
- .error.intrusion,
- .seriousError.intrusion {
- background-image: url("/image/hacked.png");
- }
- .seriousError {
- border-width: 3px;
- }
+ Example::
+
+ @option compress: no;
+ .error {
+ border: 1px #f00;
+ background-color: #fdd;
+ }
+ .error.intrusion {
+ background-image: url("/image/hacked.png");
+ }
+ .seriousError {
+ @extend .error;
+ border-width: 3px;
+ }
+
+ ...produces::
+
+ .error,
+ .seriousError {
+ border: 1px red;
+ background-color: #fdd;
+ }
+ .error.intrusion,
+ .seriousError.intrusion {
+ background-image: url("/image/hacked.png");
+ }
+ .seriousError {
+ border-width: 3px;
+ }
#. **Sprites** (using `sprite-map()`)
- Example::
-
- @option compress: no;
- $icons: sprite-map("sociable/*.png"); // contains sociable/facebook.png among others.
- div {
- background: $icons;
- }
- @each $icon in sprites($icons) {
- div .#{$icon} {
- width: image-width(sprite-file($icons, $icon));
- height: image-height(sprite-file($icons, $icon));
- background-position: sprite-position($icons, $icon);
- }
- }
-
- ...generates a new sprite file and produces something like::
-
- div {
- background: url("/static/assets/u8Y7yEQL0UffAVw5rX7yhw.png?_=1298240989") 0px 0px no-repeat;
- }
- div .facebook {
- width: 32px;
- height: 32px;
- background-position: 0px 0px;
- }
- div .twitter {
- width: 32px;
- height: 32px;
- background-position: 0px -32px;
- }
- ...
+ Example::
+
+ @option compress: no;
+ $icons: sprite-map("sociable/*.png"); // contains sociable/facebook.png among others.
+ div {
+ background: $icons;
+ }
+ @each $icon in sprites($icons) {
+ div .#{$icon} {
+ width: image-width(sprite-file($icons, $icon));
+ height: image-height(sprite-file($icons, $icon));
+ background-position: sprite-position($icons, $icon);
+ }
+ }
+
+ ...generates a new sprite file and produces something like::
+
+ div {
+ background: url("/static/assets/u8Y7yEQL0UffAVw5rX7yhw.png?_=1298240989") 0px 0px no-repeat;
+ }
+ div .facebook {
+ width: 32px;
+ height: 32px;
+ background-position: 0px 0px;
+ }
+ div .twitter {
+ width: 32px;
+ height: 32px;
+ background-position: 0px -32px;
+ }
+ ...
#. **Interactive mode**
- Example::
-
- $ python scss.py --interactive
- >>> @import "compass/css3"
- >>> show()
- ['functions', 'mixins', 'options', 'vars']
- >>> show(mixins)
- ['apply-origin',
- 'apply-transform',
- ...
- 'transparent']
- >>> show(mixins, transparent)
- @mixin transparent() {
- @include opacity(0);
- }
- >>> 1px + 5px
- 6px
- >>> _
+ Example::
+
+ $ python scss.py --interactive
+ >>> @import "compass/css3"
+ >>> show()
+ ['functions', 'mixins', 'options', 'vars']
+ >>> show(mixins)
+ ['apply-origin',
+ 'apply-transform',
+ ...
+ 'transparent']
+ >>> show(mixins, transparent)
+ @mixin transparent() {
+ @include opacity(0);
+ }
+ >>> 1px + 5px
+ 6px
+ >>> _
Sass Sassy CSS
==============
@@ -254,32 +254,19 @@ Description: pyScss, a Scss compiler for Python
I have succesfully compiled some Compass using `python scss.py < myfile.css` the
following `myfile.css`::
- @option compress: no;
+ @option compress: no;
- $blueprint-grid-columns : 24;
- $blueprint-grid-width : 30px;
- $blueprint-grid-margin : 10px;
- $font-color : #333;
+ $blueprint-grid-columns : 24;
+ $blueprint-grid-width : 30px;
+ $blueprint-grid-margin : 10px;
+ $font-color : #333;
- @import "compass/reset";
- @import "compass/utilities";
- @import "blueprint";
+ @import "compass/reset";
+ @import "compass/utilities";
+ @import "blueprint";
- // Stuff goes here...
+ // Stuff goes here...
- Benchmarks
- ==========
- pyScss has been optimized for speed. Compiling **Compass 0.11.beta.2**
- (`compass/doc-src/content/stylesheets/screen.scss`)
-
- ...using **Sass 3.1.0.alpha.221**::
-
- Compilation took 2.683s (w/o cache)
- Compilation took 1.35s (cached)
-
- ...using **pyScss 1.0 beta**::
-
- Compilation took 0.614s
Bug tracker
===========
@@ -302,14 +289,14 @@ Description: pyScss, a Scss compiler for Python
*Bits of code in pyScss come from various projects:*
Compass:
- (c) 2009 Christopher M. Eppstein
- http://compass-style.org/
+ (c) 2009 Christopher M. Eppstein
+ http://compass-style.org/
Sass:
- (c) 2006-2009 Hampton Catlin and Nathan Weizenbaum
- http://sass-lang.com/
+ (c) 2006-2009 Hampton Catlin and Nathan Weizenbaum
+ http://sass-lang.com/
xCSS:
- (c) 2010 Anton Pawlik
- http://xcss.antpaw.org/docs/
+ (c) 2010 Anton Pawlik
+ http://xcss.antpaw.org/docs/
Keywords: css oocss xcss sass scss less precompiler
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/scss/scss_meta.py b/scss/scss_meta.py
index f93b4c4..331798e 100644
--- a/scss/scss_meta.py
+++ b/scss/scss_meta.py
@@ -33,35 +33,35 @@ Sass:
xCSS:
(c) 2010 Anton Pawlik
http://xcss.antpaw.org/docs/
-
- This file defines Meta data, according to PEP314
+
+ This file defines Meta data, according to PEP314
(http://www.python.org/dev/peps/pep-0314/) which is common to both pyScss
and setup.py distutils.
-
- We create this here so this information can be compatible with BOTH
+
+ We create this here so this information can be compatible with BOTH
Python 2.x and Python 3.x so setup.py can use it when building pyScss
for both Py3.x and Py2.x
"""
-VERSION_INFO = (1, 0, 8)
-DATE_INFO = (2011, 5, 13) # YEAR, MONTH, DAY
+VERSION_INFO = (1, 0, 9)
+DATE_INFO = (2011, 12, 22) # YEAR, MONTH, DAY
VERSION = '.'.join(str(i) for i in VERSION_INFO)
REVISION = '%04d%02d%02d' % DATE_INFO
-BUILD_INFO = "pyScss v" + VERSION + " ("+REVISION+")"
+BUILD_INFO = "pyScss v" + VERSION + " (" + REVISION + ")"
AUTHOR = "German M. Bravo (Kronuz)"
AUTHOR_EMAIL = 'german.mb@gmail.com'
URL = 'http://github.com/Kronuz/pyScss'
-DOWNLOAD_URL = 'http://github.com/Kronuz/pyScss/tarball/v1.0'
+DOWNLOAD_URL = 'http://github.com/Kronuz/pyScss/tarball/v1.0.9'
LICENSE = "MIT"
PROJECT = "pyScss"
if __name__ == "__main__":
- print('VERSION = '+VERSION)
- print('REVISION = '+REVISION)
- print('BUILD_INFO = '+BUILD_INFO)
- print('AUTHOR = '+AUTHOR)
- print('AUTHOR_EMAIL = '+AUTHOR_EMAIL)
- print('URL = '+URL)
- print('LICENSE = '+LICENSE)
- print('PROJECT = '+PROJECT)
+ print('VERSION = ' + VERSION)
+ print('REVISION = ' + REVISION)
+ print('BUILD_INFO = ' + BUILD_INFO)
+ print('AUTHOR = ' + AUTHOR)
+ print('AUTHOR_EMAIL = ' + AUTHOR_EMAIL)
+ print('URL = ' + URL)
+ print('LICENSE = ' + LICENSE)
+ print('PROJECT = ' + PROJECT)
diff --git a/setup.py b/setup.py
index 7bf01d0..ac21539 100644
--- a/setup.py
+++ b/setup.py
@@ -3,13 +3,15 @@ from setuptools import setup
from scss.scss_meta import PROJECT, URL, VERSION, AUTHOR, AUTHOR_EMAIL, LICENSE, DOWNLOAD_URL
+
def read(fname):
import os
try:
- return open(os.path.join(os.path.dirname( __file__ ), fname)).read().strip()
+ return open(os.path.join(os.path.dirname(__file__), fname)).read().strip()
except IOError:
return ''
+
extra = {}
import sys
if sys.version_info >= (3, 0):
@@ -17,6 +19,7 @@ if sys.version_info >= (3, 0):
use_2to3=True,
)
+
setup(name=PROJECT,
version=VERSION,
description=read('DESCRIPTION'),
@@ -38,7 +41,7 @@ setup(name=PROJECT,
"Topic :: Text Processing :: Markup",
"Topic :: Software Development :: Libraries :: Python Modules"
],
- entry_points = """
+ entry_points="""
[console_scripts]
pyscss = scss:main
""",