Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
View
314 pyScss.egg-info/PKG-INFO
@@ -1,314 +0,0 @@
-Metadata-Version: 1.0
-Name: pyScss
-Version: 1.1.3
-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.1.3
-Description: pyScss, a Scss compiler for Python
- ==================================
- :Author:
- German M. Bravo (Kronuz) <german.mb@gmail.com>
-
- About
- =====
- pyScss compiles Scss (Sass), a superset of CSS that is more powerful, elegant
- and easier to maintain than plain-vanilla CSS. The library acts as a CSS source
- code preprocesor which allows you to use variables, nested rules, mixins, and
- have inheritance of rules, all with a CSS-compatible syntax which the
- preprocessor then compiles to standard CSS.
-
- Scss, as an extension of CSS, helps keep large stylesheets well-organized. It
- borrows concepts and functionality from projects such as OOCSS and other similar
- frameworks like as Sass. It's build on top of the original PHP xCSS codebase
- structure but it's been completely rewritten, many bugs have been fixed and it
- has been extensively extended to support almost the full range of Sass' Scss
- syntax and functionality.
-
- .. image:: http://pledgie.com/campaigns/16513.png?skin_name=chrome
- :alt: Click here to lend your support to pyScss and make a donation at pledgie.com!
- :target: http://pledgie.com/campaigns/16513
-
- Support
- ========
- 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;`
-
- Requirements
- ============
- * python >= 2.5
-
- Installation
- ============
- pyScss should be installed using pip or setuptools::
-
- pip install pyScss
-
- easy_install pyScss
-
- Usage
- =====
- Usage example::
-
- from scss import Scss
- css = Scss()
- css.compile("a { color: red + green; }")
-
- Or compile from the command line::
-
- python scss.py < file.scss
-
- Interactive mode::
-
- 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;
- }
-
- #. **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;
- }
-
- #. **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;
- }
-
- #. **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;
- }
-
- #. **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;
- }
- ...
-
- #. **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
- >>> _
-
- Sass Sassy CSS
- ==============
- pyScss is a Scss (Sass) implementation for Python.
- Currently it implements @mixin, @include, @if, @else, @for, and @import... it
- also implements many of the Sass functions including color functions like
- hsla(), hsl(), darken(), lighten(), mix(), opacify(), transparentize(),
- saturate(), desaturate(), etc.) as well as sprite-map(), sprite-file(),
- image-width(), image-height() and the others.
-
- In the file `scss.py`, by the top, you can configure the LOAD_PATHS to point to
- your Sass frameworks path (I have `sass/frameworks/compass/*.scss` and
- `sass/framework/blueprint/*.scss` files in my project directory:
- `/usr/local/www/project/`, where `scss.py` lives, so it defaults to use the
- `sass/framework/` path, relative to the `scss.py` file) or configure using the
- command line `--load-path` option, see `python scss.py --help`.
-
- I have succesfully compiled some Compass using `python scss.py < myfile.css` the
- following `myfile.css`::
-
- @option compress: no;
-
- $blueprint-grid-columns : 24;
- $blueprint-grid-width : 30px;
- $blueprint-grid-margin : 10px;
- $font-color : #333;
-
- @import "compass/reset";
- @import "compass/utilities";
- @import "blueprint";
-
- // Stuff goes here...
-
-
- Bug tracker
- ===========
- If you have any suggestions, bug reports or annoyances please report them to the
- issue tracker at http://github.com/Kronuz/pyScss/issues
-
-
- Contributing
- ============
- Development of pyScss happens at github: https://github.com/Kronuz/pyScss
-
- License
- =======
- MIT License. See *LICENSE* for details.
- http://www.opensource.org/licenses/mit-license.php
-
- Copyright
- =========
- Copyright (c) 2012 German M. Bravo (Kronuz)
- *Bits of code in pyScss come from various projects:*
-
- Compass:
- (c) 2009 Christopher M. Eppstein
- http://compass-style.org/
- Sass:
- (c) 2006-2009 Hampton Catlin and Nathan Weizenbaum
- http://sass-lang.com/
- xCSS:
- (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
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3
-Classifier: Topic :: Software Development :: Code Generators
-Classifier: Topic :: Text Processing :: Markup
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
View
33 pyScss.egg-info/SOURCES.txt
@@ -1,33 +0,0 @@
-CHANGELOG
-DESCRIPTION
-LICENSE
-MANIFEST.in
-README.rst
-setup.py
-pyScss.egg-info/PKG-INFO
-pyScss.egg-info/SOURCES.txt
-pyScss.egg-info/dependency_links.txt
-pyScss.egg-info/entry_points.txt
-pyScss.egg-info/top_level.txt
-scss/__init__.py
-scss/__init__.pyc
-scss/scss_meta.py
-scss/scss_meta.pyc
-scss/setup.py
-scss/tests.rst
-scss/src/_speedups.c
-scss/src/block_locator.c
-scss/src/block_locator.h
-scss/src/block_locator.py
-scss/src/build.py
-scss/src/scanner.c
-scss/src/scanner.h
-scss/src/scanner.py
-scss/src/utils.h
-scss/src/grammar/LICENSE
-scss/src/grammar/README
-scss/src/grammar/grammar.g
-scss/src/grammar/grammar.py
-scss/src/grammar/yapps2.py
-scss/src/grammar/yappsrt.py
-scss/src/grammar/yappsrt.pyc
View
1 pyScss.egg-info/dependency_links.txt
@@ -1 +0,0 @@
-
View
4 pyScss.egg-info/entry_points.txt
@@ -1,4 +0,0 @@
-
- [console_scripts]
- pyscss = scss:main
-
View
1 pyScss.egg-info/top_level.txt
@@ -1 +0,0 @@
-scss
View
2 scss/tests.rst
@@ -4,7 +4,7 @@ SCSS TESTS
INITIALIZATION
--------------
->>> from __init__ import Scss
+>>> from scss import Scss
>>> css = Scss()
VARIABLES
View
28 scss/tool.py
@@ -7,10 +7,10 @@
import sys
from collections import deque
-import __init__
-from __init__ import Scss, log, spawn_rule, to_str, profiling
-from __init__ import _prop_split_re
-from scss_meta import BUILD_INFO
+import scss
+from scss import Scss, log, spawn_rule, to_str, profiling
+from scss import _prop_split_re
+from scss.scss_meta import BUILD_INFO
log.setLevel(logging.INFO)
@@ -63,20 +63,20 @@ def main():
(options, args) = parser.parse_args()
# General runtime configuration
- __init__.VERBOSITY = 0
+ scss.VERBOSITY = 0
if options.time:
- __init__.VERBOSITY = 2
+ scss.VERBOSITY = 2
if options.static_root is not None:
- __init__.STATIC_ROOT = options.static_root
+ scss.STATIC_ROOT = options.static_root
if options.assets_root is not None:
- __init__.ASSETS_ROOT = options.assets_root
+ scss.ASSETS_ROOT = options.assets_root
if options.load_paths is not None:
# TODO: Convert global LOAD_PATHS to a list. Use it directly.
# Doing the above will break backwards compatibility!
- if hasattr(__init__.LOAD_PATHS, 'split'):
- load_path_list = [p.strip() for p in __init__.LOAD_PATHS.split(',')]
+ if hasattr(scss.LOAD_PATHS, 'split'):
+ load_path_list = [p.strip() for p in scss.LOAD_PATHS.split(',')]
else:
- load_path_list = list(__init__.LOAD_PATHS)
+ load_path_list = list(scss.LOAD_PATHS)
for path_param in options.load_paths:
for p in path_param.replace(os.pathsep, ',').replace(';', ',').split(','):
@@ -85,10 +85,10 @@ def main():
load_path_list.append(p)
# TODO: Remove this once global LOAD_PATHS is a list.
- if hasattr(__init__.LOAD_PATHS, 'split'):
- __init__.LOAD_PATHS = ','.join(load_path_list)
+ if hasattr(scss.LOAD_PATHS, 'split'):
+ scss.LOAD_PATHS = ','.join(load_path_list)
else:
- __init__.LOAD_PATHS = load_path_list
+ scss.LOAD_PATHS = load_path_list
# Execution modes
if options.test:
View
2 setup.py
@@ -106,7 +106,7 @@ def run_setup(with_binary):
features=features,
entry_points="""
[console_scripts]
- pyscss = scss:main
+ pyscss = scss.tool:main
""",
**extra
)

No commit comments for this range

Something went wrong with that request. Please try again.