css3-ribbons 1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown ADDED
@@ -0,0 +1,37 @@
1
+ # CSS3 Ribbons Extension for Compass
2
+ by: Derek Perez (derek[at]derekperez[dot]com) / Chris Eppstein (chris[at]eppsteins[dot]net)<br/>
3
+ Simply awesome and customizable CSS3 Ribbon mixin for compass. [Just like the Github Ribbons!](http://github.com/blog/273-github-ribbons)
4
+
5
+ ## USAGE
6
+ to use CSS3 Ribbons, simply import (`@import "css3-ribbons"`) the stylesheet into your Sass/Scss document, and call the `+ribbon` mixin. <br/>
7
+ (eg: `+ribbon("#ribbon")`)
8
+
9
+ __NOTE:__ your markup should look similar to this:
10
+
11
+ `<div id="ribbon-container"><div id="ribbon"><h2><a href="http://github.com">Fork me on Github!</a></h2></div></div>`
12
+
13
+ ### OTHER OPTIONS
14
+ The ribbon mixin has a very customizable API:
15
+
16
+ `=ribbon(selector, [bg-color: #a00 position: top-left, text-color: #fff, length: 250px])`
17
+
18
+ The __position__ argument can be one of the follow:
19
+
20
+ - top-left
21
+ - bottom-left
22
+ - top-right
23
+ - bottom-right
24
+
25
+ ## INSTALLATION
26
+ The CSS3 Ribbons gem is available from (Gemcutter.org)[http://www.gemcutter.org]:
27
+
28
+ `gem install css3-ribbons`
29
+
30
+ once you've installed the gem, make sure to require it in your compass `config.rb` file, near the top:
31
+
32
+ `require "css3-buttons"`
33
+
34
+ ## CREDITS
35
+ inspired by [These Awesome GitHub Ribbons](http://github.com/blog/273-github-ribbons)
36
+ and the initial css concept was inspired by [this blog post post](http://unindented.org/articles/2009/10/github-ribbon-using-css-transforms/).
37
+ credit to unindented.org for creating the initial CSS idea.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0
@@ -0,0 +1 @@
1
+ Compass::Frameworks.register("css3-ribbons", :path => "#{File.dirname(__FILE__)}/..")
@@ -0,0 +1,21 @@
1
+ description "CSS3 Ribbons"
2
+
3
+ help %Q{
4
+ Simply awesome and customizable CSS3 Ribbon mixin for compass. Just like the Github Ribbons!
5
+ }
6
+
7
+ welcome_message %Q{
8
+ to use CSS3 Ribbons, simply import (@import "css3-ribbons") the stylesheet into your Sass/Scss document, and call the +ribbon mixin.
9
+ (eg: +ribbon("#ribbon"))
10
+
11
+ NOTE: your markup should look similar to this:
12
+
13
+ <div id="ribbon-container">
14
+ <div id="ribbon">
15
+ <h2><a href="http://github.com">Fork me on Github!</a></h2>
16
+ </div>
17
+ </div>
18
+
19
+ Visit http://github.com/perezd/CSS3-Ribbons for more docs!
20
+ }
21
+
@@ -0,0 +1,71 @@
1
+ // CSS3 Ribbons, 1.0 -- Derek Perez (derek@derekperez.com) / Chris Eppstein (chris@eppsteins.net)
2
+ // inspired by (http://github.com/blog/273-github-ribbons)
3
+ // this plugin was inspired by this blog post:
4
+ // http://unindented.org/articles/2009/10/github-ribbon-using-css-transforms/
5
+ // credit to unindented.org for creating the initial CSS idea.
6
+
7
+ @import "compass/css3/transform"
8
+ @import "compass/css3/box-shadow"
9
+ @import "compass/css3/text-shadow"
10
+
11
+ =ribbon-container($position : top-left, $length : 250px)
12
+ overflow: hidden
13
+ position: absolute
14
+ height: ($length / 1.414) * 1.05
15
+ width: $length / 1.414
16
+ @if $position == top-left
17
+ top: 0
18
+ left: 0
19
+ @if $position == bottom-left
20
+ bottom: 0
21
+ left: 0
22
+ @if $position == top-right
23
+ top: 0
24
+ right: 0
25
+ @if $position == bottom-right
26
+ bottom: 0
27
+ right: 0
28
+
29
+ =ribbon($selector : ".ribbon", $bg-color : #a00, $position : top-left, $text-color : #fff, $length : 250px)
30
+ #{$selector}-container
31
+ +ribbon-container($position, $length)
32
+ #{$selector}
33
+ +ribbon-banner($bg-color, $position, $length)
34
+ a
35
+ +ribbon-text($bg-color, $text-color, $position)
36
+
37
+ =ribbon-banner($bg-color : #a00, $position: top-left, $length : 250px)
38
+ position: absolute
39
+ background-color: $bg-color
40
+ +box-shadow(#888, 0, 0, 1em)
41
+ width: $length
42
+ @if $position == top-left
43
+ top: 2em
44
+ left: -3em
45
+ +rotate(-45deg)
46
+ @if $position == bottom-left
47
+ bottom: 2em
48
+ left: -3em
49
+ +rotate(45deg)
50
+ @if $position == top-right
51
+ top: 2em
52
+ right: -3em
53
+ +rotate(45deg)
54
+ @if $position == bottom-right
55
+ bottom: 2em
56
+ right: -3em
57
+ +rotate(-45deg)
58
+
59
+ =ribbon-text($bg-color : #a00, $text-color : #fff, $position : top-left)
60
+ border: 1px solid lighten($bg-color, 20)
61
+ color: $text-color
62
+ display: block
63
+ font: bold 81.25% 'Helvetiva Neue', Helvetica, Arial, sans-serif
64
+ margin: 0.05em 0 0.075em 0
65
+ padding: 0.5em 3.5em
66
+ @if $position == top-left or $position == bottom-left
67
+ text-align: left
68
+ @if $position == top-right or $position == bottom-right
69
+ text-align: right
70
+ text-decoration: none
71
+ +text-shadow(#444, 0, 0, 0.5em)
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: css3-ribbons
3
+ version: !ruby/object:Gem::Version
4
+ hash: 15
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ version: "1.0"
10
+ platform: ruby
11
+ authors:
12
+ - Derek Perez
13
+ - Chris Eppstein
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-08-02 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: compass
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 49
30
+ segments:
31
+ - 0
32
+ - 10
33
+ - 3
34
+ version: 0.10.3
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ description: Make pretty, 100% CSS3 ribbons, using compass.
38
+ email: derek@derekperez.com
39
+ executables: []
40
+
41
+ extensions: []
42
+
43
+ extra_rdoc_files: []
44
+
45
+ files:
46
+ - README.markdown
47
+ - VERSION
48
+ - stylesheets/_css3-ribbons.sass
49
+ - lib/css3-ribbons.rb
50
+ - project/manifest.rb
51
+ has_rdoc: true
52
+ homepage: http://blog.derekperez.com/
53
+ licenses: []
54
+
55
+ post_install_message:
56
+ rdoc_options: []
57
+
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ hash: 3
66
+ segments:
67
+ - 0
68
+ version: "0"
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ requirements: []
79
+
80
+ rubyforge_project:
81
+ rubygems_version: 1.3.7
82
+ signing_key:
83
+ specification_version: 3
84
+ summary: CSS3 Ribbons for your pages, just like github!
85
+ test_files: []
86
+