Skip to content

Commit

Permalink
Cleaned up some code a teensy bit, added README
Browse files Browse the repository at this point in the history
  • Loading branch information
sfcgeorge committed Jul 1, 2011
1 parent 520d7b3 commit 568e823
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 11 deletions.
32 changes: 32 additions & 0 deletions README.md
@@ -0,0 +1,32 @@
# SCSS (Sass) Sugar for Espresso 2

## Features (Work in progress)

This Sugar is nowhere near complete. It's better than nothing, but barely. Here is what is currently supported:

* Use of .scss file extension or .css.scss extension to trigger the Sugar
* CSS (plain and simple) - this is inherited from the default CSS Sugar
* @include selector (works well in blocks but dodgy at document root level)

## What Why Who?

I'm just a programmer and designer who loves Espresso and Sass. There [was] no Sass Sugar for Espresso in active development, and the one/two I found were incomplete. This Sugar is arguably more incomplete, but I aim to change that.

## Can I help?

If you want to help, that would be great. I have no experience with collaborative development or GitHub, but lets give it a shot!

### Implementation

Basic CSS structure and functionality is already implemented by the Default CSS Sugar, so why reinvent the wheel? We include the default CSS Syntax, then build on it using SyntaxInjections. We shouldn't need to touch the Syntax file often, use SyntaxInjections where possible. I have left some of the original CSS Sugar commented out purely for reference.

### Direction

Aim to get the Syntax complete first, then work on Itemizers to get the Navigator working right. Once these core basics are done, finally we can add the fancy stuff like CodeSense.

### Contact

* Try the Espresso IRC room - ##espresso
* Message me on GitHub
* Tweet to me @sibrow
* Email me... actually I have enought Russian brides as it is, sorry
11 changes: 0 additions & 11 deletions SyntaxInjections/EmbeddedTweaks.xml
Expand Up @@ -3,16 +3,5 @@
<injections>
<injection name="injections.properties.css.scss" selector="scss property-list.block.css" action="insert-after-children">
<include syntax="language-root.css.scss" collection="at-rule-include"/>
</injection>

<!-- From HTML+XML - reference examples
<injection name="injections.html.cssfix" selector="embedded-style.html *" action="insert-before-children">
<cut-off>&lt;/style></cut-off>
</injection>
<injection name="injections.html.jsfix" selector="embedded.language-root.js *" action="insert-before-children">
<cut-off>&lt;/script></cut-off>
</injection>
-->
</injections>
14 changes: 14 additions & 0 deletions Syntaxes/CSS.xml
Expand Up @@ -2,6 +2,20 @@
<syntax name="language-root.css.scss">

<zones>
<zone name="selector.css">
<starts-with>^(?=[:.*#a-zA-Z@\\])</starts-with>
<ends-with>(?=\{)</ends-with>
<subzones>
<include collection="pseudo-classes"/>
<include collection="string-double"/>
<include collection="string-single"/>
<include collection="comments"/>
<zone name="punctuation.comma">
<expression>,</expression>
</zone>
</subzones>
</zone>

<include collection="at-rule-include"/>

<include syntax="language-root.css" />
Expand Down

0 comments on commit 568e823

Please sign in to comment.