furatto 0.0.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -18
- data/furatto.gemspec +4 -0
- data/lib/furatto.rb +3 -10
- data/lib/furatto/version.rb +1 -1
- data/lib/furatto_rails_helpers/furatto_helpers.rb +19 -0
- data/lib/generators/furatto/install_generator.rb +46 -0
- data/lib/generators/furatto/templates/application.html.erb +28 -0
- data/vendor/assets/javascripts/furatto.js +1822 -0
- data/vendor/assets/stylesheets/furatto.scss +76 -0
- data/vendor/assets/stylesheets/furatto/_alerts.scss +130 -0
- data/vendor/assets/stylesheets/furatto/_base.scss +138 -0
- data/vendor/assets/stylesheets/furatto/_button-groups.scss +85 -0
- data/vendor/assets/stylesheets/furatto/_buttons.scss +266 -0
- data/{app → vendor}/assets/stylesheets/furatto/_date_picker.date.scss +0 -0
- data/{app → vendor}/assets/stylesheets/furatto/_date_picker.scss +1 -0
- data/{app → vendor}/assets/stylesheets/furatto/_dropdown.scss +0 -0
- data/vendor/assets/stylesheets/furatto/_experimental.scss +81 -0
- data/{app → vendor}/assets/stylesheets/furatto/_footer.scss +0 -0
- data/vendor/assets/stylesheets/furatto/_forms.scss +269 -0
- data/vendor/assets/stylesheets/furatto/_functions.scss +18 -0
- data/vendor/assets/stylesheets/furatto/_global.scss +51 -0
- data/vendor/assets/stylesheets/furatto/_grid.scss +142 -0
- data/vendor/assets/stylesheets/furatto/_images.scss +122 -0
- data/vendor/assets/stylesheets/furatto/_labels.scss +97 -0
- data/vendor/assets/stylesheets/furatto/_media_queries.scss +200 -0
- data/vendor/assets/stylesheets/furatto/_mixins.scss +143 -0
- data/vendor/assets/stylesheets/furatto/_modal.scss +297 -0
- data/vendor/assets/stylesheets/furatto/_navigation.scss +127 -0
- data/vendor/assets/stylesheets/furatto/_navigation_bar.scss +338 -0
- data/vendor/assets/stylesheets/furatto/_off_screen.scss +269 -0
- data/vendor/assets/stylesheets/furatto/_pagination.scss +78 -0
- data/vendor/assets/stylesheets/furatto/_responsive_utilities.scss +244 -0
- data/vendor/assets/stylesheets/furatto/_selectors.scss +44 -0
- data/vendor/assets/stylesheets/furatto/_settings.scss +0 -0
- data/vendor/assets/stylesheets/furatto/_suraido.scss +214 -0
- data/vendor/assets/stylesheets/furatto/_tables.scss +166 -0
- data/vendor/assets/stylesheets/furatto/_tabs.scss +26 -0
- data/vendor/assets/stylesheets/furatto/_toolbars.scss +199 -0
- data/vendor/assets/stylesheets/furatto/_tooltips.scss +92 -0
- data/vendor/assets/stylesheets/furatto/_typography.scss +243 -0
- data/{app → vendor}/assets/stylesheets/normalize.scss +22 -19
- metadata +86 -49
- data/app/assets/fonts/fontawesome/FontAwesome.otf +0 -0
- data/app/assets/fonts/fontawesome/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome/fontawesome-webfont.svg +0 -399
- data/app/assets/fonts/fontawesome/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome/fontawesome-webfont.woff +0 -0
- data/app/assets/fonts/meteocons-webfont.eot +0 -0
- data/app/assets/fonts/meteocons-webfont.svg +0 -81
- data/app/assets/fonts/meteocons-webfont.ttf +0 -0
- data/app/assets/fonts/meteocons-webfont.woff +0 -0
- data/app/assets/javascripts/furatto.js +0 -5978
- data/app/assets/javascripts/furatto.min.js +0 -3
- data/app/assets/stylesheets/font-awesome.css.erb +0 -2495
- data/app/assets/stylesheets/furatto.scss +0 -86
- data/app/assets/stylesheets/furatto/_alerts.scss +0 -80
- data/app/assets/stylesheets/furatto/_base.scss +0 -99
- data/app/assets/stylesheets/furatto/_buttons.scss +0 -125
- data/app/assets/stylesheets/furatto/_code.scss +0 -67
- data/app/assets/stylesheets/furatto/_dashboard.scss +0 -36
- data/app/assets/stylesheets/furatto/_fonts.scss +0 -26
- data/app/assets/stylesheets/furatto/_forms.scss +0 -307
- data/app/assets/stylesheets/furatto/_grid.scss +0 -60
- data/app/assets/stylesheets/furatto/_images.scss +0 -64
- data/app/assets/stylesheets/furatto/_labels.scss +0 -44
- data/app/assets/stylesheets/furatto/_mixins.scss +0 -200
- data/app/assets/stylesheets/furatto/_modal.scss +0 -365
- data/app/assets/stylesheets/furatto/_nav.scss +0 -104
- data/app/assets/stylesheets/furatto/_navbar.scss +0 -216
- data/app/assets/stylesheets/furatto/_panel.scss +0 -277
- data/app/assets/stylesheets/furatto/_responsive_navbar.scss +0 -195
- data/app/assets/stylesheets/furatto/_responsive_tables.scss +0 -28
- data/app/assets/stylesheets/furatto/_responsive_utilities.scss +0 -182
- data/app/assets/stylesheets/furatto/_responsiveslides.scss +0 -185
- data/app/assets/stylesheets/furatto/_tables.scss +0 -90
- data/app/assets/stylesheets/furatto/_toolbars.scss +0 -116
- data/app/assets/stylesheets/furatto/_tooltips.scss +0 -131
- data/app/assets/stylesheets/furatto/_typography.scss +0 -224
- data/app/assets/stylesheets/furatto/_variables.scss +0 -625
@@ -0,0 +1,76 @@
|
|
1
|
+
//Make sure the charset is set correctly
|
2
|
+
@charset "UTF-8";
|
3
|
+
|
4
|
+
//Compass Utilities
|
5
|
+
@import "compass/css3";
|
6
|
+
|
7
|
+
// Global settings
|
8
|
+
@import "furatto/global";
|
9
|
+
|
10
|
+
//Helpers
|
11
|
+
@import "furatto/mixins";
|
12
|
+
@import "furatto/selectors";
|
13
|
+
@import "furatto/media_queries";
|
14
|
+
|
15
|
+
//General css for layout
|
16
|
+
@import 'furatto/base';
|
17
|
+
|
18
|
+
//Buttons
|
19
|
+
@import 'furatto/buttons';
|
20
|
+
|
21
|
+
//Button groups
|
22
|
+
@import 'furatto/button-groups';
|
23
|
+
|
24
|
+
//Labels
|
25
|
+
@import 'furatto/labels';
|
26
|
+
|
27
|
+
//Alerts
|
28
|
+
@import 'furatto/alerts';
|
29
|
+
|
30
|
+
//Navs
|
31
|
+
@import 'furatto/navigation';
|
32
|
+
|
33
|
+
//Forms
|
34
|
+
@import 'furatto/forms';
|
35
|
+
|
36
|
+
//Images
|
37
|
+
@import 'furatto/images';
|
38
|
+
|
39
|
+
//Off screen
|
40
|
+
@import 'furatto/off_screen';
|
41
|
+
|
42
|
+
//Navbar
|
43
|
+
@import 'furatto/navigation_bar';
|
44
|
+
|
45
|
+
//Base
|
46
|
+
@import 'furatto/typography';
|
47
|
+
|
48
|
+
//Grid
|
49
|
+
@import 'furatto/grid';
|
50
|
+
|
51
|
+
//Tables
|
52
|
+
@import 'furatto/tables';
|
53
|
+
|
54
|
+
//Responsive utilities
|
55
|
+
@import 'furatto/responsive_utilities';
|
56
|
+
|
57
|
+
//Modal
|
58
|
+
@import 'furatto/modal';
|
59
|
+
|
60
|
+
//Tooltips
|
61
|
+
@import 'furatto/tooltips';
|
62
|
+
|
63
|
+
//Pagination
|
64
|
+
@import 'furatto/pagination';
|
65
|
+
|
66
|
+
/*//Toolbar*/
|
67
|
+
@import 'furatto/toolbars';
|
68
|
+
|
69
|
+
//Slider
|
70
|
+
@import 'furatto/suraido';
|
71
|
+
|
72
|
+
//Tabs
|
73
|
+
@import 'furatto/tabs';
|
74
|
+
|
75
|
+
//Experimental
|
76
|
+
@import 'furatto/experimental';
|
@@ -0,0 +1,130 @@
|
|
1
|
+
//Alerts
|
2
|
+
|
3
|
+
//
|
4
|
+
//@variables
|
5
|
+
//
|
6
|
+
|
7
|
+
//General settings
|
8
|
+
$alert-padding: px-to-rems(9) px-to-rems(40) px-to-rems(9) px-to-rems(16) !default;
|
9
|
+
$alert-margin-bottom: px-to-rems(20) !default;
|
10
|
+
$alert-font-size: px-to-rems(13) !default;
|
11
|
+
$alert-font-weight: normal !default;
|
12
|
+
$alert-default-background: #e67e22 !default;
|
13
|
+
|
14
|
+
//Close settings
|
15
|
+
$alert-close-font-size: px-to-rems(16) !default;
|
16
|
+
$alert-close-opacity: 0.3 !default;
|
17
|
+
$alert-close-hover-opacity: 0.5 !default;
|
18
|
+
$alert-close-padding: px-to-rems(5) !default;
|
19
|
+
$alert-close-color: #333 !default;
|
20
|
+
|
21
|
+
//Variations
|
22
|
+
$alert-radius: px-to-rems(3) !default;
|
23
|
+
$alert-round: px-to-rems(1000) !default;
|
24
|
+
|
25
|
+
//Alert styles
|
26
|
+
$alert-border-width: px-to-rems(1) !default;
|
27
|
+
$alert-border-style: solid !default;
|
28
|
+
|
29
|
+
//Background variations
|
30
|
+
$alert-primary-background: #3498db !default;
|
31
|
+
$alert-success-background: #2ecc71 !default;
|
32
|
+
$alert-danger-background: #e74c3c !default;
|
33
|
+
|
34
|
+
//
|
35
|
+
//@mixin
|
36
|
+
// We use this mixin as to describe the alerts base
|
37
|
+
//
|
38
|
+
|
39
|
+
@mixin alert-base {
|
40
|
+
display: block;
|
41
|
+
padding: $alert-padding;
|
42
|
+
margin-bottom: $alert-margin-bottom;
|
43
|
+
font-size: $alert-font-size;
|
44
|
+
font-weight: $alert-font-weight;
|
45
|
+
position: relative;
|
46
|
+
|
47
|
+
&.radius {
|
48
|
+
@include border-radius($alert-radius);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
//
|
54
|
+
//@mixin
|
55
|
+
// We use this to create the different styles of alerts
|
56
|
+
// $background-color - The color for the alert background. Default: $alert-default-background
|
57
|
+
//
|
58
|
+
|
59
|
+
@mixin alert-style($background-color: $alert-default-background) {
|
60
|
+
background: lighten($background-color, 25%);
|
61
|
+
color: darken($background-color, 10%);
|
62
|
+
border: $alert-border-width $alert-border-style lighten($background-color, 20%);
|
63
|
+
|
64
|
+
.close {
|
65
|
+
color: darken($background-color, 15%);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
//
|
70
|
+
//@mixin
|
71
|
+
// We use this to create the close link of alerts
|
72
|
+
//
|
73
|
+
|
74
|
+
@mixin alert-close {
|
75
|
+
line-height: 0;
|
76
|
+
padding: $alert-close-padding;
|
77
|
+
border: none;
|
78
|
+
background: none;
|
79
|
+
font-size: $alert-close-font-size;
|
80
|
+
cursor: pointer;
|
81
|
+
color: $alert-close-color;
|
82
|
+
position: absolute;
|
83
|
+
top: 50%;
|
84
|
+
right: 0.2rem;
|
85
|
+
margin-top: -($alert-font-size / 2);
|
86
|
+
text-decoration: none;
|
87
|
+
@include opacity($alert-close-opacity);
|
88
|
+
|
89
|
+
&:hover, &:focus {
|
90
|
+
@include opacity($alert-close-hover-opacity);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
|
95
|
+
//
|
96
|
+
//@mixin
|
97
|
+
// We use this to create custom alerts
|
98
|
+
// $background-color - The color for the alert background. Default: $alert-default-background
|
99
|
+
// $include-radius - Wheter or not to include radius variant. Default: true
|
100
|
+
// $include-round - Wheter or not to include rounded variant. Default: true
|
101
|
+
//
|
102
|
+
|
103
|
+
@mixin alert($background-color: $alert-default-background, $include-radius: true, $include-round: true) {
|
104
|
+
@include alert-base;
|
105
|
+
@include alert-style($background-color);
|
106
|
+
|
107
|
+
.close { @include alert-close; }
|
108
|
+
@if $include-radius {
|
109
|
+
&.radius { @include border-radius($alert-radius); }
|
110
|
+
}
|
111
|
+
|
112
|
+
@if $include-round {
|
113
|
+
&.round { @include border-radius($alert-round) }
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
//Alert description
|
118
|
+
.alert {
|
119
|
+
@include alert-base;
|
120
|
+
@include alert-style;
|
121
|
+
|
122
|
+
.close { @include alert-close; }
|
123
|
+
|
124
|
+
&.round { @include border-radius($alert-round) }
|
125
|
+
&.radius { @include border-radius($alert-radius); }
|
126
|
+
|
127
|
+
&.primary{ @include alert-style($alert-primary-background); }
|
128
|
+
&.success { @include alert-style($alert-success-background); }
|
129
|
+
&.danger { @include alert-style($alert-danger-background); }
|
130
|
+
}
|
@@ -0,0 +1,138 @@
|
|
1
|
+
//Base
|
2
|
+
|
3
|
+
//
|
4
|
+
//@variables
|
5
|
+
//
|
6
|
+
|
7
|
+
$body-background-color: #FFF !default;
|
8
|
+
$base-font-color: #333 !default;
|
9
|
+
$base-link-color: #0088cc !default;
|
10
|
+
$base-font-weight: normal !default;
|
11
|
+
$base-font-size: px-to-rems(16) !default;
|
12
|
+
$base-font-family: 'Open Sans', 'Helvetica Neue' !default;
|
13
|
+
$base-line-height: 1 !default;
|
14
|
+
|
15
|
+
//Text variations
|
16
|
+
$muted-text-color: #666666 !default;
|
17
|
+
$error-text-color: #c0392b !default;
|
18
|
+
$success-text-color: #27ae60 !default;
|
19
|
+
|
20
|
+
//Reset settings
|
21
|
+
*,
|
22
|
+
*:after,
|
23
|
+
*:before {
|
24
|
+
@include box-sizing(border-box);
|
25
|
+
}
|
26
|
+
|
27
|
+
html, body, .off-screen {
|
28
|
+
-webkit-overflow-scrolling: touch;
|
29
|
+
}
|
30
|
+
|
31
|
+
html {
|
32
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
33
|
+
}
|
34
|
+
|
35
|
+
html, body {
|
36
|
+
overflow-x: hidden;
|
37
|
+
height: 100%;
|
38
|
+
font-size: $base-font-size;
|
39
|
+
font-weight: $base-font-weight;
|
40
|
+
@include hyphens(auto);
|
41
|
+
}
|
42
|
+
|
43
|
+
abbr,
|
44
|
+
acronym,
|
45
|
+
blockquote,
|
46
|
+
code,
|
47
|
+
dir,
|
48
|
+
kbd,
|
49
|
+
listing,
|
50
|
+
plaintext,
|
51
|
+
q,
|
52
|
+
samp,
|
53
|
+
tt,
|
54
|
+
var,
|
55
|
+
xmp {
|
56
|
+
@include hyphens(none);
|
57
|
+
}
|
58
|
+
|
59
|
+
body {
|
60
|
+
background: $body-background-color;
|
61
|
+
color: $base-font-color;
|
62
|
+
padding: 0;
|
63
|
+
margin: 0;
|
64
|
+
font-family: $base-font-family;
|
65
|
+
line-height: $base-line-height;
|
66
|
+
}
|
67
|
+
|
68
|
+
img,
|
69
|
+
embed,
|
70
|
+
object {
|
71
|
+
max-width: 100%;
|
72
|
+
height: auto;
|
73
|
+
}
|
74
|
+
|
75
|
+
img,
|
76
|
+
object {
|
77
|
+
height: 100%;
|
78
|
+
}
|
79
|
+
|
80
|
+
|
81
|
+
//Helpful classes
|
82
|
+
.clearfix {
|
83
|
+
@extend %clearfix;
|
84
|
+
}
|
85
|
+
|
86
|
+
.hidden {
|
87
|
+
display: none;
|
88
|
+
}
|
89
|
+
|
90
|
+
.pull-right {
|
91
|
+
float: right;
|
92
|
+
}
|
93
|
+
|
94
|
+
.pull-left {
|
95
|
+
float: left;
|
96
|
+
}
|
97
|
+
|
98
|
+
//Text color variations
|
99
|
+
.text-muted {
|
100
|
+
color: $muted-text-color;
|
101
|
+
}
|
102
|
+
|
103
|
+
.text-error {
|
104
|
+
color: $error-text-color;
|
105
|
+
}
|
106
|
+
|
107
|
+
.text-success {
|
108
|
+
color: $success-text-color;
|
109
|
+
}
|
110
|
+
|
111
|
+
.text-right {
|
112
|
+
text-align: right;
|
113
|
+
}
|
114
|
+
|
115
|
+
.text-center {
|
116
|
+
text-align: center;
|
117
|
+
}
|
118
|
+
|
119
|
+
.text-justify {
|
120
|
+
text-align: justify;
|
121
|
+
}
|
122
|
+
|
123
|
+
//Text variations
|
124
|
+
.text-uppercase {
|
125
|
+
text-transform: uppercase;
|
126
|
+
}
|
127
|
+
|
128
|
+
//Content alignment
|
129
|
+
.vertical-align {
|
130
|
+
//The parent container must have height
|
131
|
+
@extend %vertical-alignment;
|
132
|
+
}
|
133
|
+
|
134
|
+
//Remove padding
|
135
|
+
[class*="col-"].nopadding,
|
136
|
+
.nopadding {
|
137
|
+
padding: 0;
|
138
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
//Button groups
|
2
|
+
|
3
|
+
//
|
4
|
+
//@variables
|
5
|
+
//
|
6
|
+
|
7
|
+
$sm-device-width: 480px !default;
|
8
|
+
|
9
|
+
//Media queries
|
10
|
+
$button-group-small-media-query: "#{$media-display} and (max-width: #{$sm-device-width})" !default;
|
11
|
+
|
12
|
+
//Variations
|
13
|
+
$button-radius: px-to-rems(3) !default;
|
14
|
+
$button-pill-radius: px-to-rems(1000) !default;
|
15
|
+
|
16
|
+
.button-group {
|
17
|
+
list-style: none;
|
18
|
+
margin: 0;
|
19
|
+
@extend %clearfix;
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
li {
|
24
|
+
float: left;
|
25
|
+
|
26
|
+
.button,
|
27
|
+
button {
|
28
|
+
[class*="icon-"] {
|
29
|
+
margin-right: 0px;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
&:first-child {
|
34
|
+
.button,
|
35
|
+
button {
|
36
|
+
border-right-width: 0;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
&:last-child {
|
41
|
+
.button,
|
42
|
+
button {
|
43
|
+
border-left-width: 0;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
&.pill {
|
49
|
+
li:first-child .button {
|
50
|
+
@include border-top-left-radius($button-pill-radius);
|
51
|
+
@include border-bottom-left-radius($button-pill-radius);
|
52
|
+
}
|
53
|
+
|
54
|
+
li:last-child .button {
|
55
|
+
@include border-top-right-radius($button-pill-radius);
|
56
|
+
@include border-bottom-right-radius($button-pill-radius);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
&.radius {
|
61
|
+
li:first-child .button {
|
62
|
+
@include border-top-left-radius($button-radius);
|
63
|
+
@include border-bottom-left-radius($button-radius);
|
64
|
+
}
|
65
|
+
|
66
|
+
li:last-child .button {
|
67
|
+
@include border-top-right-radius($button-radius);
|
68
|
+
@include border-bottom-right-radius($button-radius);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
@media #{$button-group-small-media-query} {
|
74
|
+
.button-group {
|
75
|
+
li {
|
76
|
+
float: none;
|
77
|
+
display: block;
|
78
|
+
|
79
|
+
.button,
|
80
|
+
button {
|
81
|
+
display: block;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
@@ -0,0 +1,266 @@
|
|
1
|
+
//Buttons
|
2
|
+
|
3
|
+
//
|
4
|
+
//@variables
|
5
|
+
//
|
6
|
+
@import "functions";
|
7
|
+
|
8
|
+
//Padding sizes for buttons
|
9
|
+
$button-default: px-to-rems(4) px-to-rems(13) !default;
|
10
|
+
$button-mini: 0 px-to-rems(6) !default;
|
11
|
+
$button-small: px-to-rems(2) px-to-rems(11) !default;
|
12
|
+
$button-large: px-to-rems(12) px-to-rems(21) !default;
|
13
|
+
$button-xlarge: px-to-rems(22) px-to-rems(34) !default;
|
14
|
+
$button-xxlarge: px-to-rems(22.72) px-to-rems(22) px-to-rems(57) !default;
|
15
|
+
|
16
|
+
//Buttons style
|
17
|
+
$button-display: inline-block !default;
|
18
|
+
$button-border-width: 1px !default;
|
19
|
+
$button-border-style: solid !default;
|
20
|
+
$button-default-background-color: #2E323E !default;
|
21
|
+
|
22
|
+
//Buttons general styles
|
23
|
+
$button-font-family: $base-font-family !default;
|
24
|
+
$button-font-color: #FFF !default;
|
25
|
+
$button-font-weight: 300 !default;
|
26
|
+
$button-font-default: px-to-rems(14) !default;
|
27
|
+
$button-font-mini: px-to-rems(11) !default;
|
28
|
+
$button-font-small: px-to-rems(12) !default;
|
29
|
+
$button-font-large: px-to-rems(16) !default;
|
30
|
+
$button-font-xlarge: px-to-rems(22) !default;
|
31
|
+
$button-font-xxlarge: px-to-rems(22) !default;
|
32
|
+
$button-vertical-separation: px-to-rems(5) !default;
|
33
|
+
|
34
|
+
//Buttons variations
|
35
|
+
$button-radius: px-to-rems(3) !default;
|
36
|
+
$button-alpha-border: 1px solid #FFF !default;
|
37
|
+
$button-alpha-color: #FFF !default;
|
38
|
+
$button-3d-border-width: px-to-rems(3) !default;
|
39
|
+
$button-pill-radius: px-to-rems(1000) !default;
|
40
|
+
$button-disabled-opacity: 0.65 !default;
|
41
|
+
|
42
|
+
//Icons
|
43
|
+
$button-icon-separation: 5px !default;
|
44
|
+
|
45
|
+
//Background variations
|
46
|
+
$button-primary-background: #3498db !default;
|
47
|
+
$button-success-background: #2ecc71 !default;
|
48
|
+
$button-danger-background: #e74c3c !default;
|
49
|
+
$button-warning-background: #e67e22 !default;
|
50
|
+
|
51
|
+
//Media queries
|
52
|
+
$button-block-media-query-width: px-to-rems(480) !default;
|
53
|
+
|
54
|
+
//
|
55
|
+
//@mixin
|
56
|
+
//
|
57
|
+
// We use this mixin to create a default button base style
|
58
|
+
//
|
59
|
+
|
60
|
+
@mixin button-base {
|
61
|
+
display: $button-display;
|
62
|
+
*display: inline;
|
63
|
+
line-height: normal;
|
64
|
+
font-weight: $button-font-weight;
|
65
|
+
text-align: center;
|
66
|
+
cursor: pointer;
|
67
|
+
text-decoration: none;
|
68
|
+
margin: 5px 0;
|
69
|
+
outline: none;
|
70
|
+
color: $button-font-color;
|
71
|
+
vertical-align: middle;
|
72
|
+
@include single-transition(all, 0.2s, ease-in-out);
|
73
|
+
position: relative;
|
74
|
+
|
75
|
+
.fa {
|
76
|
+
margin-right: $button-icon-separation;
|
77
|
+
margin-left: $button-icon-separation;
|
78
|
+
}
|
79
|
+
|
80
|
+
&:hover {
|
81
|
+
text-decoration: none;
|
82
|
+
}
|
83
|
+
|
84
|
+
&.alpha {
|
85
|
+
color: $button-alpha-color;
|
86
|
+
border: $button-alpha-border;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
//
|
91
|
+
//@mixin
|
92
|
+
//
|
93
|
+
// We use this mixin to add style to buttons and their states
|
94
|
+
//
|
95
|
+
// $background-color - Is the background color for the button to create
|
96
|
+
|
97
|
+
@mixin button-style($background-color: $button-default-background-color) {
|
98
|
+
|
99
|
+
background-color: $background-color;
|
100
|
+
border: $button-border-width $button-border-style darken($background-color, 5%);
|
101
|
+
|
102
|
+
&:hover, &:focus {
|
103
|
+
background: darken($background-color, 3%);
|
104
|
+
}
|
105
|
+
|
106
|
+
&.disabled, &[disabled] {
|
107
|
+
cursor: no-drop;
|
108
|
+
@include opacity($button-disabled-opacity);
|
109
|
+
}
|
110
|
+
|
111
|
+
&.active, &:active {
|
112
|
+
outline: 0;
|
113
|
+
}
|
114
|
+
|
115
|
+
&.alpha {
|
116
|
+
border: 1px solid $background-color;
|
117
|
+
background: rgba(0,0,0,0);
|
118
|
+
color: $background-color;
|
119
|
+
|
120
|
+
&:hover {
|
121
|
+
color: #FFF;
|
122
|
+
background: $background-color;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
&.inverse {
|
127
|
+
background: #FFF;
|
128
|
+
color: $background-color;
|
129
|
+
|
130
|
+
&:hover {
|
131
|
+
background: $background-color;
|
132
|
+
color: #FFF;
|
133
|
+
border: 1px solid #FFF;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
&.three-d {
|
138
|
+
border-bottom: $button-3d-border-width solid darken($background-color, 15%);
|
139
|
+
@include single-transition(all, 0.1s, ease-in-out);
|
140
|
+
|
141
|
+
&:hover {
|
142
|
+
border-bottom: ($button-3d-border-width - 0.1) solid darken($background-color, 10%);
|
143
|
+
top: 1px;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
//
|
149
|
+
//@mixin
|
150
|
+
//
|
151
|
+
// We use this mixin to set the button size
|
152
|
+
// $padding - The padding to give to the button. Default: $button-default
|
153
|
+
// $font-size - The font size for the button. Default: $button-font-default
|
154
|
+
//
|
155
|
+
|
156
|
+
@mixin button-size($padding: $button-default, $font-size: $button-font-default) {
|
157
|
+
padding: $padding;
|
158
|
+
font-size: $font-size;
|
159
|
+
}
|
160
|
+
|
161
|
+
//
|
162
|
+
//@mixin
|
163
|
+
//
|
164
|
+
// We use this mixin to let the user create custom buttons
|
165
|
+
// $background-color - Is the background color for the button to create. Default: $button-default-background-color
|
166
|
+
// $padding - The padding to give to the button. Default: $button-default
|
167
|
+
// $font-size - The font size for the button. Default: $button-font-default
|
168
|
+
// $include-radius-style - Wheter or not to add the radius style on the custom button
|
169
|
+
// $include-block-style - Wheter or not to add the block size style on the custom button
|
170
|
+
// $include-pill-style - Wheter or not to add the pill style on the custom button
|
171
|
+
// Example .custom-button { @include button($background-color: #1abc9c); }
|
172
|
+
//
|
173
|
+
|
174
|
+
@mixin button($background-color: $button-default-background-color,
|
175
|
+
$padding: $button-default,
|
176
|
+
$font-size: $button-font-default,
|
177
|
+
$include-radius-style: true,
|
178
|
+
$include-block-style: true,
|
179
|
+
$include-pill-style: true) {
|
180
|
+
@include button-base;
|
181
|
+
@include button-style($background-color);
|
182
|
+
@include button-size($padding, $font-size);
|
183
|
+
|
184
|
+
@if $include-radius-style {
|
185
|
+
&.radius {
|
186
|
+
@include border-radius($button-radius);
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
@if $include-block-style {
|
191
|
+
&.block {
|
192
|
+
display: block;
|
193
|
+
width: 100%;
|
194
|
+
padding-left: 0px;
|
195
|
+
padding-right: 0px;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
@if $include-pill-style {
|
200
|
+
&.pill {
|
201
|
+
@include border-radius($button-pill-radius);
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
205
|
+
@media (max-width: $button-block-media-query-width) {
|
206
|
+
& {
|
207
|
+
display: block;
|
208
|
+
width: 100%;
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
//Button style definition
|
214
|
+
button, .button {
|
215
|
+
@include button-base;
|
216
|
+
@include button-style;
|
217
|
+
@include button-size;
|
218
|
+
|
219
|
+
//Button sizes
|
220
|
+
//
|
221
|
+
//Default size
|
222
|
+
padding: $button-default;
|
223
|
+
font-size: $button-font-default;
|
224
|
+
|
225
|
+
//Custom sizes
|
226
|
+
&.large { @include button-size($padding: $button-large, $font-size: $button-font-large); }
|
227
|
+
&.xlarge { @include button-size($padding: $button-xlarge, $font-size: $button-font-xlarge); }
|
228
|
+
&.xxlarge { @include button-size($padding: $button-xxlarge, $font-size: $button-font-xxlarge); }
|
229
|
+
&.small { @include button-size($padding: $button-small, $font-size: $button-font-small); }
|
230
|
+
&.mini { @include button-size($padding: $button-mini, $font-size: $button-font-mini); }
|
231
|
+
|
232
|
+
&.block {
|
233
|
+
display: block;
|
234
|
+
width: 100%;
|
235
|
+
padding-left: 0px;
|
236
|
+
padding-right: 0px;
|
237
|
+
}
|
238
|
+
|
239
|
+
//Button styles
|
240
|
+
&.primary { @include button-style($button-primary-background); }
|
241
|
+
&.success { @include button-style($button-success-background); }
|
242
|
+
&.danger { @include button-style($button-danger-background); }
|
243
|
+
&.warning { @include button-style($button-warning-background); }
|
244
|
+
|
245
|
+
&.radius {
|
246
|
+
@include border-radius($button-radius);
|
247
|
+
}
|
248
|
+
|
249
|
+
&.pill {
|
250
|
+
@include border-radius($button-pill-radius);
|
251
|
+
}
|
252
|
+
|
253
|
+
/* Vertical separation */
|
254
|
+
/*----------------------*/
|
255
|
+
&.block + &.block {
|
256
|
+
margin-top: $button-vertical-separation;
|
257
|
+
}
|
258
|
+
|
259
|
+
@media (max-width: $button-block-media-query-width) {
|
260
|
+
& {
|
261
|
+
display: block;
|
262
|
+
width: 100%;
|
263
|
+
}
|
264
|
+
}
|
265
|
+
}
|
266
|
+
|