Skip to content

Commit

Permalink
Merge branch master of phuibonhoa@github.com/ruby-sass-tmbundle
Browse files Browse the repository at this point in the history
  • Loading branch information
cehoffman committed Feb 13, 2010
2 parents 9f11cc7 + 2828c82 commit bc04d9e
Show file tree
Hide file tree
Showing 102 changed files with 557 additions and 220 deletions.
4 changes: 4 additions & 0 deletions Commands/Convert CSS to SASS.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
export TM_RUBY=$(which "${TM_RUBY:-ruby}")
"${TM_RUBY}" -e "require 'rubygems'; gem 'haml'; require 'sass/css'; puts Sass::CSS.new(ENV['TM_SELECTED_TEXT']).render"</string>
<key>fallbackInput</key>
<string>line</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
Expand All @@ -17,6 +19,8 @@ export TM_RUBY=$(which "${TM_RUBY:-ruby}")
<string>Convert CSS to SASS</string>
<key>output</key>
<string>replaceSelectedText</string>
<key>scope</key>
<string>source.css,source.sass</string>
<key>uuid</key>
<string>9083E047-CEBE-41C9-BCF7-6E8131094888</string>
</dict>
Expand Down
192 changes: 192 additions & 0 deletions Commands/Insert Color….tmCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby
require ENV['TM_SUPPORT_PATH'] + "/lib/ui"
require ENV['TM_SUPPORT_PATH'] + "/lib/exit_codes"
colour = STDIN.read
# http://www.w3schools.com/css/css_colornames.asp
COLOURS = {
'aliceblue' =&gt; 'F0F8FF',
'antiquewhite' =&gt; 'FAEBD7',
'aqua' =&gt; '00FFFF',
'aquamarine' =&gt; '7FFFD4',
'azure' =&gt; 'F0FFFF',
'beige' =&gt; 'F5F5DC',
'bisque' =&gt; 'FFE4C4',
'black' =&gt; '000000',
'blanchedalmond' =&gt; 'FFEBCD',
'blue' =&gt; '0000FF',
'blueviolet' =&gt; '8A2BE2',
'brown' =&gt; 'A52A2A',
'burlywood' =&gt; 'DEB887',
'cadetblue' =&gt; '5F9EA0',
'chartreuse' =&gt; '7FFF00',
'chocolate' =&gt; 'D2691E',
'coral' =&gt; 'FF7F50',
'cornflowerblue' =&gt; '6495ED',
'cornsilk' =&gt; 'FFF8DC',
'crimson' =&gt; 'DC143C',
'cyan' =&gt; '00FFFF',
'darkblue' =&gt; '00008B',
'darkcyan' =&gt; '008B8B',
'darkgoldenrod' =&gt; 'B8860B',
'darkgray' =&gt; 'A9A9A9',
'darkgrey' =&gt; 'A9A9A9',
'darkgreen' =&gt; '006400',
'darkkhaki' =&gt; 'BDB76B',
'darkmagenta' =&gt; '8B008B',
'darkolivegreen' =&gt; '556B2F',
'darkorange' =&gt; 'FF8C00',
'darkorchid' =&gt; '9932CC',
'darkred' =&gt; '8B0000',
'darksalmon' =&gt; 'E9967A',
'darkseagreen' =&gt; '8FBC8F',
'darkslateblue' =&gt; '483D8B',
'darkslategray' =&gt; '2F4F4F',
'darkslategrey' =&gt; '2F4F4F',
'darkturquoise' =&gt; '00CED1',
'darkviolet' =&gt; '9400D3',
'deeppink' =&gt; 'FF1493',
'deepskyblue' =&gt; '00BFFF',
'dimgray' =&gt; '696969',
'dimgrey' =&gt; '696969',
'dodgerblue' =&gt; '1E90FF',
'firebrick' =&gt; 'B22222',
'floralwhite' =&gt; 'FFFAF0',
'forestgreen' =&gt; '228B22',
'fuchsia' =&gt; 'FF00FF',
'gainsboro' =&gt; 'DCDCDC',
'ghostwhite' =&gt; 'F8F8FF',
'gold' =&gt; 'FFD700',
'goldenrod' =&gt; 'DAA520',
'gray' =&gt; '808080',
'grey' =&gt; '808080',
'green' =&gt; '008000',
'greenyellow' =&gt; 'ADFF2F',
'honeydew' =&gt; 'F0FFF0',
'hotpink' =&gt; 'FF69B4',
'indianred' =&gt; 'CD5C5C',
'indigo' =&gt; '4B0082',
'ivory' =&gt; 'FFFFF0',
'khaki' =&gt; 'F0E68C',
'lavender' =&gt; 'E6E6FA',
'lavenderblush' =&gt; 'FFF0F5',
'lawngreen' =&gt; '7CFC00',
'lemonchiffon' =&gt; 'FFFACD',
'lightblue' =&gt; 'ADD8E6',
'lightcoral' =&gt; 'F08080',
'lightcyan' =&gt; 'E0FFFF',
'lightgoldenrodyellow' =&gt; 'FAFAD2',
'lightgray' =&gt; 'D3D3D3',
'lightgrey' =&gt; 'D3D3D3',
'lightgreen' =&gt; '90EE90',
'lightpink' =&gt; 'FFB6C1',
'lightsalmon' =&gt; 'FFA07A',
'lightseagreen' =&gt; '20B2AA',
'lightskyblue' =&gt; '87CEFA',
'lightslategray' =&gt; '778899',
'lightslategrey' =&gt; '778899',
'lightsteelblue' =&gt; 'B0C4DE',
'lightyellow' =&gt; 'FFFFE0',
'lime' =&gt; '00FF00',
'limegreen' =&gt; '32CD32',
'linen' =&gt; 'FAF0E6',
'magenta' =&gt; 'FF00FF',
'maroon' =&gt; '800000',
'mediumaquamarine' =&gt; '66CDAA',
'mediumblue' =&gt; '0000CD',
'mediumorchid' =&gt; 'BA55D3',
'mediumpurple' =&gt; '9370D8',
'mediumseagreen' =&gt; '3CB371',
'mediumslateblue' =&gt; '7B68EE',
'mediumspringgreen' =&gt; '00FA9A',
'mediumturquoise' =&gt; '48D1CC',
'mediumvioletred' =&gt; 'C71585',
'midnightblue' =&gt; '191970',
'mintcream' =&gt; 'F5FFFA',
'mistyrose' =&gt; 'FFE4E1',
'moccasin' =&gt; 'FFE4B5',
'navajowhite' =&gt; 'FFDEAD',
'navy' =&gt; '000080',
'oldlace' =&gt; 'FDF5E6',
'olive' =&gt; '808000',
'olivedrab' =&gt; '6B8E23',
'orange' =&gt; 'FFA500',
'orangered' =&gt; 'FF4500',
'orchid' =&gt; 'DA70D6',
'palegoldenrod' =&gt; 'EEE8AA',
'palegreen' =&gt; '98FB98',
'paleturquoise' =&gt; 'AFEEEE',
'palevioletred' =&gt; 'D87093',
'papayawhip' =&gt; 'FFEFD5',
'peachpuff' =&gt; 'FFDAB9',
'peru' =&gt; 'CD853F',
'pink' =&gt; 'FFC0CB',
'plum' =&gt; 'DDA0DD',
'powderblue' =&gt; 'B0E0E6',
'purple' =&gt; '800080',
'red' =&gt; 'FF0000',
'rosybrown' =&gt; 'BC8F8F',
'royalblue' =&gt; '4169E1',
'saddlebrown' =&gt; '8B4513',
'salmon' =&gt; 'FA8072',
'sandybrown' =&gt; 'F4A460',
'seagreen' =&gt; '2E8B57',
'seashell' =&gt; 'FFF5EE',
'sienna' =&gt; 'A0522D',
'silver' =&gt; 'C0C0C0',
'skyblue' =&gt; '87CEEB',
'slateblue' =&gt; '6A5ACD',
'slategray' =&gt; '708090',
'slategrey' =&gt; '708090',
'snow' =&gt; 'FFFAFA',
'springgreen' =&gt; '00FF7F',
'steelblue' =&gt; '4682B4',
'tan' =&gt; 'D2B48C',
'teal' =&gt; '008080',
'thistle' =&gt; 'D8BFD8',
'tomato' =&gt; 'FF6347',
'turquoise' =&gt; '40E0D0',
'violet' =&gt; 'EE82EE',
'wheat' =&gt; 'F5DEB3',
'white' =&gt; 'FFFFFF',
'whitesmoke' =&gt; 'F5F5F5',
'yellow' =&gt; 'FFFF00',
'yellowgreen' =&gt; '9ACD32',
}
if colour.length &gt; 0 and colour[0] != ?#
colour.downcase!
# Convert named colours to their hex values
colour = '#' + COLOURS[colour] if COLOURS.has_key? colour
end
if res = TextMate::UI.request_color(colour)
print res
else
TextMate.exit_discard
end
</string>
<key>fallbackInput</key>
<string>word</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>@C</string>
<key>name</key>
<string>Insert Color…</string>
<key>output</key>
<string>replaceSelectedText</string>
<key>scope</key>
<string>source.sass, meta.tag string.quoted -source</string>
<key>uuid</key>
<string>D3488358-116A-4962-BFFE-311DD27066C3</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Preferences/Comments.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string>/ </string>
<string>//</string>
</dict>
<dict>
<key>name</key>
Expand Down
39 changes: 17 additions & 22 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
## Notice

