css3buttons 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -11,13 +11,13 @@ module Css3buttons
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def render(&block)
|
14
|
-
html_options = @options
|
14
|
+
html_options = @options.clone
|
15
15
|
html_options.delete(:wrapper_tag)
|
16
16
|
html_options.delete(:minor)
|
17
17
|
html_options[:class] ||= ''
|
18
18
|
html_options[:class] = (html_options[:class].split(" ") + ['button-group']).join(" ")
|
19
19
|
html_options[:class] = (html_options[:class].split(" ") + ['minor-group']).join(" ") if @options[:minor]
|
20
|
-
content_tag(:
|
20
|
+
content_tag(@options[:wrapper_tag], @template.capture(&block), html_options) if block_given?
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/lib/css3buttons/version.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
/* ------------------------------------------
|
2
|
-
CSS3 GITHUB BUTTONS
|
2
|
+
CSS3 GITHUB BUTTONS (Nicolas Gallagher)
|
3
3
|
Licensed under Unlicense
|
4
|
+
http://github.com/necolas/css3-github-buttons
|
4
5
|
------------------------------------------ */
|
5
6
|
|
6
7
|
|
@@ -27,7 +28,8 @@ Licensed under Unlicense
|
|
27
28
|
background-image: linear-gradient(#f4f4f4, #ececec);
|
28
29
|
-webkit-background-clip: padding;
|
29
30
|
-moz-background-clip: padding;
|
30
|
-
background-clip: padding-box;
|
31
|
+
-o-background-clip: padding-box;
|
32
|
+
/*background-clip: padding-box;*/ /* commented out due to Opera 11.10 bug */
|
31
33
|
-webkit-border-radius: 0.2em;
|
32
34
|
-moz-border-radius: 0.2em;
|
33
35
|
border-radius: 0.2em;
|
@@ -65,7 +67,8 @@ Licensed under Unlicense
|
|
65
67
|
|
66
68
|
/* overrides extra padding on button elements in Firefox */
|
67
69
|
.button::-moz-focus-inner {
|
68
|
-
|
70
|
+
padding: 0;
|
71
|
+
border: 0;
|
69
72
|
}
|
70
73
|
|
71
74
|
/* ............................................................................................................. Icons */
|
@@ -78,7 +81,7 @@ Licensed under Unlicense
|
|
78
81
|
width: 12px;
|
79
82
|
height: 12px;
|
80
83
|
margin: 0 0.75em 0 -0.25em;
|
81
|
-
background: url(
|
84
|
+
background: url(gh-icons.png) 0 99px no-repeat;
|
82
85
|
}
|
83
86
|
|
84
87
|
.button.arrowup.icon:before { background-position: 0 0; }
|
@@ -379,6 +382,7 @@ Licensed under Unlicense
|
|
379
382
|
/* ------------------------------------------------------------------------------------------------------------- BUTTON CONTAINER */
|
380
383
|
/* For mixing buttons and button groups, e.g., in a navigation bar */
|
381
384
|
|
382
|
-
.button-container .button
|
383
|
-
|
385
|
+
.button-container .button,
|
386
|
+
.button-container .button-group {
|
387
|
+
vertical-align: top;
|
384
388
|
}
|
data/readme.md
CHANGED
@@ -9,7 +9,7 @@ fantastic CSS library - without cluttering up your views and calls to
|
|
9
9
|
|
10
10
|
# What's new in version this version?
|
11
11
|
|
12
|
-
In this version we've updated the css to now work with the [css3 github buttons](http://nicolasgallagher.com/lab/css3-github-buttons/) as standard, instead of the original css3buttons, to take advantage of a few of the features not included in the original library.
|
12
|
+
In this version we've updated the css to now work with the [css3 github buttons](http://nicolasgallagher.com/lab/css3-github-buttons/) as standard, instead of the original css3buttons, in order to take advantage of a few of the features not included in the original library.
|
13
13
|
|
14
14
|
Additionally, there was some serious re-tooling of the helper methods to make them more usable, more dynamic and less prone to error.
|
15
15
|
|
@@ -23,7 +23,7 @@ Include the gem in your gemfile:
|
|
23
23
|
|
24
24
|
gem 'css3buttons'
|
25
25
|
|
26
|
-
Run the generators
|
26
|
+
Run the generators:
|
27
27
|
|
28
28
|
$ rails g css3buttons
|
29
29
|
|
@@ -52,8 +52,8 @@ For example:
|
|
52
52
|
|
53
53
|
<%= button_link_to "Search", search_path %>
|
54
54
|
|
55
|
-
The helper
|
56
|
-
upgrading and downgrading
|
55
|
+
The helper methods accept all the same parameters as `link_to` so
|
56
|
+
upgrading and downgrading to css3buttons should be a snap.
|
57
57
|
|
58
58
|
|
59
59
|
# Icons and pills and colours, oh my!
|
@@ -86,10 +86,10 @@ Just like the icons, you can add options for `primary`, `big` and
|
|
86
86
|
|
87
87
|
Again with colors - simply add `positive` or `negative` to the front of your method call:
|
88
88
|
|
89
|
-
<%=
|
90
|
-
<%=
|
89
|
+
<%= negative_trash_button_link_to "Delete", delete_path %>
|
90
|
+
<%= positive_pill_reload_button_link_to "Reload", reload_path %>
|
91
91
|
|
92
|
-
In order to be compatible with the new css3 github buttons library, you
|
92
|
+
In order to be compatible with the new css3 github buttons library, you can also use `danger` and `safe` - as alternatives.
|
93
93
|
|
94
94
|
|
95
95
|
## Button groups
|
@@ -97,14 +97,14 @@ In order to be compatible with the new css3 github buttons library, you are also
|
|
97
97
|
Button groups are snap, you just need to wrap your buttons with `button_group`, like so:
|
98
98
|
|
99
99
|
<%= button_group do %>
|
100
|
-
<%=
|
101
|
-
<%=
|
102
|
-
<%=
|
100
|
+
<%= button_link_to "Show", @post %>
|
101
|
+
<%= button_link_to "Edit", edit_post_path(@post) %>
|
102
|
+
<%= negative_trash_button_link_to "Delete", @post, :confirm => "Are you sure? %>
|
103
103
|
<% end %>
|
104
104
|
|
105
105
|
And, of course, minor groups:
|
106
106
|
|
107
|
-
<%= minor_button_group
|
107
|
+
<%= minor_button_group do %>
|
108
108
|
You know the drill by now.
|
109
109
|
<% end %>
|
110
110
|
|
@@ -117,9 +117,7 @@ Submit tags are also ushered in with this version. Everything works as it does a
|
|
117
117
|
|
118
118
|
# What's missing?
|
119
119
|
|
120
|
-
The `button_group` helper needs some proper tests, if anyone can point me
|
121
|
-
as to how to stub out a rails request template in RSpec, that would be much
|
122
|
-
appreciated!
|
120
|
+
The `button_group` helper needs some proper tests, if anyone can point me as to how to stub out a rails request template in RSpec (or the right way to approach this test at all), that would be much appreciated!
|
123
121
|
|
124
122
|
I've noticed that this version of the css3 github buttons does not include any colours for the positive/safe styles - so this will appear as normal buttons, unless you add your own styling.
|
125
123
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css3buttons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 3
|
10
|
+
version: 0.9.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nicholas Bruning
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-30 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|