Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 2da8be38ca1033e213773c95d517c8d91907f4e5 @filipepina filipepina committed Apr 6, 2010
@@ -0,0 +1,46 @@
+<?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'
+
+color = TextMate::UI.request_string(:title =&gt; "Choose Color", :prompt =&gt; "Enter color hex", :default =&gt; "B4B490")
+
+opacity = TextMate::UI.request_string(:title =&gt; "Opacity", :prompt =&gt; "Alpha channel (0-1)", :default =&gt; "0.6")
+
+rgb = [color].pack("H*").unpack("C*").map {|n| "%03d " % n}.join
+rgb = rgb.split(' ')
+
+r = rgb[0]
+g = rgb[1]
+b = rgb[2]
+
+ie = (opacity.to_f * 255).round.to_i.to_s(16) + color.to_s
+
+rules = &lt;&lt;-RULES
+background-color: ##{color};
+background-color: rgba(#{r}, #{g}, #{b}, #{opacity}); /* FF3+, Saf3+, Opera 10.10+, Chrome */
+filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='##{ie}',EndColorStr='##{ie}'); /* IE6,IE7
+-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='##{ie}',EndColorStr='##{ie}')"; /* IE8 */
+$0
+RULES
+
+puts rules</string>
+ <key>input</key>
+ <string>none</string>
+ <key>name</key>
+ <string>rgba</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>source.css</string>
+ <key>tabTrigger</key>
+ <string>rgba</string>
+ <key>uuid</key>
+ <string>5A450254-35D3-47A3-ADDB-C23805A6B459</string>
+</dict>
+</plist>
@@ -0,0 +1,49 @@
+<?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'
+
+deg = TextMate::UI.request_string(:title =&gt; "Transform Rotate", :prompt =&gt; "Degrees", :default =&gt; "7.5")
+
+deg2radians = Math::PI * 2 / 360
+rad = deg.to_f * deg2radians
+costheta = Math.cos(rad)
+sintheta = Math.sin(rad)
+
+M11 = costheta
+M12 = -sintheta
+M21 = sintheta
+M22 = costheta
+
+rules = &lt;&lt;-RULES
+-moz-transform: rotate(#{deg}deg); /* FF3.5+ */
+-o-transform: rotate(#{deg}deg); /* Opera 10.5 */
+-webkit-transform: rotate(#{deg}deg); /* Saf3.1+, Chrome */
+filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',
+ M11=#{M11}, M12=-#{M12}, M21=#{M21}, M22=#{M22}); /* IE6,IE7 */
+-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',
+ M11=#{M11}, M12=-#{M12}, M21=#{M21}, M22=#{M22})"; /* IE8 */
+zoom: 1;
+$0
+RULES
+
+puts rules</string>
+ <key>input</key>
+ <string>none</string>
+ <key>name</key>
+ <string>rotate</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>source.css</string>
+ <key>tabTrigger</key>
+ <string>rotate</string>
+ <key>uuid</key>
+ <string>253FF0E3-A404-4697-8EAC-B79F39C8F2C2</string>
+</dict>
+</plist>
@@ -0,0 +1,19 @@
+<?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>background-image: -moz-linear-gradient(top, ${1:#444444}, ${2:#999999}); /* FF3.6 */
+background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, $1),color-stop(1, $2)); /* Saf4+, Chrome */
+filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$1', endColorstr='$2'); /* IE6,IE7 */
+-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='$1', endColorstr='$2')"; /* IE8 */$0</string>
+ <key>name</key>
+ <string>bg-gradient</string>
+ <key>scope</key>
+ <string>source.css</string>
+ <key>tabTrigger</key>
+ <string>bggradient</string>
+ <key>uuid</key>
+ <string>D88FCE1A-632E-4E4D-8358-3C4214E88AAD</string>
+</dict>
+</plist>
@@ -0,0 +1,18 @@
+<?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>-moz-border-radius: ${1:5px}; /* FF1+ */
+-webkit-border-radius: $1; /* Saf3+, Chrome */
+border-radius: $1; /* Opera 10.5, IE 9 */$0</string>
+ <key>name</key>
+ <string>border-radius</string>
+ <key>scope</key>
+ <string>source.css</string>
+ <key>tabTrigger</key>
+ <string>borderrad</string>
+ <key>uuid</key>
+ <string>32189947-A6AE-4ED9-BF3B-C67F010FF68E</string>
+</dict>
+</plist>
@@ -0,0 +1,20 @@
+<?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>-moz-box-shadow: ${1:0px} ${2:0px} ${3:4px} ${4:#ffffff}; /* FF3.5+ */
+-webkit-box-shadow: $1 $2 $3 $4; /* Saf3.0+, Chrome */
+box-shadow: $1 $2 $3 $4; /* Opera 10.5, IE 9.0 */
+filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=$1, OffY=$2, Color='$4'); /* IE6,IE7 */
+-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=$1, OffY=$2, Color='$4')"; /* IE8 */$0</string>
+ <key>name</key>
+ <string>box-shadow</string>
+ <key>scope</key>
+ <string>source.css</string>
+ <key>tabTrigger</key>
+ <string>boxshadow</string>
+ <key>uuid</key>
+ <string>6D6FB5BE-FA7D-4469-B745-EB6F74E4D8B6</string>
+</dict>
+</plist>
@@ -0,0 +1,22 @@
+<?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>@font-face {
+ font-family: '${1:WebFont}';
+ src: url('${2:myfont}.eot'); /* IE6+ */
+ src: local('☺'),
+ url('$2.woff') format('woff'), /* FF3.6 */
+ url('$2.ttf') format('truetype'); /* Saf3+,Chrome,Opera10+ */
+}$0</string>
+ <key>name</key>
+ <string>font-face</string>
+ <key>scope</key>
+ <string>source.css</string>
+ <key>tabTrigger</key>
+ <string>fontface</string>
+ <key>uuid</key>
+ <string>A33D6916-A2E6-42CE-8DA2-28BEFFF33AE1</string>
+</dict>
+</plist>
@@ -0,0 +1,18 @@
+<?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>-moz-transition: ${1:all} ${2:0.3s} ${3:ease-out}; /* FF3.7+ */
+-o-transition: $1 $2 $3; /* Opera 10.5 */
+-webkit-transition: $1 $2 $3; /* Saf3.2+, Chrome */</string>
+ <key>name</key>
+ <string>transition</string>
+ <key>scope</key>
+ <string>source.css</string>
+ <key>tabTrigger</key>
+ <string>transition</string>
+ <key>uuid</key>
+ <string>BFF5E501-5684-42AE-A28A-8E3EB3693F51</string>
+</dict>
+</plist>
@@ -0,0 +1,20 @@
+<?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>name</key>
+ <string>CSS3 Please</string>
+ <key>ordering</key>
+ <array>
+ <string>32189947-A6AE-4ED9-BF3B-C67F010FF68E</string>
+ <string>6D6FB5BE-FA7D-4469-B745-EB6F74E4D8B6</string>
+ <string>5A450254-35D3-47A3-ADDB-C23805A6B459</string>
+ <string>D88FCE1A-632E-4E4D-8358-3C4214E88AAD</string>
+ <string>BFF5E501-5684-42AE-A28A-8E3EB3693F51</string>
+ <string>253FF0E3-A404-4697-8EAC-B79F39C8F2C2</string>
+ <string>A33D6916-A2E6-42CE-8DA2-28BEFFF33AE1</string>
+ </array>
+ <key>uuid</key>
+ <string>26E56DAE-C6F7-4951-ACA7-3FD15A5856CC</string>
+</dict>
+</plist>
16 README
@@ -0,0 +1,16 @@
+h1. CSS3 Please.tmbundle
+
+Simple TM Bundle with a bunch of snippets taken from "css3please.com":http://www.css3please.com/ to make it easy to write "cross browser" css3 rules
+
+h2. Snippets Included (tab trigger):
+* border-radius (borderrad)
+* box-shadow (boxshadow)
+* rgba (rgba)
+* background-gradient (bggradient)
+* transition (transition)
+* rotate (rotate)
+* font-face (fontface)
+
+
+h3. TODO
+* add direction options to background-gradient

0 comments on commit 2da8be3

Please sign in to comment.