remi-css3-now 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -25,6 +25,8 @@ And I'll end up with:
25
25
 
26
26
  I'll keep track of which browsers support what.
27
27
 
28
+ This is basically just a glorified global substitution!
29
+
28
30
  == Installation
29
31
 
30
32
  sudo gem install remi-css3-now --source http://gems.github.com
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/lib/css3-now.rb CHANGED
@@ -28,7 +28,7 @@ private
28
28
  end
29
29
 
30
30
  def self.replace_browser_specific css, attribute, browsers = nil
31
- css.gsub /#{ attribute }: ([-\.\w ]+);/, browser_specific(attribute, '\1', browsers)
31
+ css.gsub /#{ attribute }: ([-\.#\w ]+);/, browser_specific(attribute, '\1', browsers)
32
32
  end
33
33
 
34
34
  end
@@ -14,7 +14,23 @@ describe CSS3Now do
14
14
  "-khtml-border-radius: 5em 10px -3.4em; border-radius: 5em 10px -3.4em;\n }"
15
15
  end
16
16
 
17
- it 'should work with multiple instances of an attibute'
17
+ it 'should work with additional characters: -, ., #' do
18
+ css = CSS3Now.new("#header {\n border-radius: 5em 10px -3.4em #fff;\n }").to_css
19
+ css.should == "#header {\n -moz-border-radius: 5em 10px -3.4em #fff; -webkit-border-radius: 5em 10px -3.4em #fff; " +
20
+ "-khtml-border-radius: 5em 10px -3.4em #fff; border-radius: 5em 10px -3.4em #fff;\n }"
21
+ end
22
+
23
+ it 'should work with multiple instances of an attibute' do
24
+ CSS3Now.new("#x {\n opacity: 0.5;\n } #y {\n opacity: 0.4;\n }").to_css.should ==
25
+ "#x {\n filter:alpha(opacity=50); opacity: 0.5;\n }" +
26
+ " #y {\n filter:alpha(opacity=40); opacity: 0.4;\n }"
27
+
28
+ css = CSS3Now.new("#header1 {\n border-radius: 1px;\n } " +
29
+ "#header2 {\n border-radius: 5em;\n }" ).to_css
30
+ css.should ==
31
+ "#header1 {\n -moz-border-radius: 1px; -webkit-border-radius: 1px; -khtml-border-radius: 1px; border-radius: 1px;\n } " +
32
+ "#header2 {\n -moz-border-radius: 5em; -webkit-border-radius: 5em; -khtml-border-radius: 5em; border-radius: 5em;\n }"
33
+ end
18
34
 
19
35
  it 'should replace box-shadow' do
20
36
  css = CSS3Now.new("#header {\n box-shadow: 5em;\n }").to_css
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remi-css3-now
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - remi