picnic-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a86cb01f356b013b4a2f1a54756597bee0356184
4
+ data.tar.gz: 1d89abc54771a7b675f53c4144d017d90a526728
5
+ SHA512:
6
+ metadata.gz: 74878182cf38e13d2aa730b724d5b516a2fc9401b105fb2d7a8ae450936804e153218c345f377b34eb9860b5fcc51f5b775e53a1cef9f710ed9db0f6b09651cc
7
+ data.tar.gz: 184c4df6e70df72162215819e0976ce6bb5f6eb04c6e7b5a7f8c8f8362e96aba6d676ab9a94bc39f8a7e56c65f64f2dbb3b4d00c6e3cc9e3e38fd50bff4aaa7b
data/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # Picnic for Rails
2
+
3
+ ## Installation
4
+
5
+ `picnic-rails` is easy to drop into Rails with the asset pipeline.
6
+
7
+ In your Gemfile you need to add the `picnic-rails` gem, and ensure that the `sass-rails` gem is present - it is added to new Rails applications by default.
8
+
9
+ ```ruby
10
+ gem 'picnic-rails'
11
+ ```
12
+
13
+ It is also recommended to use [Autoprefixer](https://github.com/ai/autoprefixer-rails) with Picnic
14
+ to add browser vendor prefixes automatically. Simply add the gem:
15
+
16
+ ```ruby
17
+ gem 'autoprefixer-rails'
18
+ ```
19
+
20
+ `bundle install` and restart your server to make the files available through the pipeline.
21
+
22
+ Import Picnic styles in `app/assets/stylesheets/application.css.scss`:
23
+
24
+ ```scss
25
+ @import 'picinc';
26
+ ```
27
+
28
+ Make sure the file has `.css.scss` extension (or `.css.sass` for Sass syntax). If you have just generated a new Rails app,
29
+ it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so remove it:
30
+
31
+ ```console
32
+ $ rm app/assets/stylesheets/application.css
33
+ ```
34
+
35
+ Do not use `//= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Picinc variables.
36
+
37
+
38
+ * [picinc.scss](/app/assets/stylesheets/picnic.scss) - main project Sass file, imports Picnic and variables.
39
+
40
+ ```scss
41
+ @import 'picinc/variables';
42
+ @import 'picinc/checkbox';
43
+ @import 'picinc/select';
44
+ ```
45
+
46
+ ### Configuration
47
+
48
+ #### Sass
49
+
50
+ #### Sass: Autoprefixer
51
+
52
+ Using [Autoprefixer][autoprefixer] with Picnic is recommended.
53
+ [Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](http://caniuse.com/).
54
+
55
+
56
+ ## Usage
57
+
58
+ ### Sass
59
+
60
+ The full list of Picinc variables can be found [here](/app/assets/stylesheets/picnic/_variables.scss). You can override these by simply redefining the variable before the `@import` directive, e.g.:
61
+
62
+ ```scss
63
+ $picnic-deep: true;
64
+ $picnic-tablet-width: 750px;
65
+ $picnic-laptop-width: 1200px;
66
+ $picnic-success: green;
67
+
68
+ @import 'picinc';
69
+ ```
70
+
71
+ ## You're in good company
72
+
73
+ [picinc](https://github.com/picnicss/picnic)
74
+ [autoprefixer](https://github.com/ai/autoprefixer)
@@ -0,0 +1,108 @@
1
+ /* BUTTONS */
2
+ .button,
3
+ a.button:visited,
4
+ .toggle input + * {
5
+ user-select: none;
6
+ border: none;
7
+ box-sizing: content-box;
8
+ display: inline-block;
9
+ font-size: 1em;
10
+ height: $picnic-text-height;
11
+ line-height: $picnic-text-height;
12
+ text-decoration: none;
13
+ vertical-align: middle;
14
+ background: $picnic-primary;
15
+ color: $picnic-white;
16
+ border-radius: $picnic-radius;
17
+ cursor: pointer;
18
+ transition: $picnic-transition-fast;
19
+ margin: $picnic-margin;
20
+ padding: $picnic-padding $picnic-padding * 3;
21
+
22
+ @if $picnic-deep == true {
23
+ height: $picnic-text-height - .2em;
24
+ line-height: $picnic-text-height;
25
+ padding: $picnic-padding $picnic-padding * 3 $picnic-padding + .2em;
26
+ margin: $picnic-margin $picnic-margin $picnic-margin;
27
+ box-shadow: inset 0 -.2em $picnic-dark-overlay;
28
+ }
29
+ }
30
+
31
+
32
+
33
+ /* Interactivity */
34
+ .button:hover,
35
+ .button:focus,
36
+ .toggle:hover input + *,
37
+ .toggle input:focus + * {
38
+ color: $picnic-white;
39
+ transition: all .1s ease;
40
+ box-shadow: inset 0 0 0 100em $picnic-soft-dark-overlay;
41
+
42
+ @if $picnic-deep == true {
43
+ margin: $picnic-margin + .1em $picnic-margin $picnic-margin;
44
+ padding: $picnic-padding $picnic-padding * 3 $picnic-padding + .1em;
45
+ box-shadow: inset 0 -.1em $picnic-dark-overlay;
46
+ }
47
+ }
48
+
49
+ .button:active,
50
+ .toggle input:active + *,
51
+ .toggle input:checked + * {
52
+ box-shadow: inset 0 0 0 100em $picnic-dark-overlay;
53
+
54
+ @if $picnic-deep == true {
55
+ margin: $picnic-margin + .2em $picnic-margin $picnic-margin;
56
+ padding: $picnic-padding $picnic-padding * 3;
57
+ box-shadow: inset 0 .1em .1em $picnic-dark-overlay;
58
+ }
59
+ }
60
+
61
+
62
+
63
+ /* Toggle button */
64
+ .toggle input {
65
+ opacity: 0;
66
+ z-index: -10;
67
+ position: absolute;
68
+ }
69
+
70
+
71
+
72
+ /* Colors */
73
+ .button.success,
74
+ .button.success:visited,
75
+ .toggle.success input + * {
76
+ background: $picnic-success;
77
+ }
78
+
79
+ .button.warning,
80
+ a.button.warning:visited,
81
+ .toggle.warning input + * {
82
+ background: $picnic-warning;
83
+ }
84
+
85
+ .button.error,
86
+ a.button.error:visited,
87
+ .toggle.error input + * {
88
+ background: $picnic-error;
89
+ }
90
+
91
+ .button.dull,
92
+ a.button.dull:visited,
93
+ .toggle.dull input + * {
94
+ background: $picnic-dull;
95
+ }
96
+
97
+
98
+
99
+ /* This allows for the invasiveness (default styling) */
100
+ @if $picnic-invasive == true {
101
+ button,
102
+ input[type='submit'],
103
+ input[type='button'],
104
+ input[type='image'],
105
+ input[type='reset'] {
106
+ @extend .button;
107
+ }
108
+ }
@@ -0,0 +1,48 @@
1
+ .checkbox {
2
+ position: relative;
3
+ display: inline-block;
4
+ min-width: 1em;
5
+ min-height: 1.25em;
6
+ line-height: 1em;
7
+ margin: .2em 0 -.2em;
8
+ outline: 0px none;
9
+ vertical-align: middle;
10
+ cursor: pointer;
11
+ }
12
+
13
+ /* Match the element following input */
14
+ .checkbox input + * {
15
+ vertical-align: super;
16
+ }
17
+
18
+ .checkbox input + *:before {
19
+ /* Tick */
20
+ content: "\2714";
21
+ position: absolute;
22
+ border-radius: $picnic-radius;
23
+ top: .1em;
24
+ line-height: .8em;
25
+ width: 1.1em;
26
+ height: 1.1em;
27
+ font-size: .8em;
28
+ padding: .1em;
29
+ left: $picnic-margin;
30
+ text-align: center;
31
+ background: $picnic-white;
32
+ color: transparent;
33
+ border: $picnic-border;
34
+ box-sizing: border-box;
35
+ }
36
+
37
+ .checkbox input:focus + *:before,
38
+ .checkbox input:hover + *:before {
39
+ border: 1px solid $picnic-aqua;
40
+ }
41
+
42
+ .checkbox input {
43
+ opacity: 0;
44
+ }
45
+
46
+ .checkbox input:checked + *:before {
47
+ color: $picnic-light-black;
48
+ }
@@ -0,0 +1,49 @@
1
+ /* Delete the outline when links are active */
2
+ body {
3
+ color: $picnic-black;
4
+ font-size: 1.1em;
5
+ line-height: $picnic-text-height;
6
+ }
7
+
8
+ /* Hide the default focus effect */
9
+ :focus {
10
+ outline: none;
11
+ }
12
+
13
+ h1 {
14
+ line-height: $picnic-text-height;
15
+ }
16
+
17
+ h1, h2, h3, h4, h5, h6 {
18
+ margin: 0;
19
+ padding: $picnic-padding * 3 0 $picnic-padding * 2;
20
+ }
21
+
22
+ li {
23
+ margin: 0 0 $picnic-margin;
24
+ }
25
+
26
+
27
+
28
+ /* The <pre> doesn't have a nice style from Normalize.css */
29
+ pre {
30
+ text-align: left;
31
+ border: $picnic-soft-dark-overlay;
32
+ background: rgba(0,0,0,.05);
33
+ padding: .3em;
34
+ }
35
+ code {
36
+ background: #EEE;
37
+ padding: 3px 5px;
38
+ font-size: .8em;
39
+ }
40
+ blockquote {
41
+ padding: 0 0 0 1em;
42
+ margin: 0 0 0 .1em;
43
+ box-shadow: inset 5px 0px $picnic-dark-overlay;
44
+ }
45
+
46
+ /* Nice fontello trick from Ronen Ackerman ( http://stackoverflow.com/a/17561467 ) */
47
+ i[class^="icon-"]:before,i[class*=" icon-"]:before {
48
+ margin: 0;
49
+ }
@@ -0,0 +1,163 @@
1
+ .row {
2
+ position: relative;
3
+ display: block;
4
+ overflow: auto;
5
+ }
6
+
7
+ [class*="full"],[class*="half"],[class*="third"],[class*="fourth"],[class*="fifth"],[class*="sixth"] {
8
+ box-sizing: border-box;
9
+ float: left;
10
+ padding-left: 0;
11
+ padding-right: 0;
12
+ min-height: 1px;
13
+ }
14
+
15
+ .none {
16
+ display: none;
17
+ }
18
+
19
+ .full {
20
+ width: 100%;
21
+ }
22
+
23
+ .half {
24
+ width: 50%;
25
+ }
26
+
27
+ .third {
28
+ width: 33.333%;
29
+ }
30
+
31
+ .two-third {
32
+ width: 66.666%;
33
+ }
34
+
35
+ .fourth {
36
+ width: 25%;
37
+ }
38
+
39
+ .three-fourth {
40
+ width: 75%;
41
+ }
42
+
43
+ .fifth {
44
+ width: 20%;
45
+ }
46
+
47
+ .two-fifth {
48
+ width: 40%;
49
+ }
50
+
51
+ .three-fifth {
52
+ width: 60%;
53
+ }
54
+
55
+ .four-fifth {
56
+ width: 80%;
57
+ }
58
+
59
+ .sixth {
60
+ width: 16.666%;
61
+ }
62
+
63
+ /* Responsive grids: tablet+ */
64
+ @media all and (min-width: $picnic-tablet-width) {
65
+ .m-none {
66
+ display: none;
67
+ }
68
+
69
+ .m-full {
70
+ width: 100%;
71
+ }
72
+
73
+ .m-half {
74
+ width: 50%;
75
+ }
76
+
77
+ .m-third {
78
+ width: 33.333%;
79
+ }
80
+
81
+ .m-two-third {
82
+ width: 66.666%;
83
+ }
84
+
85
+ .m-fourth {
86
+ width: 25%;
87
+ }
88
+
89
+ .m-three-fourth {
90
+ width: 75%;
91
+ }
92
+
93
+ .m-fifth {
94
+ width: 20%;
95
+ }
96
+
97
+ .m-two-fifth {
98
+ width: 40%;
99
+ }
100
+
101
+ .m-three-fifth {
102
+ width: 60%;
103
+ }
104
+
105
+ .m-four-fifth {
106
+ width: 80%;
107
+ }
108
+
109
+ .m-sixth {
110
+ width: 16.666%;
111
+ }
112
+ }
113
+
114
+ /* Responsive grids: laptop+ */
115
+ @media all and (min-width: $picnic-laptop-width) {
116
+ .l-none {
117
+ display: none;
118
+ }
119
+
120
+ .l-full {
121
+ width: 100%;
122
+ }
123
+
124
+ .l-half {
125
+ width: 50%;
126
+ }
127
+
128
+ .l-third {
129
+ width: 33.333%;
130
+ }
131
+
132
+ .l-two-third {
133
+ width: 66.666%;
134
+ }
135
+
136
+ .l-fourth {
137
+ width: 25%;
138
+ }
139
+
140
+ .l-three-fourth {
141
+ width: 75%;
142
+ }
143
+
144
+ .l-fifth {
145
+ width: 20%;
146
+ }
147
+
148
+ .l-two-fifth {
149
+ width: 40%;
150
+ }
151
+
152
+ .l-three-fifth {
153
+ width: 60%;
154
+ }
155
+
156
+ .l-four-fifth {
157
+ width: 80%;
158
+ }
159
+
160
+ .l-sixth {
161
+ width: 16.666%;
162
+ }
163
+ }
@@ -0,0 +1,46 @@
1
+ /* Browser treats unknow type as "text", so we'll do the same */
2
+ input {
3
+ line-height: $picnic-text-height;
4
+ margin: $picnic-margin;
5
+ padding: $picnic-padding-text;
6
+ border: $picnic-border;
7
+ border-radius: $picnic-radius;
8
+ transition: $picnic-transition-slow;
9
+ }
10
+
11
+ input[type=file],
12
+ input[type=color] {
13
+ padding: $picnic-padding;
14
+ cursor: pointer;
15
+ }
16
+
17
+ input:focus,
18
+ input[type=file]:hover,
19
+ input[type=color]:hover,
20
+ input:invalid:focus,
21
+ .select select:focus,
22
+ .select select:hover {
23
+ border-color: $picnic-light-primary;
24
+ transition: $picnic-transition-slow;
25
+
26
+ @if $picnic-deep == true {
27
+ box-shadow: .1em .1em 0 $picnic-dark-overlay;
28
+ }
29
+ }
30
+
31
+ /* Validation */
32
+ input:invalid {
33
+ border-color: $picnic-warning;
34
+ box-shadow: none;
35
+ }
36
+
37
+ input:focus:invalid {
38
+ border-color: $picnic-error;
39
+ }
40
+
41
+ /* Reset the style for those that we actually know */
42
+ input[type=radio]:focus,
43
+ input[type=checkbox]:focus {
44
+ box-shadow: none;
45
+ border-color: initial;
46
+ }
@@ -0,0 +1,4 @@
1
+ a, a:hover, a:active, a:visited {
2
+ color: $picnic-primary;
3
+ text-decoration: none;
4
+ }
@@ -0,0 +1,177 @@
1
+ nav {
2
+ width: 100%;
3
+ position: fixed;
4
+ text-align: center;
5
+ top: 0;
6
+ background: #FFF;
7
+ box-shadow: 0 0 .6em $picnic-dark-overlay;
8
+ z-index: 10;
9
+ transition: all .3s ease;
10
+ }
11
+
12
+ nav.transparent {
13
+ box-shadow: none;
14
+ background: none;
15
+ }
16
+
17
+ nav.transparent a,
18
+ nav.transparent a:visited {
19
+ color: $picnic-white;
20
+ }
21
+
22
+ nav a,
23
+ nav a:visited {
24
+ color: $picnic-black;
25
+ display: inline-block;
26
+ font-size: 1em;
27
+ height: 2em;
28
+ line-height: 2em;
29
+ padding: .5em .6em;
30
+ }
31
+
32
+ nav a:hover {
33
+ color: $picnic-black;
34
+ box-shadow: inset 0 -.2em 0 #7fdbff;
35
+ }
36
+
37
+ nav a.button,
38
+ nav a.button:hover {
39
+ color: $picnic-white;
40
+ line-height: 1.4em;
41
+ }
42
+
43
+ nav .main,
44
+ nav .menu {
45
+ margin: 0 .5em;
46
+ }
47
+
48
+ nav .main {
49
+ font-weight: 700;
50
+ float: left;
51
+ max-width: 50%;
52
+ white-space: nowrap;
53
+ }
54
+
55
+
56
+ nav .main img {
57
+ height: 2em;
58
+ }
59
+
60
+ nav .menu {
61
+ float: right;
62
+ }
63
+
64
+ .burgercheck,.burgermenu {
65
+ display: none;
66
+ cursor: pointer;
67
+ }
68
+
69
+ .burgermenu {
70
+ display: inline-block;
71
+ position: relative;
72
+ height: .8em;
73
+ width: .4em;
74
+ margin: .35em;
75
+ display: none;
76
+ }
77
+
78
+ .burgermenu:before,.burgermenu:after {
79
+ display: none;
80
+ content: " ";
81
+ width: 100%;
82
+ position: absolute;
83
+ top: 0;
84
+ bottom: 0;
85
+ border-style: solid;
86
+ border-color: #333;
87
+ border-width: .14em 0;
88
+ }
89
+
90
+ .burgermenu:after {
91
+ top: 50%;
92
+ margin-top: -.07em;
93
+ }
94
+
95
+ @media all and (max-width: 960px) {
96
+ [class*="icon-"]:before,[class*=" icon-"]:before {
97
+ display: none;
98
+ }
99
+ }
100
+
101
+ @media all and (max-width: $picnic-tablet-width) {
102
+ [class*="icon-"]:before {
103
+ display: inline-block;
104
+ }
105
+
106
+ .burgercheck ~ label:before,.burgercheck ~ label:after {
107
+ display: block;
108
+ }
109
+
110
+ .burgercheck ~ label {
111
+ position: fixed;
112
+ top: 0;
113
+ right: 0;
114
+ display: inline-block;
115
+ font-size: 2em;
116
+ line-height: 1.5em;
117
+ padding-right: .5em;
118
+ text-align: right;
119
+ transition: all .3s ease;
120
+ /* Avoid the burger menu to display while hiding */
121
+ transition: display 0s ease .3s;
122
+ }
123
+
124
+ .burgercheck:checked ~ label:before,.burgercheck:checked ~ label:after {
125
+ display: none;
126
+ }
127
+
128
+ .burgercheck:checked ~ label {
129
+ margin: 0;
130
+ right: 70%;
131
+ width: 30%;
132
+ height: 100%;
133
+ transition: all .3s ease;
134
+ background: rgba(255,255,255,.7);
135
+ }
136
+
137
+ nav .menu {
138
+ position: fixed;
139
+ width: 70%;
140
+ height: 100%;
141
+ right: -70%;
142
+ top: 0;
143
+ margin-right: 0;
144
+ background: $picnic-white;
145
+ box-shadow: 0 0 .6em $picnic-dark-overlay;
146
+ overflow: auto;
147
+ transition: all .3s ease;
148
+ }
149
+
150
+ .burgercheck:checked ~ .menu {
151
+ right: 0;
152
+ transition: all .3s ease;
153
+ }
154
+
155
+ nav .menu a {
156
+ display: block;
157
+ text-align: left;
158
+ }
159
+
160
+ nav .menu .button {
161
+ margin: .5em;
162
+ float: left;
163
+ clear: left;
164
+ }
165
+
166
+ nav .menu .button:hover {
167
+ margin: .6em .5em .5em;
168
+ }
169
+
170
+ nav .menu .button:active {
171
+ margin: .7em .5em .5em;
172
+ }
173
+
174
+ .transparent .menu {
175
+ color: $picnic-black;
176
+ }
177
+ }
@@ -0,0 +1,426 @@
1
+ /*! normalize.css v3.0.1 | MIT License | git.io/normalize */
2
+
3
+ /**
4
+ * 1. Set default font family to sans-serif.
5
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
6
+ * user zoom.
7
+ */
8
+
9
+ html {
10
+ font-family: sans-serif; /* 1 */
11
+ -ms-text-size-adjust: 100%; /* 2 */
12
+ -webkit-text-size-adjust: 100%; /* 2 */
13
+ }
14
+
15
+ /**
16
+ * Remove default margin.
17
+ */
18
+
19
+ body {
20
+ margin: 0;
21
+ }
22
+
23
+ /* HTML5 display definitions
24
+ ========================================================================== */
25
+
26
+ /**
27
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
28
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
29
+ * Correct `block` display not defined for `main` in IE 11.
30
+ */
31
+
32
+ article,
33
+ aside,
34
+ details,
35
+ figcaption,
36
+ figure,
37
+ footer,
38
+ header,
39
+ hgroup,
40
+ main,
41
+ nav,
42
+ section,
43
+ summary {
44
+ display: block;
45
+ }
46
+
47
+ /**
48
+ * 1. Correct `inline-block` display not defined in IE 8/9.
49
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
50
+ */
51
+
52
+ audio,
53
+ canvas,
54
+ progress,
55
+ video {
56
+ display: inline-block; /* 1 */
57
+ vertical-align: baseline; /* 2 */
58
+ }
59
+
60
+ /**
61
+ * Prevent modern browsers from displaying `audio` without controls.
62
+ * Remove excess height in iOS 5 devices.
63
+ */
64
+
65
+ audio:not([controls]) {
66
+ display: none;
67
+ height: 0;
68
+ }
69
+
70
+ /**
71
+ * Address `[hidden]` styling not present in IE 8/9/10.
72
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
73
+ */
74
+
75
+ [hidden],
76
+ template {
77
+ display: none;
78
+ }
79
+
80
+ /* Links
81
+ ========================================================================== */
82
+
83
+ /**
84
+ * Remove the gray background color from active links in IE 10.
85
+ */
86
+
87
+ a {
88
+ background: transparent;
89
+ }
90
+
91
+ /**
92
+ * Improve readability when focused and also mouse hovered in all browsers.
93
+ */
94
+
95
+ a:active,
96
+ a:hover {
97
+ outline: 0;
98
+ }
99
+
100
+ /* Text-level semantics
101
+ ========================================================================== */
102
+
103
+ /**
104
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
105
+ */
106
+
107
+ abbr[title] {
108
+ border-bottom: 1px dotted;
109
+ }
110
+
111
+ /**
112
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
113
+ */
114
+
115
+ b,
116
+ strong {
117
+ font-weight: bold;
118
+ }
119
+
120
+ /**
121
+ * Address styling not present in Safari and Chrome.
122
+ */
123
+
124
+ dfn {
125
+ font-style: italic;
126
+ }
127
+
128
+ /**
129
+ * Address variable `h1` font-size and margin within `section` and `article`
130
+ * contexts in Firefox 4+, Safari, and Chrome.
131
+ */
132
+
133
+ h1 {
134
+ font-size: 2em;
135
+ margin: 0.67em 0;
136
+ }
137
+
138
+ /**
139
+ * Address styling not present in IE 8/9.
140
+ */
141
+
142
+ mark {
143
+ background: #ff0;
144
+ color: #000;
145
+ }
146
+
147
+ /**
148
+ * Address inconsistent and variable font size in all browsers.
149
+ */
150
+
151
+ small {
152
+ font-size: 80%;
153
+ }
154
+
155
+ /**
156
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
157
+ */
158
+
159
+ sub,
160
+ sup {
161
+ font-size: 75%;
162
+ line-height: 0;
163
+ position: relative;
164
+ vertical-align: baseline;
165
+ }
166
+
167
+ sup {
168
+ top: -0.5em;
169
+ }
170
+
171
+ sub {
172
+ bottom: -0.25em;
173
+ }
174
+
175
+ /* Embedded content
176
+ ========================================================================== */
177
+
178
+ /**
179
+ * Remove border when inside `a` element in IE 8/9/10.
180
+ */
181
+
182
+ img {
183
+ border: 0;
184
+ }
185
+
186
+ /**
187
+ * Correct overflow not hidden in IE 9/10/11.
188
+ */
189
+
190
+ svg:not(:root) {
191
+ overflow: hidden;
192
+ }
193
+
194
+ /* Grouping content
195
+ ========================================================================== */
196
+
197
+ /**
198
+ * Address margin not present in IE 8/9 and Safari.
199
+ */
200
+
201
+ figure {
202
+ margin: 1em 40px;
203
+ }
204
+
205
+ /**
206
+ * Address differences between Firefox and other browsers.
207
+ */
208
+
209
+ hr {
210
+ -moz-box-sizing: content-box;
211
+ box-sizing: content-box;
212
+ height: 0;
213
+ }
214
+
215
+ /**
216
+ * Contain overflow in all browsers.
217
+ */
218
+
219
+ pre {
220
+ overflow: auto;
221
+ }
222
+
223
+ /**
224
+ * Address odd `em`-unit font size rendering in all browsers.
225
+ */
226
+
227
+ code,
228
+ kbd,
229
+ pre,
230
+ samp {
231
+ font-family: monospace, monospace;
232
+ font-size: 1em;
233
+ }
234
+
235
+ /* Forms
236
+ ========================================================================== */
237
+
238
+ /**
239
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
240
+ * styling of `select`, unless a `border` property is set.
241
+ */
242
+
243
+ /**
244
+ * 1. Correct color not being inherited.
245
+ * Known issue: affects color of disabled elements.
246
+ * 2. Correct font properties not being inherited.
247
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
248
+ */
249
+
250
+ button,
251
+ input,
252
+ optgroup,
253
+ select,
254
+ textarea {
255
+ color: inherit; /* 1 */
256
+ font: inherit; /* 2 */
257
+ margin: 0; /* 3 */
258
+ }
259
+
260
+ /**
261
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
262
+ */
263
+
264
+ button {
265
+ overflow: visible;
266
+ }
267
+
268
+ /**
269
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
270
+ * All other form control elements do not inherit `text-transform` values.
271
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
272
+ * Correct `select` style inheritance in Firefox.
273
+ */
274
+
275
+ button,
276
+ select {
277
+ text-transform: none;
278
+ }
279
+
280
+ /**
281
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
282
+ * and `video` controls.
283
+ * 2. Correct inability to style clickable `input` types in iOS.
284
+ * 3. Improve usability and consistency of cursor style between image-type
285
+ * `input` and others.
286
+ */
287
+
288
+ button,
289
+ html input[type="button"], /* 1 */
290
+ input[type="reset"],
291
+ input[type="submit"] {
292
+ -webkit-appearance: button; /* 2 */
293
+ cursor: pointer; /* 3 */
294
+ }
295
+
296
+ /**
297
+ * Re-set default cursor for disabled elements.
298
+ */
299
+
300
+ button[disabled],
301
+ html input[disabled] {
302
+ cursor: default;
303
+ }
304
+
305
+ /**
306
+ * Remove inner padding and border in Firefox 4+.
307
+ */
308
+
309
+ button::-moz-focus-inner,
310
+ input::-moz-focus-inner {
311
+ border: 0;
312
+ padding: 0;
313
+ }
314
+
315
+ /**
316
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
317
+ * the UA stylesheet.
318
+ */
319
+
320
+ input {
321
+ line-height: normal;
322
+ }
323
+
324
+ /**
325
+ * It's recommended that you don't attempt to style these elements.
326
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
327
+ *
328
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
329
+ * 2. Remove excess padding in IE 8/9/10.
330
+ */
331
+
332
+ input[type="checkbox"],
333
+ input[type="radio"] {
334
+ box-sizing: border-box; /* 1 */
335
+ padding: 0; /* 2 */
336
+ }
337
+
338
+ /**
339
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
340
+ * `font-size` values of the `input`, it causes the cursor style of the
341
+ * decrement button to change from `default` to `text`.
342
+ */
343
+
344
+ input[type="number"]::-webkit-inner-spin-button,
345
+ input[type="number"]::-webkit-outer-spin-button {
346
+ height: auto;
347
+ }
348
+
349
+ /**
350
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
351
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
352
+ * (include `-moz` to future-proof).
353
+ */
354
+
355
+ input[type="search"] {
356
+ -webkit-appearance: textfield; /* 1 */
357
+ -moz-box-sizing: content-box;
358
+ -webkit-box-sizing: content-box; /* 2 */
359
+ box-sizing: content-box;
360
+ }
361
+
362
+ /**
363
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
364
+ * Safari (but not Chrome) clips the cancel button when the search input has
365
+ * padding (and `textfield` appearance).
366
+ */
367
+
368
+ input[type="search"]::-webkit-search-cancel-button,
369
+ input[type="search"]::-webkit-search-decoration {
370
+ -webkit-appearance: none;
371
+ }
372
+
373
+ /**
374
+ * Define consistent border, margin, and padding.
375
+ */
376
+
377
+ fieldset {
378
+ border: 1px solid #c0c0c0;
379
+ margin: 0 2px;
380
+ padding: 0.35em 0.625em 0.75em;
381
+ }
382
+
383
+ /**
384
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
385
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
386
+ */
387
+
388
+ legend {
389
+ border: 0; /* 1 */
390
+ padding: 0; /* 2 */
391
+ }
392
+
393
+ /**
394
+ * Remove default vertical scrollbar in IE 8/9/10/11.
395
+ */
396
+
397
+ textarea {
398
+ overflow: auto;
399
+ }
400
+
401
+ /**
402
+ * Don't inherit the `font-weight` (applied by a rule above).
403
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
404
+ */
405
+
406
+ optgroup {
407
+ font-weight: bold;
408
+ }
409
+
410
+ /* Tables
411
+ ========================================================================== */
412
+
413
+ /**
414
+ * Remove most spacing between table cells.
415
+ */
416
+
417
+ table {
418
+ border-collapse: collapse;
419
+ border-spacing: 0;
420
+ }
421
+
422
+ td,
423
+ th {
424
+ padding: 0;
425
+ }
426
+
@@ -0,0 +1,46 @@
1
+ .radio {
2
+ position: relative;
3
+ display: inline-block;
4
+ min-width: 1em;
5
+ min-height: 1.25em;
6
+ line-height: 1em;
7
+ margin: .2em 0 -.2em;
8
+ outline: 0px none;
9
+ vertical-align: middle;
10
+ cursor: pointer;
11
+ }
12
+
13
+ /* Match the element following input */
14
+ .radio input + * {
15
+ vertical-align: super;
16
+ }
17
+
18
+ /* Not to repeat them */
19
+ .radio input + *:before {
20
+ content: "";
21
+ position: absolute;
22
+ border: 3px solid $picnic-white;
23
+ border-radius: 100em;
24
+ margin: .1em 0;
25
+ top: 0;
26
+ line-height: .8;
27
+ width: .8em;
28
+ height: .8em;
29
+ left: $picnic-margin;
30
+ background: $picnic-white;
31
+ box-shadow: 0 0 0 1px $picnic-dark-overlay;
32
+ box-sizing: border-box;
33
+ }
34
+
35
+ .radio input {
36
+ opacity: 0;
37
+ }
38
+
39
+ .radio input:focus + *:before,
40
+ .radio input:hover + *:before {
41
+ box-shadow: 0 0 0 1px $picnic-aqua;
42
+ }
43
+
44
+ .radio input:checked + *:before {
45
+ background: $picnic-light-black;
46
+ }
@@ -0,0 +1,46 @@
1
+ .select {
2
+ display: inline-block;
3
+ position: relative;
4
+ border: 1px solid rgba(0,0,0,.3);
5
+ border-radius: $picnic-radius;
6
+ }
7
+
8
+ .select:after {
9
+ padding: 1.2% 0 0 0;
10
+ background: $picnic-white;
11
+ content: "\25BC";
12
+ display: block;
13
+ position: absolute;
14
+ right: 0;
15
+ top: 0;
16
+ bottom: 0;
17
+ width: 2.3em;
18
+ pointer-events: none;
19
+ font-size: .8em;
20
+ line-height:2.3em;
21
+ text-align: center;
22
+ border-radius: $picnic-radius;
23
+ }
24
+
25
+ .select select {
26
+ padding:0.23em 0 0.23em 0.23em;
27
+ background: none;
28
+ //vendor prefixes required, see:
29
+ //https://github.com/postcss/autoprefixer#why-doesnt-autoprefixer-support-appearance
30
+ -moz-appearance: none;
31
+ -webkit-appearance: none;
32
+ appearance: none;
33
+ border: none;
34
+ min-width: 14em;
35
+ border-radius: $picnic-radius;
36
+ cursor: pointer;
37
+ }
38
+
39
+ .select select:-moz-focusring {
40
+ color: transparent;
41
+ text-shadow: 0 0 0 $picnic-black;
42
+ }
43
+
44
+ .select select option {
45
+ padding: .2em .5em;
46
+ }
@@ -0,0 +1,34 @@
1
+ table {
2
+ text-align: left;
3
+ }
4
+
5
+ td,th {
6
+ padding: $picnic-padding 2.4em $picnic-padding $picnic-padding * 2;
7
+ }
8
+
9
+ th {
10
+ font-weight: 900;
11
+ color: $picnic-white;
12
+ background-color: $picnic-primary;
13
+ }
14
+
15
+ .success th {
16
+ background-color: $picnic-success;
17
+ }
18
+
19
+ .warning th {
20
+ background-color: $picnic-warning;
21
+ }
22
+
23
+ .error th {
24
+ background-color: $picnic-error;
25
+ }
26
+
27
+ .dull th {
28
+ background-color: $picnic-dull;
29
+ }
30
+
31
+
32
+ tr:nth-child(even) {
33
+ background: rgba(0,0,0,.05);
34
+ }
@@ -0,0 +1,39 @@
1
+ /* Style by default the <button>, <input type="submit">, etc? */
2
+ /* Not fully implemented */
3
+ $picnic-invasive: true !default;
4
+
5
+ /* Make buttons and other things slightly 3d */
6
+ $picnic-deep: true !default;
7
+
8
+ /* Media query breakpoints */
9
+ $picnic-tablet-width: 750px !default;
10
+ $picnic-laptop-width: 1200px !default;
11
+
12
+ /* Default element styles */
13
+ $picnic-radius: .2em !default;
14
+ $picnic-margin: .3em !default;
15
+ $picnic-padding: .3em !default;
16
+ $picnic-text-height: 1.5em !default;
17
+ $picnic-padding-text: $picnic-padding $picnic-padding * 1.5 + .2em !default;
18
+
19
+ /* Define the transitions */
20
+ $picnic-transition-fast: all .1s ease !default;
21
+ $picnic-transition-slow: all .3s ease !default;
22
+
23
+ /* Colors */
24
+ $picnic-white: #FFF !default;
25
+ $picnic-black: #333 !default;
26
+ $picnic-light-black: #555 !default;
27
+ $picnic-primary: #0074D9 !default;
28
+ $picnic-light-primary: #7FDBFF !default;
29
+ $picnic-success: #2ecc40 !default;
30
+ $picnic-warning: #FF851B !default;
31
+ $picnic-error: #FF4136 !default;
32
+ $picnic-dull: #AAA !default;
33
+ $picnic-aqua: #7fdbff !default;
34
+ $picnic-dark-overlay: rgba(0, 0, 0, .3) !default;
35
+ $picnic-soft-dark-overlay: rgba(0, 0, 0, .1) !default;
36
+ $picnic-clear-overlay: rgba(255, 255, 255, .3) !default;
37
+
38
+ /* Border */
39
+ $picnic-border: 1px solid $picnic-dark-overlay !default;
@@ -0,0 +1,12 @@
1
+ @import 'picnic/normalize';
2
+ @import 'picnic/variables';
3
+ @import 'picnic/generic';
4
+ @import 'picnic/link';
5
+ @import 'picnic/button';
6
+ @import 'picnic/table';
7
+ @import 'picnic/grids';
8
+ @import 'picnic/nav';
9
+ @import 'picnic/input';
10
+ @import 'picnic/select';
11
+ @import 'picnic/checkbox';
12
+ @import 'picnic/radio';
@@ -0,0 +1,5 @@
1
+ module Picnic
2
+ module Rails
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ module Picnic
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: picnic-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Alex Galushka
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Unpack your meal and get coding. An invasive CSS library to get your
14
+ style started.
15
+ email:
16
+ - galulex@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - README.md
22
+ - app/assets/stylesheets/picnic.scss
23
+ - app/assets/stylesheets/picnic/_button.scss
24
+ - app/assets/stylesheets/picnic/_checkbox.scss
25
+ - app/assets/stylesheets/picnic/_generic.scss
26
+ - app/assets/stylesheets/picnic/_grids.scss
27
+ - app/assets/stylesheets/picnic/_input.scss
28
+ - app/assets/stylesheets/picnic/_link.scss
29
+ - app/assets/stylesheets/picnic/_nav.scss
30
+ - app/assets/stylesheets/picnic/_normalize.scss
31
+ - app/assets/stylesheets/picnic/_radio.scss
32
+ - app/assets/stylesheets/picnic/_select.scss
33
+ - app/assets/stylesheets/picnic/_table.scss
34
+ - app/assets/stylesheets/picnic/_variables.scss
35
+ - lib/picnic-rails.rb
36
+ - lib/picnic-rails/version.rb
37
+ homepage: http://picnicss.com
38
+ licenses:
39
+ - MIT
40
+ metadata: {}
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ requirements: []
56
+ rubyforge_project:
57
+ rubygems_version: 2.2.2
58
+ signing_key:
59
+ specification_version: 4
60
+ summary: Picnic CSS for Rails
61
+ test_files: []
62
+ has_rdoc: