purecss 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +35 -13
- data/app/assets/javascripts/purecss-dropdown.js +4 -4
- data/app/assets/stylesheets/purecss-addons.css +57 -0
- data/lib/purecss/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWQ5ZGRiNjYwMjdjYWY3N2EwY2Q2Y2Q4MDM0OTMzYjA5NWRjYWJmYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTE1MzhiMmVjZTk2M2VmY2QxNTQ5NjQwYzgwNzY3ZTA4YjU5OGU1Mg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2IzMDYyNTFmODhiOWI2YTNjZDU3ZmM2MDhiYjg2YTgyMDA1NDEwMjA0YTQ2
|
10
|
+
YmViNDRkMzQ3ZjMzNDViZTY3MzZjMDUwZTlmMDFlNGUxNmNmYTVkYjBjMDcz
|
11
|
+
M2EyZmJjZmFlNzhjM2Y0MDRmZmQ2YTFiMWIzMDc2Y2JjNDFmMDI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODhkNDk5ZTUwNzRjNGJmNDNiYWJiZWZiMWYwODBlODc4ZWIzNTg2Mzg5ZDM5
|
14
|
+
YTI3ZTFkOTc3YTJmYjA3MTM1YjMyNDVjNDdmNjhhMmI4OTg3NWYzMjk4ZWYw
|
15
|
+
MDkyODllYTBkMzQ4NjUzNTg5MTY5Mzk0MzE1MTYwNjU0NzZkNDg=
|
data/README.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
# Purecss
|
2
2
|
|
3
|
-
Pure
|
4
|
-
This gem adds
|
3
|
+
Pure is a set of small, responsive CSS modules that you can use in every web project realized by the yahoo developer team.
|
4
|
+
This gem adds Pure CSS 0.1.0 to the Assets Pipeline of Rails 3.2.
|
5
|
+
|
6
|
+
Additionally it provides
|
7
|
+
- a jQuery function that automatically enables the dropdown menu without the need of additional rails packages/frameworks (YUI or others).
|
8
|
+
- a small optional set of css for right-aligned horizontal menus, CSS carets (font-independent), vertical separators, ...
|
5
9
|
|
6
10
|
I cite directly from [purecss.io](http://purecss.io)
|
7
11
|
> CSS with a minimal footprint.
|
@@ -33,7 +37,7 @@ for the non-responsive one.
|
|
33
37
|
|
34
38
|
If you want to include just an individual module (see [purecss.io](http://purecss.io)) add instead
|
35
39
|
|
36
|
-
*= require purecss/<module
|
40
|
+
*= require purecss/<module>
|
37
41
|
|
38
42
|
|
39
43
|
|
@@ -44,9 +48,22 @@ If it is too long for you, you can avoid touching the manifest files and run the
|
|
44
48
|
|
45
49
|
## Usage
|
46
50
|
|
47
|
-
After the installation you can simply go to [purecss.io](http://purecss.io) and use
|
51
|
+
After the installation you can simply go to [purecss.io](http://purecss.io) and use their styles.
|
52
|
+
|
53
|
+
### Custom CSS
|
54
|
+
|
55
|
+
Add to your css manifest file, under the ```require purecss``` line:
|
56
|
+
|
57
|
+
*= require purecss-addons
|
48
58
|
|
49
|
-
|
59
|
+
It provides the CSS classes
|
60
|
+
|
61
|
+
- ```pure-custom-caret``` for the dropdown menu
|
62
|
+
- ```pure-menu-custom-separator-vertical``` to add a vertical separator to the horizontal menu
|
63
|
+
- ```pure-custom-close``` for nicer ```x``` to close eventual modal views (to display modals, bootstrap-modal works quite well with Pure)
|
64
|
+
- *EXPERIMENTAL* ```pure-menu-custom-pull-right``` to align the menu to the right (must be in the same tag of ```pure-menu```. _Bug: the height of the header is sligtly bigger using this class._)
|
65
|
+
|
66
|
+
The flag *EXPERIMENTAL* means that the functionality is not fully functional, you can try it and use it but its syntax/use could change in a next release. If you have a fix please add a pull request!
|
50
67
|
|
51
68
|
### Dropdown Menu
|
52
69
|
|
@@ -59,18 +76,20 @@ and then use the class ```pure-menu-has-children``` for the ```li``` that will c
|
|
59
76
|
add ```data-toggle="dropdown"``` to its label element (tipically an anchor),
|
60
77
|
and use the class ```pure-menu-children``` for the ```ul``` that contains the submenu.
|
61
78
|
|
62
|
-
I hope it is clear with the following example:
|
79
|
+
I hope it is clear with the following example (that includes the custom css too):
|
63
80
|
```
|
64
81
|
<header class="header pure-u-1">
|
65
|
-
<div class="pure-menu pure-menu-open pure-menu-fixed pure-menu-horizontal">
|
82
|
+
<div class="pure-menu pure-menu-open pure-menu-fixed pure-menu-horizontal pure-custom-menu-pull-right">
|
83
|
+
<div class="pure-menu-heading"><%= link_to "sample app", root_path, id: "logo" %></div>
|
66
84
|
<ul>
|
67
85
|
<li><%= link_to "Home", root_path %></li>
|
68
86
|
<li><%= link_to "Help", help_path %></li>
|
69
87
|
<% if signed_in? %>
|
70
88
|
<li><%= link_to "Users", users_path %></li>
|
71
|
-
<li class="
|
72
|
-
|
73
|
-
<
|
89
|
+
<li class="pure-menu-custom-separator-vertical"></li>
|
90
|
+
<li class="pure-menu-can-have-children pure-menu-has-children">
|
91
|
+
<a href="#" data-toggle="dropdown">Account <span class="pure-custom-caret"></span></a>
|
92
|
+
<ul class="pure-menu-children">
|
74
93
|
<li><%= link_to "Profile", current_user %></li>
|
75
94
|
<li><%= link_to "Settings", edit_user_path(current_user) %></li>
|
76
95
|
<li class="pure-menu-separator"></li>
|
@@ -87,9 +106,11 @@ I hope it is clear with the following example:
|
|
87
106
|
</header>
|
88
107
|
```
|
89
108
|
|
109
|
+
My dropdown menu code do not support dropdown submenus, for that you can use YUI as in purecss.io example, or pull me a workaround :)
|
110
|
+
|
90
111
|
## TODO
|
91
112
|
|
92
|
-
|
113
|
+
Fix the pull-right menu CSS.
|
93
114
|
|
94
115
|
I'd like to add
|
95
116
|
- Helpers for navigation bars, menus, forms, grids, ...
|
@@ -98,7 +119,6 @@ I'd like to add
|
|
98
119
|
- Way to keep the css updated
|
99
120
|
- Any other ideas?
|
100
121
|
|
101
|
-
|
102
122
|
## Contributing
|
103
123
|
|
104
124
|
1. Fork it
|
@@ -109,5 +129,7 @@ I'd like to add
|
|
109
129
|
|
110
130
|
## Changelog
|
111
131
|
|
112
|
-
0.0.
|
132
|
+
- 0.0.4 Slightly improved dropdown (now it works even with different menu font), added purecss-custom.css
|
133
|
+
- 0.0.3 Added Dropdown script on top of jQuery, corrected README
|
134
|
+
- 0.0.2 Gem restructured following [Gemify Assets for Rails](http://prioritized.net/blog/gemify-assets-for-rails/), added individual modules, improved size
|
113
135
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* purecss-dropdown.js
|
2
|
+
* purecss-dropdown.js v0.0.2
|
3
3
|
* ============================================================
|
4
4
|
* Copyright 2013 Marcello Seri
|
5
5
|
* Based on Twitter Bootstrap
|
@@ -31,7 +31,7 @@
|
|
31
31
|
var $el = $(element).on('click.dropdown.data-api', this.toggle)
|
32
32
|
$('html').on('click.dropdown.data-api', function () {
|
33
33
|
$el.parent().removeClass('pure-menu-open')
|
34
|
-
$el.parent().children('.pure-menu-children').css({"left":"-
|
34
|
+
$el.parent().children('.pure-menu-children').css({"left":"-10000px", "top":"-10000px"})
|
35
35
|
})
|
36
36
|
}
|
37
37
|
|
@@ -58,7 +58,7 @@
|
|
58
58
|
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
|
59
59
|
}
|
60
60
|
$parent.toggleClass('pure-menu-open')
|
61
|
-
$parent.children('.pure-menu-children').css({"left":"0px", "top":
|
61
|
+
$parent.children('.pure-menu-children').css({"left":"0px", "top":(getParent($(this)).height()-2)+'px'})
|
62
62
|
}
|
63
63
|
|
64
64
|
$this.focus()
|
@@ -113,7 +113,7 @@
|
|
113
113
|
$('.dropdown-backdrop').remove()
|
114
114
|
$(toggle).each(function () {
|
115
115
|
getParent($(this)).removeClass('pure-menu-open')
|
116
|
-
getParent($(this)).children('.pure-menu-children').css({"left":"0px", "top":
|
116
|
+
getParent($(this)).children('.pure-menu-children').css({"left":"0px", "top":(getParent($(this)).height()-2)+'px'})
|
117
117
|
})
|
118
118
|
}
|
119
119
|
|
@@ -0,0 +1,57 @@
|
|
1
|
+
.pure-custom-close {
|
2
|
+
float: right;
|
3
|
+
font-size: 20px;
|
4
|
+
font-weight: bold;
|
5
|
+
line-height: 20px;
|
6
|
+
text-shadow: 0 1px 0 #ffffff;
|
7
|
+
opacity: 0.2;
|
8
|
+
filter: alpha(opacity=20);
|
9
|
+
}
|
10
|
+
|
11
|
+
.pure-custom-close:hover,
|
12
|
+
.pure-custom-close:focus {
|
13
|
+
text-decoration: none;
|
14
|
+
cursor: pointer;
|
15
|
+
opacity: 0.4;
|
16
|
+
filter: alpha(opacity=40);
|
17
|
+
}
|
18
|
+
|
19
|
+
.pure-custom-caret {
|
20
|
+
display: inline-block;
|
21
|
+
width: 0;
|
22
|
+
height: 0;
|
23
|
+
vertical-align: middle;
|
24
|
+
border-top: 4px solid #777;
|
25
|
+
border-right: 4px solid transparent;
|
26
|
+
border-left: 4px solid transparent;
|
27
|
+
content: "";
|
28
|
+
margin-left: 2px;
|
29
|
+
}
|
30
|
+
|
31
|
+
.pure-menu-custom-separator-vertical {
|
32
|
+
background-color:#dfdfdf;
|
33
|
+
display:block;
|
34
|
+
width: 1px;
|
35
|
+
height: 20px;
|
36
|
+
font-size:0;
|
37
|
+
overflow:hidden
|
38
|
+
}
|
39
|
+
|
40
|
+
/* *************************************
|
41
|
+
Experimental! The syntax/use could change
|
42
|
+
in the near future
|
43
|
+
************************************** */
|
44
|
+
.pure-menu-custom-pull-right {
|
45
|
+
text-align: justify;
|
46
|
+
}
|
47
|
+
|
48
|
+
.pure-menu-custom-pull-right:after {
|
49
|
+
content: '';
|
50
|
+
display: inline-block;
|
51
|
+
width: 100%;
|
52
|
+
height: 0;
|
53
|
+
font-size:0;
|
54
|
+
line-height:0;
|
55
|
+
margin: 0;
|
56
|
+
padding: 0;
|
57
|
+
}
|
data/lib/purecss/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: purecss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mseri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -54,12 +54,13 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
description: Pure CSS (purecss.io) for Rails 3.1 Asset Pipeline
|
56
56
|
email:
|
57
|
-
-
|
57
|
+
- marcello.seri@gmail.com
|
58
58
|
executables: []
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- app/assets/javascripts/purecss-dropdown.js
|
63
|
+
- app/assets/stylesheets/purecss-addons.css
|
63
64
|
- lib/purecss/engine.rb
|
64
65
|
- lib/purecss/generators/install_generator.rb
|
65
66
|
- lib/purecss/generators/templaets/application.css
|