This project is in need of a [new maintainer](http://github.com/aussiegeek/ruby-sass-tmbundle/issues/#issue/4).
## General Info
This is a TextMate bundle for using the [Sass](http://sass-lang.com/) CSS replacement language.

## Installation

With Git:

mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/phuibonhoa/ruby-sass-tmbundle.git "Ruby Sass.tmbundle"
osascript -e 'tell app "TextMate" to reload bundles'

This is a TextMate bundle for using the [Sass](http://haml.hamptoncatlin.com) CSS replacement language by Hampton Catlin
## Credits

Forked from (http://github.com/aussiegeek/ruby-sass-tmbundle/).

I originally wrote this bundle just as a way of getting the CSS snippets, but since then many of you have added some fantastic contributions, and thank you to all. Thanks to GitHub for making it easy to bring all your awesome together
Owner of the original bundle from which this was forked:

[@aussiegeek](http://github.com/aussiegeek)


Contributors to the original bundle from which this was forked:

[@agibralter](http://github.com/agibralter)
[@choan](http://github.com/choan)
[@giannichiappetta](http://github.com/giannichiappetta)
Expand All @@ -20,21 +32,4 @@ I originally wrote this bundle just as a way of getting the CSS snippets, but si
[@tharealpatton](http://github.com/tharealpatton)
[@trevorsmith](http://github.com/trevorsmith)

## Installation

With Git:

mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/aussiegeek/ruby-sass-tmbundle.git "Ruby Sass.tmbundle"
osascript -e 'tell app "TextMate" to reload bundles'

Without Git:

mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
wget http://github.com/aussiegeek/ruby-sass-tmbundle/tarball/master
tar zxf aussiegeek-ruby-sass-tmbundle*.tar.gz
rm aussiegeek-ruby-sass-tmbundle*.tar.gz
mv aussiegeek-ruby-sass-tmbundle* "Ruby on Rails.tmbundle"
osascript -e 'tell app "TextMate" to reload bundles'
16 changes: 16 additions & 0 deletions Snippets/!important.tmSnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>!important$0</string>
<key>name</key>
<string>!important</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
<string>!</string>
<key>uuid</key>
<string>93FA09D2-2CA0-4B6C-8ABC-075B97E9410A</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<dict>
<key>content</key>
<string>${1:p}[${2:name}="${3:string}"]
`put_colon.rb`${4:property} ${5:value}$0</string>
${4:property}: ${5:value}$0</string>
<key>name</key>
<string>:Attribute Selector</string>
<string>Attribute Selector</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>`put_colon.rb`background ${6: #${1:DDD}} url($2) ${3:repeat/repeat-x/repeat-y/no-repeat} ${4:scroll/fixed} ${5:top left/top center/top right/center left/center center/center right/bottom left/bottom center/bottom right/x-% y-%/x-pos y-pos}$0</string>
<string>background: ${6: #${1:DDD}} url($2) ${3:repeat/repeat-x/repeat-y/no-repeat} ${4:scroll/fixed} ${5:top left/top center/top right/center left/center center/center right/bottom left/bottom center/bottom right/x-% y-%/x-pos y-pos}$0</string>
<key>name</key>
<string>:background color image repeat attachment position copy</string>
<string>background: color image repeat attachment position copy</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/background-attachment scroll%3Afixed.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>`put_colon.rb`background-attachment ${1:scroll/fixed}$0</string>
<string>background-attachment: ${1:scroll/fixed}$0</string>
<key>name</key>
<string>:background-attachment scroll/fixed</string>
<string>background-attachment: scroll/fixed</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/background-color hex.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>`put_colon.rb`background-color #${1:DDD}$0</string>
<string>background-color: #${1:DDD}$0</string>
<key>name</key>
<string>:background-color hex</string>
<string>background-color: hex</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/background-color name.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>`put_colon.rb`background-color ${1:red}$0</string>
<string>background-color: ${1:red}$0</string>
<key>name</key>
<string>:background-color name</string>
<string>background-color: name</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/background-color rgb.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>`put_colon.rb`background-color rgb(${1:255},${2:255},${3:255})$0</string>
<string>background-color: rgb(${1:255},${2:255},${3:255})$0</string>
<key>name</key>
<string>:background-color rgb</string>
<string>background-color: rgb</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>`put_colon.rb`background-color rgba(${1:255},${2:255},${3:255},.${4:5})$0</string>
<string>background-color: rgba(${1:255},${2:255},${3:255},.${4:5})$0</string>
<key>name</key>
<string>:background-color rgba</string>
<string>background-color: rgba</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/background-color transparent.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>`put_colon.rb`background-color transparent$0</string>
<string>background-color: transparent$0</string>
<key>name</key>
<string>:background-color transparent</string>
<string>background-color: transparent</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
Expand Down
4 changes: 2 additions & 2 deletions Snippets/background-image none.tmSnippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>`put_colon.rb`background-image none$0</string>
<string>background-image: none$0</string>
<key>name</key>
<string>:background-image none</string>
<string>background-image: none</string>
<key>scope</key>
<string>source.sass</string>
<key>tabTrigger</key>
Expand Down
Loading

0 comments on commit bc04d9e

Please sign in to comment.