locomotivecms_wagon 2.0.0.rc3 → 2.0.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/generators/blank/Gemfile.tt +8 -5
- data/generators/blank/Guardfile +22 -0
- data/generators/bootstrap/Gemfile.tt +7 -4
- data/generators/bootstrap/Guardfile +22 -0
- data/generators/bootstrap/public/stylesheets/bootstrap.css +1 -1
- data/generators/bootstrap/public/stylesheets/bootstrap.scss +1 -1
- data/generators/cloned/Gemfile.tt +7 -4
- data/generators/cloned/Guardfile +22 -0
- data/generators/foundation5/Gemfile.tt +7 -4
- data/generators/foundation5/Guardfile +22 -0
- data/lib/locomotive/wagon/cli.rb +1 -1
- data/lib/locomotive/wagon/commands/pull_sub_commands/concerns/assets_concern.rb +1 -1
- data/lib/locomotive/wagon/commands/push_sub_commands/push_theme_assets_command.rb +23 -3
- data/lib/locomotive/wagon/commands/serve_command.rb +2 -2
- data/lib/locomotive/wagon/version.rb +1 -1
- data/locomotivecms_wagon.gemspec +4 -3
- data/spec/fixtures/cassettes/authenticate.yml +27 -27
- data/spec/fixtures/cassettes/push.yml +1036 -1110
- data/spec/unit/commands/pull_sub_commands/concerns/assets_concern_spec.rb +24 -4
- data/spec/unit/commands/push_sub_commands/push_theme_assets_command_spec.rb +42 -0
- metadata +28 -99
- data/generators/foundation5/favicon.ico +0 -0
- data/generators/line_case/Gemfile.tt +0 -21
- data/generators/line_case/app/content_types/categories.yml +0 -56
- data/generators/line_case/app/content_types/emails.yml +0 -35
- data/generators/line_case/app/content_types/projects.yml +0 -58
- data/generators/line_case/app/views/pages/404.liquid.haml +0 -11
- data/generators/line_case/app/views/pages/email-registered.liquid.haml +0 -13
- data/generators/line_case/app/views/pages/index.liquid.haml +0 -110
- data/generators/line_case/app/views/pages/projects/content_type_template.liquid.haml +0 -32
- data/generators/line_case/app/views/snippets/newsletter_form.liquid.haml +0 -14
- data/generators/line_case/app/views/snippets/projects.liquid.haml +0 -17
- data/generators/line_case/app/views/snippets/social_links.liquid.haml +0 -19
- data/generators/line_case/config/deploy.yml +0 -15
- data/generators/line_case/config/site.yml.tt +0 -33
- data/generators/line_case/config/translations.yml +0 -8
- data/generators/line_case/data/categories.yml +0 -8
- data/generators/line_case/data/emails.yml +0 -2
- data/generators/line_case/data/projects.yml +0 -39
- data/generators/line_case/icon.png +0 -0
- data/generators/line_case/public/images/banner-header.png +0 -0
- data/generators/line_case/public/javascripts/foundation.min.js +0 -15
- data/generators/line_case/public/javascripts/foundation/foundation.abide.js +0 -194
- data/generators/line_case/public/javascripts/foundation/foundation.alerts.js +0 -57
- data/generators/line_case/public/javascripts/foundation/foundation.clearing.js +0 -516
- data/generators/line_case/public/javascripts/foundation/foundation.cookie.js +0 -74
- data/generators/line_case/public/javascripts/foundation/foundation.dropdown.js +0 -183
- data/generators/line_case/public/javascripts/foundation/foundation.forms.js +0 -556
- data/generators/line_case/public/javascripts/foundation/foundation.interchange.js +0 -280
- data/generators/line_case/public/javascripts/foundation/foundation.joyride.js +0 -852
- data/generators/line_case/public/javascripts/foundation/foundation.js +0 -464
- data/generators/line_case/public/javascripts/foundation/foundation.magellan.js +0 -136
- data/generators/line_case/public/javascripts/foundation/foundation.orbit.js +0 -432
- data/generators/line_case/public/javascripts/foundation/foundation.placeholder.js +0 -426
- data/generators/line_case/public/javascripts/foundation/foundation.reveal.js +0 -353
- data/generators/line_case/public/javascripts/foundation/foundation.section.js +0 -430
- data/generators/line_case/public/javascripts/foundation/foundation.tooltips.js +0 -209
- data/generators/line_case/public/javascripts/foundation/foundation.topbar.js +0 -370
- data/generators/line_case/public/javascripts/vendor/custom.modernizr.js +0 -4
- data/generators/line_case/public/javascripts/vendor/jquery.js +0 -9789
- data/generators/line_case/public/javascripts/vendor/zepto.js +0 -2000
- data/generators/line_case/public/samples/projects/sample.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample2.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample3.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample4.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample5.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample6.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample7.jpeg +0 -0
- data/generators/line_case/public/samples/projects/sample8.jpeg +0 -0
- data/generators/line_case/public/stylesheets/_variables.css.sass +0 -20
- data/generators/line_case/public/stylesheets/foundation.css.scss +0 -43
- data/generators/line_case/public/stylesheets/foundation.min.css +0 -1
- data/generators/line_case/public/stylesheets/foundation/_variables.scss +0 -1290
- data/generators/line_case/public/stylesheets/foundation/components/_alert-boxes.scss +0 -107
- data/generators/line_case/public/stylesheets/foundation/components/_block-grid.scss +0 -71
- data/generators/line_case/public/stylesheets/foundation/components/_breadcrumbs.scss +0 -124
- data/generators/line_case/public/stylesheets/foundation/components/_button-groups.scss +0 -89
- data/generators/line_case/public/stylesheets/foundation/components/_buttons.scss +0 -230
- data/generators/line_case/public/stylesheets/foundation/components/_clearing.scss +0 -227
- data/generators/line_case/public/stylesheets/foundation/components/_custom-forms.scss +0 -278
- data/generators/line_case/public/stylesheets/foundation/components/_dropdown-buttons.scss +0 -115
- data/generators/line_case/public/stylesheets/foundation/components/_dropdown.scss +0 -151
- data/generators/line_case/public/stylesheets/foundation/components/_flex-video.scss +0 -46
- data/generators/line_case/public/stylesheets/foundation/components/_forms.scss +0 -411
- data/generators/line_case/public/stylesheets/foundation/components/_global.scss +0 -366
- data/generators/line_case/public/stylesheets/foundation/components/_grid-5.scss +0 -214
- data/generators/line_case/public/stylesheets/foundation/components/_grid.scss +0 -188
- data/generators/line_case/public/stylesheets/foundation/components/_inline-lists.scss +0 -53
- data/generators/line_case/public/stylesheets/foundation/components/_joyride.scss +0 -217
- data/generators/line_case/public/stylesheets/foundation/components/_keystrokes.scss +0 -57
- data/generators/line_case/public/stylesheets/foundation/components/_labels.scss +0 -85
- data/generators/line_case/public/stylesheets/foundation/components/_magellan.scss +0 -23
- data/generators/line_case/public/stylesheets/foundation/components/_orbit.scss +0 -340
- data/generators/line_case/public/stylesheets/foundation/components/_pagination.scss +0 -140
- data/generators/line_case/public/stylesheets/foundation/components/_panels.scss +0 -83
- data/generators/line_case/public/stylesheets/foundation/components/_pricing-tables.scss +0 -131
- data/generators/line_case/public/stylesheets/foundation/components/_progress-bars.scss +0 -71
- data/generators/line_case/public/stylesheets/foundation/components/_reveal.scss +0 -136
- data/generators/line_case/public/stylesheets/foundation/components/_section.scss +0 -391
- data/generators/line_case/public/stylesheets/foundation/components/_side-nav.scss +0 -69
- data/generators/line_case/public/stylesheets/foundation/components/_split-buttons.scss +0 -167
- data/generators/line_case/public/stylesheets/foundation/components/_sub-nav.scss +0 -84
- data/generators/line_case/public/stylesheets/foundation/components/_switch.scss +0 -266
- data/generators/line_case/public/stylesheets/foundation/components/_tables.scss +0 -84
- data/generators/line_case/public/stylesheets/foundation/components/_thumbs.scss +0 -53
- data/generators/line_case/public/stylesheets/foundation/components/_tooltips.scss +0 -117
- data/generators/line_case/public/stylesheets/foundation/components/_top-bar.scss +0 -576
- data/generators/line_case/public/stylesheets/foundation/components/_type.scss +0 -435
- data/generators/line_case/public/stylesheets/foundation/components/_visibility.scss +0 -322
- data/generators/line_case/public/stylesheets/normalize.css.scss +0 -410
- data/generators/line_case/public/stylesheets/pages.css.sass +0 -163
- data/lib/locomotive/wagon/tools/livereload.rb +0 -45
@@ -1,107 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Alert Box Variables
|
3
|
-
//
|
4
|
-
$include-html-alert-classes: $include-html-classes !default;
|
5
|
-
|
6
|
-
// We use this to control alert padding.
|
7
|
-
$alert-padding-top: em-calc(11) !default;
|
8
|
-
$alert-padding-default-float: $alert-padding-top !default;
|
9
|
-
$alert-padding-opposite-direction: $alert-padding-top + em-calc(10) !default;
|
10
|
-
$alert-padding-bottom: $alert-padding-top + em-calc(1) !default;
|
11
|
-
|
12
|
-
// We use these to control text style.
|
13
|
-
$alert-font-weight: bold !default;
|
14
|
-
$alert-font-size: em-calc(14) !default;
|
15
|
-
$alert-font-color: #fff !default;
|
16
|
-
$alert-font-color-alt: darken($secondary-color, 60%) !default;
|
17
|
-
|
18
|
-
// We use this for close hover effect.
|
19
|
-
$alert-function-factor: 10% !default;
|
20
|
-
|
21
|
-
// We use these to control border styles.
|
22
|
-
$alert-border-style: solid !default;
|
23
|
-
$alert-border-width: 1px !default;
|
24
|
-
$alert-border-color: darken($primary-color, $alert-function-factor) !default;
|
25
|
-
$alert-bottom-margin: em-calc(20) !default;
|
26
|
-
|
27
|
-
// We use these to style the close buttons
|
28
|
-
$alert-close-color: #333 !default;
|
29
|
-
$alert-close-position: em-calc(5) !default;
|
30
|
-
$alert-close-font-size: em-calc(22) !default;
|
31
|
-
$alert-close-opacity: 0.3 !default;
|
32
|
-
$alert-close-opacity-hover: 0.5 !default;
|
33
|
-
$alert-close-padding: 5px 4px 4px !default;
|
34
|
-
|
35
|
-
// We use this to control border radius
|
36
|
-
$alert-radius: $global-radius !default;
|
37
|
-
|
38
|
-
//
|
39
|
-
// Alert Mixins
|
40
|
-
//
|
41
|
-
|
42
|
-
// We use this mixin to create a default alert base.
|
43
|
-
@mixin alert-base {
|
44
|
-
border-style: $alert-border-style;
|
45
|
-
border-width: $alert-border-width;
|
46
|
-
display: block;
|
47
|
-
font-weight: $alert-font-weight;
|
48
|
-
margin-bottom: $alert-bottom-margin;
|
49
|
-
position: relative;
|
50
|
-
padding: $alert-padding-top $alert-padding-opposite-direction $alert-padding-bottom $alert-padding-default-float;
|
51
|
-
font-size: $alert-font-size;
|
52
|
-
}
|
53
|
-
|
54
|
-
// We use this mixin to add alert styles
|
55
|
-
@mixin alert-style($bg:$primary-color) {
|
56
|
-
|
57
|
-
// This find the lightness percentage of the background color.
|
58
|
-
$bg-lightness: lightness($bg);
|
59
|
-
|
60
|
-
// We control which background color and border come through.
|
61
|
-
background-color: $bg;
|
62
|
-
border-color: darken($bg, $alert-function-factor);
|
63
|
-
|
64
|
-
// We control the text color for you based on the background color.
|
65
|
-
@if $bg-lightness > 70% { color: $alert-font-color-alt; }
|
66
|
-
@else { color: $alert-font-color; }
|
67
|
-
|
68
|
-
}
|
69
|
-
|
70
|
-
// We use this to create the close button.
|
71
|
-
@mixin alert-close {
|
72
|
-
font-size: $alert-close-font-size;
|
73
|
-
padding: $alert-close-padding;
|
74
|
-
line-height: 0;
|
75
|
-
position: absolute;
|
76
|
-
top: $alert-close-position + em-calc(2);
|
77
|
-
#{$opposite-direction}: $alert-close-position;
|
78
|
-
color: $alert-close-color;
|
79
|
-
opacity: $alert-close-opacity;
|
80
|
-
&:hover,
|
81
|
-
&:focus { opacity: $alert-close-opacity-hover; }
|
82
|
-
}
|
83
|
-
|
84
|
-
// We use this to quickly create alerts with a single mixin.
|
85
|
-
@mixin alert($bg:$primary-color, $radius:false) {
|
86
|
-
@include alert-base;
|
87
|
-
@include alert-style($bg);
|
88
|
-
@include radius($radius);
|
89
|
-
}
|
90
|
-
|
91
|
-
@if $include-html-alert-classes != false {
|
92
|
-
|
93
|
-
/* Foundation Alerts */
|
94
|
-
.alert-box {
|
95
|
-
@include alert;
|
96
|
-
|
97
|
-
.close { @include alert-close; }
|
98
|
-
|
99
|
-
&.radius { @include radius($alert-radius); }
|
100
|
-
&.round { @include radius($global-rounded); }
|
101
|
-
|
102
|
-
&.success { @include alert-style($success-color); }
|
103
|
-
&.alert { @include alert-style($alert-color); }
|
104
|
-
&.secondary { @include alert-style($secondary-color); }
|
105
|
-
}
|
106
|
-
|
107
|
-
}
|
@@ -1,71 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Block Grid Variables
|
3
|
-
//
|
4
|
-
$include-html-grid-classes: $include-html-classes !default;
|
5
|
-
|
6
|
-
// We use this to control the maximum number of block grid elements per row
|
7
|
-
$block-grid-elements: 12 !default;
|
8
|
-
$block-grid-default-spacing: em-calc(20) !default;
|
9
|
-
|
10
|
-
// Enables media queries for block-grid classes. Set to false if writing semantic HTML.
|
11
|
-
$block-grid-media-queries: true !default;
|
12
|
-
|
13
|
-
//
|
14
|
-
// Block Grid Mixins
|
15
|
-
//
|
16
|
-
|
17
|
-
// We use this mixin to create different block-grids. You can apply per-row and spacing options.
|
18
|
-
// Setting $base-style to false will ommit default styles.
|
19
|
-
@mixin block-grid($per-row:false, $spacing:$block-grid-default-spacing, $base-style:true) {
|
20
|
-
|
21
|
-
@if $base-style {
|
22
|
-
display: block;
|
23
|
-
padding: 0;
|
24
|
-
margin: 0 (-$spacing/2);
|
25
|
-
@include clearfix;
|
26
|
-
|
27
|
-
&>li {
|
28
|
-
display: inline;
|
29
|
-
height: auto;
|
30
|
-
float: $default-float;
|
31
|
-
padding: 0 ($spacing/2) $spacing;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
@if $per-row {
|
36
|
-
&>li {
|
37
|
-
width: 100%/$per-row;
|
38
|
-
padding: 0 ($spacing/2) $spacing;
|
39
|
-
|
40
|
-
&:nth-of-type(n) { clear: none; }
|
41
|
-
&:nth-of-type(#{$per-row}n+1) { clear: both; }
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
@if $include-html-grid-classes {
|
48
|
-
/* Foundation Block Grids for below small breakpoint */
|
49
|
-
@media only screen {
|
50
|
-
[class*="block-grid-"] { @include block-grid; }
|
51
|
-
|
52
|
-
@for $i from 1 through $block-grid-elements {
|
53
|
-
.small-block-grid-#{($i)} {
|
54
|
-
@include block-grid($i,$block-grid-default-spacing,false);
|
55
|
-
}
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
/* Foundation Block Grids for above small breakpoint */
|
60
|
-
@media #{$small} {
|
61
|
-
/* Remove small grid clearing */
|
62
|
-
@for $i from 1 through $block-grid-elements {
|
63
|
-
.small-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; }
|
64
|
-
}
|
65
|
-
@for $i from 1 through $block-grid-elements {
|
66
|
-
.large-block-grid-#{($i)} {
|
67
|
-
@include block-grid($i,$block-grid-default-spacing,false);
|
68
|
-
}
|
69
|
-
}
|
70
|
-
}
|
71
|
-
}
|
@@ -1,124 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Breadcrumb Variables
|
3
|
-
//
|
4
|
-
$include-html-nav-classes: $include-html-classes !default;
|
5
|
-
|
6
|
-
// We use this to set the background color for the breadcrumb container.
|
7
|
-
$crumb-bg: lighten($secondary-color, 5%) !default;
|
8
|
-
|
9
|
-
// We use these to set the padding around the breadcrumbs.
|
10
|
-
$crumb-padding: em-calc(9 14 9) !default;
|
11
|
-
$crumb-side-padding: em-calc(12) !default;
|
12
|
-
|
13
|
-
// We use these to control border styles.
|
14
|
-
$crumb-function-factor: 10% !default;
|
15
|
-
$crumb-border-size: 1px !default;
|
16
|
-
$crumb-border-style: solid !default;
|
17
|
-
$crumb-border-color: darken($crumb-bg, $crumb-function-factor) !default;
|
18
|
-
$crumb-radius: $global-radius !default;
|
19
|
-
|
20
|
-
// We use these to set various text styles for breadcrumbs.
|
21
|
-
$crumb-font-size: em-calc(11) !default;
|
22
|
-
$crumb-font-color: $primary-color !default;
|
23
|
-
$crumb-font-color-current: #333 !default;
|
24
|
-
$crumb-font-color-unavailable: #999 !default;
|
25
|
-
$crumb-font-transform: uppercase !default;
|
26
|
-
$crumb-link-decor: underline !default;
|
27
|
-
|
28
|
-
// We use these to control the slash between breadcrumbs
|
29
|
-
$crumb-slash-color: #aaa !default;
|
30
|
-
$crumb-slash: "/" !default;
|
31
|
-
|
32
|
-
//
|
33
|
-
// Breakcrumb Mixins
|
34
|
-
//
|
35
|
-
|
36
|
-
// We use this mixin to create a container around our breadcrumbs
|
37
|
-
@mixin crumb-container {
|
38
|
-
display: block;
|
39
|
-
padding: $crumb-padding;
|
40
|
-
overflow: hidden;
|
41
|
-
margin-#{$default-float}: 0;
|
42
|
-
list-style: none;
|
43
|
-
border-style: $crumb-border-style;
|
44
|
-
border-width: $crumb-border-size;
|
45
|
-
|
46
|
-
// We control which background color and border come through.
|
47
|
-
background-color: $crumb-bg;
|
48
|
-
border-color: $crumb-border-color;
|
49
|
-
}
|
50
|
-
|
51
|
-
// We use this mixin to create breadcrumb styles from list items.
|
52
|
-
@mixin crumbs {
|
53
|
-
|
54
|
-
// A normal state will make the links look and act like clickable breadcrumbs.
|
55
|
-
margin: 0;
|
56
|
-
float: $default-float;
|
57
|
-
font-size: $crumb-font-size;
|
58
|
-
text-transform: $crumb-font-transform;
|
59
|
-
|
60
|
-
&:hover a, &:focus a { text-decoration: $crumb-link-decor; }
|
61
|
-
|
62
|
-
a,
|
63
|
-
span {
|
64
|
-
text-transform: $crumb-font-transform;
|
65
|
-
color: $crumb-font-color;
|
66
|
-
}
|
67
|
-
|
68
|
-
// Current is for the link of the current page
|
69
|
-
&.current {
|
70
|
-
cursor: $cursor-default-value;
|
71
|
-
color: $crumb-font-color-current;
|
72
|
-
a {
|
73
|
-
cursor: $cursor-default-value;
|
74
|
-
color: $crumb-font-color-current;
|
75
|
-
}
|
76
|
-
|
77
|
-
&:hover, &:hover a,
|
78
|
-
&:focus, &:focus a { text-decoration: none; }
|
79
|
-
}
|
80
|
-
|
81
|
-
// Unavailable removed color and link styles so it looks inactive.
|
82
|
-
&.unavailable {
|
83
|
-
color: $crumb-font-color-unavailable;
|
84
|
-
a { color: $crumb-font-color-unavailable; }
|
85
|
-
|
86
|
-
&:hover,
|
87
|
-
&:hover a,
|
88
|
-
&:focus,
|
89
|
-
a:focus {
|
90
|
-
text-decoration: none;
|
91
|
-
color: $crumb-font-color-unavailable;
|
92
|
-
cursor: $cursor-default-value;
|
93
|
-
}
|
94
|
-
}
|
95
|
-
|
96
|
-
&:before {
|
97
|
-
content: "#{$crumb-slash}";
|
98
|
-
color: $crumb-slash-color;
|
99
|
-
margin: 0 $crumb-side-padding;
|
100
|
-
position: relative;
|
101
|
-
top: 1px;
|
102
|
-
}
|
103
|
-
|
104
|
-
&:first-child:before {
|
105
|
-
content: " ";
|
106
|
-
margin: 0;
|
107
|
-
}
|
108
|
-
|
109
|
-
}
|
110
|
-
|
111
|
-
|
112
|
-
@if $include-html-nav-classes != false {
|
113
|
-
|
114
|
-
/* Breadcrumbs */
|
115
|
-
.breadcrumbs {
|
116
|
-
@include crumb-container;
|
117
|
-
@include radius($crumb-radius);
|
118
|
-
|
119
|
-
&>* {
|
120
|
-
@include crumbs;
|
121
|
-
}
|
122
|
-
}
|
123
|
-
|
124
|
-
}
|
@@ -1,89 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Button Group Variables
|
3
|
-
//
|
4
|
-
$include-html-button-classes: $include-html-classes !default;
|
5
|
-
|
6
|
-
// Sets the margin for the right side by default, and the left margin if right-to-left direction is used
|
7
|
-
$button-bar-margin-opposite: em-calc(10) !default;
|
8
|
-
|
9
|
-
//
|
10
|
-
// Button Group Mixins
|
11
|
-
//
|
12
|
-
|
13
|
-
// We use this to add styles for a button group container
|
14
|
-
@mixin button-group-container($styles:true, $float:false) {
|
15
|
-
@if $styles {
|
16
|
-
list-style: none;
|
17
|
-
margin: 0;
|
18
|
-
@include clearfix();
|
19
|
-
}
|
20
|
-
@if $float {
|
21
|
-
float: #{$default-float};
|
22
|
-
margin-#{$opposite-direction}: $button-bar-margin-opposite;
|
23
|
-
& div { overflow: hidden; }
|
24
|
-
}
|
25
|
-
}
|
26
|
-
|
27
|
-
// We use this to control styles for button groups
|
28
|
-
@mixin button-group-style($radius:false, $even:false, $float:$default-float) {
|
29
|
-
|
30
|
-
// We use this to control the flow, or remove those styles completely.
|
31
|
-
@if $float {
|
32
|
-
margin: 0 0 0 (-$button-border-width);
|
33
|
-
float: $float;
|
34
|
-
// Make sure the first child doesn't get the negative margin.
|
35
|
-
&:first-child { margin-#{$default-float}: 0; }
|
36
|
-
}
|
37
|
-
|
38
|
-
// We use these to control left and right radius on first/last buttons in the group.
|
39
|
-
@if $radius == true {
|
40
|
-
&:first-child,
|
41
|
-
&:first-child > a,
|
42
|
-
&:first-child > button,
|
43
|
-
&:first-child > .button { @include side-radius($default-float, $button-radius); }
|
44
|
-
&:last-child,
|
45
|
-
&:last-child > a,
|
46
|
-
&:last-child > button,
|
47
|
-
&:last-child > .button { @include side-radius($opposite-direction, $button-radius); }
|
48
|
-
}
|
49
|
-
@else if $radius {
|
50
|
-
&:first-child,
|
51
|
-
&:first-child > a,
|
52
|
-
&:first-child > button,
|
53
|
-
&:first-child > .button { @include side-radius($default-float, $radius); }
|
54
|
-
&:last-child,
|
55
|
-
&:last-child > a,
|
56
|
-
&:last-child > button,
|
57
|
-
&:last-child > .button { @include side-radius($opposite-direction, $radius); }
|
58
|
-
}
|
59
|
-
|
60
|
-
// We use this to make the buttons even width across their container
|
61
|
-
@if $even {
|
62
|
-
width: percentage((100/$even) / 100);
|
63
|
-
button, .button { width: 100%; }
|
64
|
-
}
|
65
|
-
|
66
|
-
}
|
67
|
-
|
68
|
-
// Only include these CSS classes if $include-html-classes: true
|
69
|
-
@if $include-html-button-classes != false {
|
70
|
-
|
71
|
-
/* Button Groups */
|
72
|
-
.button-group { @include button-group-container;
|
73
|
-
|
74
|
-
&> * { @include button-group-style(); }
|
75
|
-
|
76
|
-
&.radius > * { @include button-group-style($radius:$button-radius, $float:null); }
|
77
|
-
&.round > * { @include button-group-style($radius:$button-round, $float:null); }
|
78
|
-
|
79
|
-
@for $i from 2 through 8 {
|
80
|
-
&.even#{-$i} li { @include button-group-style($even:$i, $float:null); }
|
81
|
-
}
|
82
|
-
}
|
83
|
-
|
84
|
-
.button-bar {
|
85
|
-
@include clearfix;
|
86
|
-
.button-group { @include button-group-container($styles:false,$float:true); }
|
87
|
-
}
|
88
|
-
|
89
|
-
}
|
@@ -1,230 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Button Variables
|
3
|
-
//
|
4
|
-
$include-html-button-classes: $include-html-classes !default;
|
5
|
-
|
6
|
-
// We use these to build padding for buttons.
|
7
|
-
$button-med: em-calc(12) !default;
|
8
|
-
$button-tny: em-calc(7) !default;
|
9
|
-
$button-sml: em-calc(9) !default;
|
10
|
-
$button-lrg: em-calc(16) !default;
|
11
|
-
|
12
|
-
// We use this to control the display property.
|
13
|
-
$button-display: inline-block !default;
|
14
|
-
$button-margin-bottom: em-calc(20) !default;
|
15
|
-
|
16
|
-
// We use these to control button text styles.
|
17
|
-
$button-font-family: inherit !default;
|
18
|
-
$button-font-color: #fff !default;
|
19
|
-
$button-font-color-alt: #333 !default;
|
20
|
-
$button-font-med: em-calc(16) !default;
|
21
|
-
$button-font-tny: em-calc(11) !default;
|
22
|
-
$button-font-sml: em-calc(13) !default;
|
23
|
-
$button-font-lrg: em-calc(20) !default;
|
24
|
-
$button-font-weight: bold !default;
|
25
|
-
$button-font-align: center !default;
|
26
|
-
|
27
|
-
// We use these to control various hover effects.
|
28
|
-
$button-function-factor: 10% !default;
|
29
|
-
|
30
|
-
// We use these to control button border styles.
|
31
|
-
$button-border-width: 1px !default;
|
32
|
-
$button-border-style: solid !default;
|
33
|
-
|
34
|
-
// We use this to set the default radius used throughout the core.
|
35
|
-
$button-radius: $global-radius !default;
|
36
|
-
$button-round: $global-rounded !default;
|
37
|
-
|
38
|
-
// We use this to set default opacity for disabled buttons.
|
39
|
-
$button-disabled-opacity: 0.6 !default;
|
40
|
-
|
41
|
-
|
42
|
-
//
|
43
|
-
// Button Mixins
|
44
|
-
//
|
45
|
-
|
46
|
-
// We use this mixin to create a default button base.
|
47
|
-
@mixin button-base($style:true, $display:$button-display) {
|
48
|
-
@if $style {
|
49
|
-
border-style: $button-border-style;
|
50
|
-
border-width: $button-border-width;
|
51
|
-
cursor: $cursor-pointer-value;
|
52
|
-
font-family: $button-font-family;
|
53
|
-
font-weight: $button-font-weight;
|
54
|
-
line-height: normal;
|
55
|
-
margin: 0 0 $button-margin-bottom;
|
56
|
-
position: relative;
|
57
|
-
text-decoration: none;
|
58
|
-
text-align: $button-font-align;
|
59
|
-
}
|
60
|
-
@if $display { display: $display; }
|
61
|
-
}
|
62
|
-
|
63
|
-
// We use this mixin to add button size styles
|
64
|
-
@mixin button-size($padding:$button-med, $full-width:false, $is-input:false) {
|
65
|
-
|
66
|
-
// We control which padding styles come through,
|
67
|
-
// these can be turned off by setting $padding:false
|
68
|
-
@if $padding {
|
69
|
-
padding-top: $padding;
|
70
|
-
padding-#{$opposite-direction}: $padding * 2;
|
71
|
-
padding-bottom: $padding + em-calc(1);
|
72
|
-
padding-#{$default-float}: $padding * 2;
|
73
|
-
|
74
|
-
// We control the font-size based on mixin input.
|
75
|
-
@if $padding == $button-med { font-size: $button-font-med; }
|
76
|
-
@else if $padding == $button-tny { font-size: $button-font-tny; }
|
77
|
-
@else if $padding == $button-sml { font-size: $button-font-sml; }
|
78
|
-
@else if $padding == $button-lrg { font-size: $button-font-lrg; }
|
79
|
-
@else { font-size: $padding - em-calc(2); }
|
80
|
-
}
|
81
|
-
|
82
|
-
// We can set $full-width:true to remove side padding extend width.
|
83
|
-
@if $full-width {
|
84
|
-
// We still need to check if $padding is set.
|
85
|
-
@if $padding {
|
86
|
-
padding-top: $padding;
|
87
|
-
padding-bottom: $padding + em-calc(1);
|
88
|
-
} @else if $padding == false {
|
89
|
-
padding-top:0;
|
90
|
-
padding-bottom:0;
|
91
|
-
}
|
92
|
-
padding-right: 0;
|
93
|
-
padding-left: 0;
|
94
|
-
width: 100%;
|
95
|
-
}
|
96
|
-
|
97
|
-
// <input>'s and <button>'s take on strange padding. We added this to help fix that.
|
98
|
-
@if $is-input == $button-lrg {
|
99
|
-
padding-top: $is-input + em-calc(.5);
|
100
|
-
padding-bottom: $is-input + em-calc(.5);
|
101
|
-
-webkit-appearance: none;
|
102
|
-
}
|
103
|
-
@else if $is-input {
|
104
|
-
padding-top: $is-input + em-calc(1);
|
105
|
-
padding-bottom: $is-input;
|
106
|
-
-webkit-appearance: none;
|
107
|
-
}
|
108
|
-
}
|
109
|
-
|
110
|
-
// We use this mixin to add button color styles
|
111
|
-
@mixin button-style($bg:$primary-color, $radius:false, $disabled:false) {
|
112
|
-
|
113
|
-
// We control which background styles are used,
|
114
|
-
// these can be removed by setting $bg:false
|
115
|
-
@if $bg {
|
116
|
-
// This find the lightness percentage of the background color.
|
117
|
-
$bg-lightness: lightness($bg);
|
118
|
-
|
119
|
-
background-color: $bg;
|
120
|
-
border-color: darken($bg, $button-function-factor);
|
121
|
-
&:hover,
|
122
|
-
&:focus { background-color: darken($bg, $button-function-factor); }
|
123
|
-
|
124
|
-
// We control the text color for you based on the background color.
|
125
|
-
@if $bg-lightness > 70% {
|
126
|
-
color: $button-font-color-alt;
|
127
|
-
&:hover,
|
128
|
-
&:focus { color: $button-font-color-alt; }
|
129
|
-
}
|
130
|
-
@else {
|
131
|
-
color: $button-font-color;
|
132
|
-
&:hover,
|
133
|
-
&:focus { color: $button-font-color; }
|
134
|
-
}
|
135
|
-
}
|
136
|
-
|
137
|
-
// We can set $disabled:true to create a disabled transparent button.
|
138
|
-
@if $disabled {
|
139
|
-
cursor: $cursor-default-value;
|
140
|
-
opacity: $button-disabled-opacity;
|
141
|
-
@if $experimental {
|
142
|
-
-webkit-box-shadow: none;
|
143
|
-
}
|
144
|
-
box-shadow: none;
|
145
|
-
&:hover,
|
146
|
-
&:focus { background-color: $bg; }
|
147
|
-
}
|
148
|
-
|
149
|
-
// We can control how much button radius us used.
|
150
|
-
@if $radius == true { @include radius($button-radius); }
|
151
|
-
@else if $radius { @include radius($radius); }
|
152
|
-
|
153
|
-
}
|
154
|
-
|
155
|
-
// We use this to quickly create buttons with a single mixin. As @jaredhardy puts it, "the kitchen sink mixin"
|
156
|
-
@mixin button($padding:$button-med, $bg:$primary-color, $radius:false, $full-width:false, $disabled:false, $is-input:false, $is-prefix:false) {
|
157
|
-
@include button-base;
|
158
|
-
@include button-size($padding, $full-width, $is-input);
|
159
|
-
@include button-style($bg, $radius, $disabled);
|
160
|
-
}
|
161
|
-
|
162
|
-
|
163
|
-
//
|
164
|
-
// Button Classes
|
165
|
-
//
|
166
|
-
|
167
|
-
// Only include these classes if the variable is true, otherwise they'll be left out.
|
168
|
-
@if $include-html-button-classes != false {
|
169
|
-
|
170
|
-
// Default styles applied outside of media query
|
171
|
-
button, .button {
|
172
|
-
@include button-base;
|
173
|
-
@include button-size;
|
174
|
-
@include button-style;
|
175
|
-
|
176
|
-
&.secondary { @include button-style($bg:$secondary-color); }
|
177
|
-
&.success { @include button-style($bg:$success-color); }
|
178
|
-
&.alert { @include button-style($bg:$alert-color); }
|
179
|
-
|
180
|
-
&.large { @include button-size($padding:$button-lrg); }
|
181
|
-
&.small { @include button-size($padding:$button-sml); }
|
182
|
-
&.tiny { @include button-size($padding:$button-tny); }
|
183
|
-
&.expand { @include button-size($padding:null,$full-width:true); }
|
184
|
-
|
185
|
-
&.left-align { text-align: left; text-indent: em-calc(12); }
|
186
|
-
&.right-align { text-align: right; padding-right: em-calc(12); }
|
187
|
-
|
188
|
-
&.disabled, &[disabled] { @include button-style($bg:$primary-color, $disabled:true);
|
189
|
-
&.secondary { @include button-style($bg:$secondary-color, $disabled:true); }
|
190
|
-
&.success { @include button-style($bg:$success-color, $disabled:true); }
|
191
|
-
&.alert { @include button-style($bg:$alert-color, $disabled:true); }
|
192
|
-
}
|
193
|
-
|
194
|
-
}
|
195
|
-
|
196
|
-
button, .button {
|
197
|
-
@include button-size($padding:false, $is-input:$button-med);
|
198
|
-
&.tiny { @include button-size($padding:false, $is-input:$button-tny); }
|
199
|
-
&.small { @include button-size($padding:false, $is-input:$button-sml); }
|
200
|
-
&.large { @include button-size($padding:false, $is-input:$button-lrg); }
|
201
|
-
}
|
202
|
-
|
203
|
-
// Styles for any browser or device that support media queries
|
204
|
-
@media only screen {
|
205
|
-
|
206
|
-
button, .button {
|
207
|
-
@include inset-shadow();
|
208
|
-
@include single-transition(background-color);
|
209
|
-
|
210
|
-
&.large { @include button-size($padding:false, $full-width:false); }
|
211
|
-
&.small { @include button-size($padding:false, $full-width:false); }
|
212
|
-
&.tiny { @include button-size($padding:false, $full-width:false); }
|
213
|
-
|
214
|
-
&.radius { @include button-style($bg:false, $radius:true); }
|
215
|
-
&.round { @include button-style($bg:false, $radius:$button-round); }
|
216
|
-
}
|
217
|
-
|
218
|
-
}
|
219
|
-
|
220
|
-
// Additional styles for screens larger than 768px
|
221
|
-
@media #{$small} {
|
222
|
-
|
223
|
-
button, .button {
|
224
|
-
@include button-base($style:false, $display:inline-block);
|
225
|
-
@include button-size($padding:false, $full-width:false);
|
226
|
-
}
|
227
|
-
|
228
|
-
}
|
229
|
-
|
230
|
-
}
|