foundation-rails 5.0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/app/controllers/foundation/rails/styleguide_controller.rb +10 -0
- data/app/views/foundation/rails/styleguide/show.html.erb +134 -0
- data/config/routes.rb +3 -0
- data/foundation-rails.gemspec +25 -0
- data/lib/foundation-rails.rb +1 -0
- data/lib/foundation/rails.rb +3 -0
- data/lib/foundation/rails/engine.rb +7 -0
- data/lib/foundation/rails/generators/install_generator.rb +56 -0
- data/lib/foundation/rails/templates/application.html.erb +19 -0
- data/lib/foundation/rails/templates/application.html.haml +18 -0
- data/lib/foundation/rails/templates/application.html.slim +17 -0
- data/lib/foundation/rails/version.rb +5 -0
- data/test/dummy/.gitignore +16 -0
- data/test/dummy/Gemfile +47 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +8 -0
- data/test/dummy/app/assets/stylesheets/application.css +4 -0
- data/test/dummy/app/assets/stylesheets/foundation_and_overrides.scss +4 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/controllers/styleguide_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/styleguide_helper.rb +2 -0
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +19 -0
- data/test/dummy/app/views/styleguide/show.html.erb +109 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +4 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/db/seeds.rb +7 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/lib/tasks/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/robots.txt +5 -0
- data/test/dummy/test/controllers/.keep +0 -0
- data/test/dummy/test/controllers/styleguide_controller_test.rb +9 -0
- data/test/dummy/test/fixtures/.keep +0 -0
- data/test/dummy/test/helpers/.keep +0 -0
- data/test/dummy/test/helpers/styleguide_helper_test.rb +4 -0
- data/test/dummy/test/integration/.keep +0 -0
- data/test/dummy/test/mailers/.keep +0 -0
- data/test/dummy/test/models/.keep +0 -0
- data/test/dummy/test/test_helper.rb +15 -0
- data/test/dummy/vendor/assets/javascripts/.keep +0 -0
- data/test/dummy/vendor/assets/stylesheets/.keep +0 -0
- data/vendor/_settings.scss +992 -0
- data/vendor/assets/javascripts/foundation.js +15 -0
- data/vendor/assets/javascripts/foundation/foundation.abide.js +201 -0
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +41 -0
- data/vendor/assets/javascripts/foundation/foundation.alert.js +34 -0
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +450 -0
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +184 -0
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +304 -0
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +839 -0
- data/vendor/assets/javascripts/foundation/foundation.js +416 -0
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +118 -0
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +37 -0
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +434 -0
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +347 -0
- data/vendor/assets/javascripts/foundation/foundation.tab.js +37 -0
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +202 -0
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +380 -0
- data/vendor/assets/javascripts/vendor/modernizr.js +4 -0
- data/vendor/assets/stylesheets/foundation.scss +38 -0
- data/vendor/assets/stylesheets/foundation/_functions.scss +75 -0
- data/vendor/assets/stylesheets/foundation/_settings.scss +992 -0
- data/vendor/assets/stylesheets/foundation/components/_accordion.scss +49 -0
- data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +113 -0
- data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +83 -0
- data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +123 -0
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +97 -0
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +234 -0
- data/vendor/assets/stylesheets/foundation/components/_clearing.scss +233 -0
- data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +125 -0
- data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +159 -0
- data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +47 -0
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +472 -0
- data/vendor/assets/stylesheets/foundation/components/_functions.scss +70 -0
- data/vendor/assets/stylesheets/foundation/components/_global.scss +387 -0
- data/vendor/assets/stylesheets/foundation/components/_grid.scss +234 -0
- data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +52 -0
- data/vendor/assets/stylesheets/foundation/components/_joyride.scss +220 -0
- data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +57 -0
- data/vendor/assets/stylesheets/foundation/components/_labels.scss +100 -0
- data/vendor/assets/stylesheets/foundation/components/_magellan.scss +30 -0
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +360 -0
- data/vendor/assets/stylesheets/foundation/components/_orbit.scss +353 -0
- data/vendor/assets/stylesheets/foundation/components/_pagination.scss +145 -0
- data/vendor/assets/stylesheets/foundation/components/_panels.scss +87 -0
- data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +146 -0
- data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +75 -0
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +165 -0
- data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +83 -0
- data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +187 -0
- data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +118 -0
- data/vendor/assets/stylesheets/foundation/components/_switch.scss +314 -0
- data/vendor/assets/stylesheets/foundation/components/_tables.scss +93 -0
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +95 -0
- data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +71 -0
- data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +121 -0
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +590 -0
- data/vendor/assets/stylesheets/foundation/components/_type.scss +447 -0
- data/vendor/assets/stylesheets/foundation/components/_visibility.scss +661 -0
- data/vendor/assets/stylesheets/normalize.scss +410 -0
- metadata +292 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
@import "global";
|
2
|
+
|
3
|
+
//
|
4
|
+
// @variables
|
5
|
+
//
|
6
|
+
$include-html-panel-classes: $include-html-classes !default;
|
7
|
+
|
8
|
+
// We use these to control the background and border styles
|
9
|
+
$panel-bg: darken(#fff, 5%) !default;
|
10
|
+
$panel-border-style: solid !default;
|
11
|
+
$panel-border-size: 1px !default;
|
12
|
+
|
13
|
+
// We use this % to control how much we darken things on hover
|
14
|
+
$panel-function-factor: 10% !default;
|
15
|
+
$panel-border-color: darken($panel-bg, $panel-function-factor) !default;
|
16
|
+
|
17
|
+
// We use these to set default inner padding and bottom margin
|
18
|
+
$panel-margin-bottom: rem-calc(20) !default;
|
19
|
+
$panel-padding: rem-calc(20) !default;
|
20
|
+
|
21
|
+
// We use these to set default font colors
|
22
|
+
$panel-font-color: #333 !default;
|
23
|
+
$panel-font-color-alt: #fff !default;
|
24
|
+
|
25
|
+
$panel-header-adjust: true !default;
|
26
|
+
$callout-panel-link-color: $primary-color !default;
|
27
|
+
//
|
28
|
+
// @mixins
|
29
|
+
//
|
30
|
+
// We use this mixin to create panels.
|
31
|
+
// $bg - Sets the panel background color. Default: $panel-pg || darken(#fff, 5%) !default
|
32
|
+
// $padding - Sets the panel padding amount. Default: $panel-padding || rem-calc(20)
|
33
|
+
// $adjust - Sets the font color based on the darkness of the bg & resets header line-heights for panels. Default: $panel-header-adjust || true
|
34
|
+
@mixin panel($bg:$panel-bg, $padding:$panel-padding, $adjust:$panel-header-adjust) {
|
35
|
+
|
36
|
+
@if $bg {
|
37
|
+
$bg-lightness: lightness($bg);
|
38
|
+
|
39
|
+
border-style: $panel-border-style;
|
40
|
+
border-width: $panel-border-size;
|
41
|
+
border-color: darken($bg, $panel-function-factor);
|
42
|
+
margin-bottom: $panel-margin-bottom;
|
43
|
+
padding: $padding;
|
44
|
+
|
45
|
+
background: $bg;
|
46
|
+
|
47
|
+
// Respect the padding, fool.
|
48
|
+
&>:first-child { margin-top: 0; }
|
49
|
+
&>:last-child { margin-bottom: 0; }
|
50
|
+
|
51
|
+
@if $adjust {
|
52
|
+
// We set the font color based on the darkness of the bg.
|
53
|
+
@if $bg-lightness >= 50% and $bg == blue { h1,h2,h3,h4,h5,h6,p { color: $panel-font-color-alt; } }
|
54
|
+
@else if $bg-lightness >= 50% { h1,h2,h3,h4,h5,h6,p { color: $panel-font-color; } }
|
55
|
+
@else { h1,h2,h3,h4,h5,h6,p { color: $panel-font-color-alt; } }
|
56
|
+
|
57
|
+
// reset header line-heights for panels
|
58
|
+
h1,h2,h3,h4,h5,h6 {
|
59
|
+
line-height: 1; margin-bottom: rem-calc(20) / 2;
|
60
|
+
&.subheader { line-height: 1.4; }
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
@include exports("panel") {
|
67
|
+
@if $include-html-panel-classes {
|
68
|
+
|
69
|
+
/* Panels */
|
70
|
+
.panel { @include panel;
|
71
|
+
|
72
|
+
&.callout {
|
73
|
+
@include panel(lighten($primary-color, 60%));
|
74
|
+
a {
|
75
|
+
color: $callout-panel-link-color;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
&.radius {
|
80
|
+
@include panel($bg:false);
|
81
|
+
@include radius;
|
82
|
+
}
|
83
|
+
|
84
|
+
}
|
85
|
+
|
86
|
+
}
|
87
|
+
}
|
@@ -0,0 +1,146 @@
|
|
1
|
+
@import "global";
|
2
|
+
|
3
|
+
//
|
4
|
+
// @variables
|
5
|
+
//
|
6
|
+
$include-html-pricing-classes: $include-html-classes !default;
|
7
|
+
|
8
|
+
// We use this to control the border color
|
9
|
+
$price-table-border: solid 1px #ddd !default;
|
10
|
+
|
11
|
+
// We use this to control the bottom margin of the pricing table
|
12
|
+
$price-table-margin-bottom: rem-calc(20) !default;
|
13
|
+
|
14
|
+
// We use these to control the title styles
|
15
|
+
$price-title-bg: #333 !default;
|
16
|
+
$price-title-padding: rem-calc(15 20) !default;
|
17
|
+
$price-title-align: center !default;
|
18
|
+
$price-title-color: #eee !default;
|
19
|
+
$price-title-weight: normal !default;
|
20
|
+
$price-title-size: rem-calc(16) !default;
|
21
|
+
$price-title-font-family: $body-font-family !default;
|
22
|
+
|
23
|
+
// We use these to control the price styles
|
24
|
+
$price-money-bg: #f6f6f6 !default;
|
25
|
+
$price-money-padding: rem-calc(15 20) !default;
|
26
|
+
$price-money-align: center !default;
|
27
|
+
$price-money-color: #333 !default;
|
28
|
+
$price-money-weight: normal !default;
|
29
|
+
$price-money-size: rem-calc(32) !default;
|
30
|
+
$price-money-font-family: $body-font-family !default;
|
31
|
+
|
32
|
+
|
33
|
+
// We use these to control the description styles
|
34
|
+
$price-bg: #fff !default;
|
35
|
+
$price-desc-color: #777 !default;
|
36
|
+
$price-desc-padding: rem-calc(15) !default;
|
37
|
+
$price-desc-align: center !default;
|
38
|
+
$price-desc-font-size: rem-calc(12) !default;
|
39
|
+
$price-desc-weight: normal !default;
|
40
|
+
$price-desc-line-height: 1.4 !default;
|
41
|
+
$price-desc-bottom-border: dotted 1px #ddd !default;
|
42
|
+
|
43
|
+
// We use these to control the list item styles
|
44
|
+
$price-item-color: #333 !default;
|
45
|
+
$price-item-padding: rem-calc(15) !default;
|
46
|
+
$price-item-align: center !default;
|
47
|
+
$price-item-font-size: rem-calc(14) !default;
|
48
|
+
$price-item-weight: normal !default;
|
49
|
+
$price-item-bottom-border: dotted 1px #ddd !default;
|
50
|
+
|
51
|
+
// We use these to control the CTA area styles
|
52
|
+
$price-cta-bg: #fff !default;
|
53
|
+
$price-cta-align: center !default;
|
54
|
+
$price-cta-padding: rem-calc(20 20 0) !default;
|
55
|
+
|
56
|
+
// @mixins
|
57
|
+
//
|
58
|
+
// We use this to create the container element for the pricing tables
|
59
|
+
@mixin pricing-table-container {
|
60
|
+
border: $price-table-border;
|
61
|
+
margin-#{$default-float}: 0;
|
62
|
+
margin-bottom: $price-table-margin-bottom;
|
63
|
+
|
64
|
+
& * {
|
65
|
+
list-style: none;
|
66
|
+
line-height: 1;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
// @mixins
|
70
|
+
//
|
71
|
+
// We use this mixin to create the pricing table title styles
|
72
|
+
@mixin pricing-table-title {
|
73
|
+
background-color: $price-title-bg;
|
74
|
+
padding: $price-title-padding;
|
75
|
+
text-align: $price-title-align;
|
76
|
+
color: $price-title-color;
|
77
|
+
font-weight: $price-title-weight;
|
78
|
+
font-size: $price-title-size;
|
79
|
+
font-family: $price-title-font-family;
|
80
|
+
}
|
81
|
+
|
82
|
+
// @mixins
|
83
|
+
//
|
84
|
+
// We use this mixin to control the pricing table price styles
|
85
|
+
@mixin pricing-table-price {
|
86
|
+
background-color: $price-money-bg;
|
87
|
+
padding: $price-money-padding;
|
88
|
+
text-align: $price-money-align;
|
89
|
+
color: $price-money-color;
|
90
|
+
font-weight: $price-money-weight;
|
91
|
+
font-size: $price-money-size;
|
92
|
+
font-family: $price-money-font-family;
|
93
|
+
}
|
94
|
+
|
95
|
+
// @mixins
|
96
|
+
//
|
97
|
+
// We use this mixin to create the description styles for the pricing table
|
98
|
+
@mixin pricing-table-description {
|
99
|
+
background-color: $price-bg;
|
100
|
+
padding: $price-desc-padding;
|
101
|
+
text-align: $price-desc-align;
|
102
|
+
color: $price-desc-color;
|
103
|
+
font-size: $price-desc-font-size;
|
104
|
+
font-weight: $price-desc-weight;
|
105
|
+
line-height: $price-desc-line-height;
|
106
|
+
border-bottom: $price-desc-bottom-border;
|
107
|
+
}
|
108
|
+
|
109
|
+
// @mixins
|
110
|
+
//
|
111
|
+
// We use this mixin to style the bullet items in the pricing table
|
112
|
+
@mixin pricing-table-bullet {
|
113
|
+
background-color: $price-bg;
|
114
|
+
padding: $price-item-padding;
|
115
|
+
text-align: $price-item-align;
|
116
|
+
color: $price-item-color;
|
117
|
+
font-size: $price-item-font-size;
|
118
|
+
font-weight: $price-item-weight;
|
119
|
+
border-bottom: $price-item-bottom-border;
|
120
|
+
}
|
121
|
+
|
122
|
+
// @mixins
|
123
|
+
//
|
124
|
+
// We use this mixin to style the CTA area of the pricing tables
|
125
|
+
@mixin pricing-table-cta {
|
126
|
+
background-color: $price-cta-bg;
|
127
|
+
text-align: $price-cta-align;
|
128
|
+
padding: $price-cta-padding;
|
129
|
+
}
|
130
|
+
|
131
|
+
@include exports("pricing-table") {
|
132
|
+
@if $include-html-pricing-classes {
|
133
|
+
|
134
|
+
/* Pricing Tables */
|
135
|
+
.pricing-table {
|
136
|
+
@include pricing-table-container;
|
137
|
+
|
138
|
+
.title { @include pricing-table-title; }
|
139
|
+
.price { @include pricing-table-price; }
|
140
|
+
.description { @include pricing-table-description; }
|
141
|
+
.bullet-item { @include pricing-table-bullet; }
|
142
|
+
.cta-button { @include pricing-table-cta; }
|
143
|
+
}
|
144
|
+
|
145
|
+
}
|
146
|
+
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
@import "global";
|
2
|
+
|
3
|
+
//
|
4
|
+
// @variables
|
5
|
+
//
|
6
|
+
$include-html-media-classes: $include-html-classes !default;
|
7
|
+
|
8
|
+
// We use this to se the prog bar height
|
9
|
+
$progress-bar-height: rem-calc(25) !default;
|
10
|
+
$progress-bar-color: #f6f6f6 !default;
|
11
|
+
|
12
|
+
// We use these to control the border styles
|
13
|
+
$progress-bar-border-color: darken(#fff, 20%) !default;
|
14
|
+
$progress-bar-border-size: 1px !default;
|
15
|
+
$progress-bar-border-style: solid !default;
|
16
|
+
$progress-bar-border-radius: $global-radius !default;
|
17
|
+
|
18
|
+
// We use these to control the margin & padding
|
19
|
+
$progress-bar-pad: rem-calc(2) !default;
|
20
|
+
$progress-bar-margin-bottom: rem-calc(10) !default;
|
21
|
+
|
22
|
+
// We use these to set the meter colors
|
23
|
+
$progress-meter-color: $primary-color !default;
|
24
|
+
$progress-meter-secondary-color: $secondary-color !default;
|
25
|
+
$progress-meter-success-color: $success-color !default;
|
26
|
+
$progress-meter-alert-color: $alert-color !default;
|
27
|
+
|
28
|
+
// @mixins
|
29
|
+
//
|
30
|
+
// We use this to set up the progress bar container
|
31
|
+
@mixin progress-container {
|
32
|
+
background-color: $progress-bar-color;
|
33
|
+
height: $progress-bar-height;
|
34
|
+
border: $progress-bar-border-size $progress-bar-border-style $progress-bar-border-color;
|
35
|
+
padding: $progress-bar-pad;
|
36
|
+
margin-bottom: $progress-bar-margin-bottom;
|
37
|
+
}
|
38
|
+
|
39
|
+
// @mixins
|
40
|
+
//
|
41
|
+
// $bg - Default: $progress-meter-color || $primary-color
|
42
|
+
@mixin progress-meter($bg:$progress-meter-color) {
|
43
|
+
background: $bg;
|
44
|
+
height: 100%;
|
45
|
+
display: block;
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
@include exports("progress-bar") {
|
50
|
+
@if $include-html-media-classes {
|
51
|
+
|
52
|
+
/* Progress Bar */
|
53
|
+
.progress {
|
54
|
+
@include progress-container;
|
55
|
+
|
56
|
+
// Meter
|
57
|
+
.meter {
|
58
|
+
@include progress-meter;
|
59
|
+
}
|
60
|
+
&.secondary .meter { @include progress-meter($bg:$progress-meter-secondary-color); }
|
61
|
+
&.success .meter { @include progress-meter($bg:$progress-meter-success-color); }
|
62
|
+
&.alert .meter { @include progress-meter($bg:$progress-meter-alert-color); }
|
63
|
+
|
64
|
+
&.radius { @include radius($global-radius);
|
65
|
+
.meter { @include radius($global-radius - 1); }
|
66
|
+
}
|
67
|
+
|
68
|
+
&.round { @include radius(1000px);
|
69
|
+
.meter { @include radius(999px); }
|
70
|
+
}
|
71
|
+
|
72
|
+
}
|
73
|
+
|
74
|
+
}
|
75
|
+
}
|
@@ -0,0 +1,165 @@
|
|
1
|
+
@import "global";
|
2
|
+
|
3
|
+
//
|
4
|
+
// @name _reveal.scss
|
5
|
+
// @dependencies _global.scss
|
6
|
+
//
|
7
|
+
|
8
|
+
$include-html-reveal-classes: $include-html-classes !default;
|
9
|
+
|
10
|
+
// We use these to control the style of the reveal overlay.
|
11
|
+
$reveal-overlay-bg: rgba(#000, .45) !default;
|
12
|
+
$reveal-overlay-bg-old: #000 !default;
|
13
|
+
|
14
|
+
// We use these to control the style of the modal itself.
|
15
|
+
$reveal-modal-bg: #fff !default;
|
16
|
+
$reveal-position-top: 50px !default;
|
17
|
+
$reveal-default-width: 80% !default;
|
18
|
+
$reveal-modal-padding: rem-calc(20) !default;
|
19
|
+
$reveal-box-shadow: 0 0 10px rgba(#000,.4) !default;
|
20
|
+
|
21
|
+
// We use these to style the reveal close button
|
22
|
+
$reveal-close-font-size: rem-calc(22) !default;
|
23
|
+
$reveal-close-top: rem-calc(8) !default;
|
24
|
+
$reveal-close-side: rem-calc(11) !default;
|
25
|
+
$reveal-close-color: #aaa !default;
|
26
|
+
$reveal-close-weight: bold !default;
|
27
|
+
|
28
|
+
// We use these to control the modal border
|
29
|
+
$reveal-border-style: solid !default;
|
30
|
+
$reveal-border-width: 1px !default;
|
31
|
+
$reveal-border-color: #666 !default;
|
32
|
+
|
33
|
+
$reveal-modal-class: "reveal-modal" !default;
|
34
|
+
$close-reveal-modal-class: "close-reveal-modal" !default;
|
35
|
+
|
36
|
+
//
|
37
|
+
// @mixins
|
38
|
+
//
|
39
|
+
|
40
|
+
// We use this to create the reveal background overlay styles
|
41
|
+
@mixin reveal-bg {
|
42
|
+
position: fixed;
|
43
|
+
height: 100%;
|
44
|
+
width: 100%;
|
45
|
+
background: $reveal-overlay-bg-old;
|
46
|
+
background: $reveal-overlay-bg;
|
47
|
+
z-index: 98;
|
48
|
+
display: none;
|
49
|
+
top: 0;
|
50
|
+
#{$default-float}: 0;
|
51
|
+
}
|
52
|
+
|
53
|
+
// We use this mixin to create the structure of a reveal modal
|
54
|
+
//
|
55
|
+
// $base-style - Provides reveal base styles, can be set to false to override. Default: true, Options: false
|
56
|
+
// $width - Sets reveal width Default: $reveal-default-width || 80%
|
57
|
+
//
|
58
|
+
@mixin reveal-modal-base(
|
59
|
+
$base-style:true,
|
60
|
+
$width:$reveal-default-width) {
|
61
|
+
@if $base-style {
|
62
|
+
visibility: hidden;
|
63
|
+
display: none;
|
64
|
+
position: absolute;
|
65
|
+
#{$default-float}: 50%;
|
66
|
+
z-index: 99;
|
67
|
+
height: auto;
|
68
|
+
|
69
|
+
// Make sure rows don't have a min-width on them
|
70
|
+
.column,
|
71
|
+
.columns { min-width: 0; }
|
72
|
+
|
73
|
+
// Get rid of margin from first and last element inside modal
|
74
|
+
& > :first-child { margin-top: 0; }
|
75
|
+
& > :last-child { margin-bottom: 0; }
|
76
|
+
}
|
77
|
+
|
78
|
+
@if $width {
|
79
|
+
margin-#{$default-float}: -($width / 2);
|
80
|
+
width: $width;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
// We use this to style the reveal modal defaults
|
85
|
+
//
|
86
|
+
// $bg - Sets background color of reveal modal. Default: $reveal-modal-bg || #fff
|
87
|
+
// $padding - Padding to apply to reveal modal. Default: $reveal-modal-padding.
|
88
|
+
// $border - Choose whether reveal uses a border. Default: true, Options: false
|
89
|
+
// $border-style - Set reveal border style. Default: $reveal-border-style || solid
|
90
|
+
// $border-width - Width of border (i.e. 1px). Default: $reveal-border-width.
|
91
|
+
// $border-color - Color of border. Default: $reveal-border-color.
|
92
|
+
// $box-shadow - Choose whether or not to include the default box-shadow. Default: true, Options: false
|
93
|
+
// $top-offset - Default: $reveal-position-top || 50px
|
94
|
+
@mixin reveal-modal-style(
|
95
|
+
$bg:$reveal-modal-bg,
|
96
|
+
$padding:$reveal-modal-padding,
|
97
|
+
$border:true,
|
98
|
+
$border-style:$reveal-border-style,
|
99
|
+
$border-width:$reveal-border-width,
|
100
|
+
$border-color:$reveal-border-color,
|
101
|
+
$box-shadow:true,
|
102
|
+
$top-offset:$reveal-position-top) {
|
103
|
+
|
104
|
+
@if $bg { background-color: $bg; }
|
105
|
+
@if $padding { padding: $padding; }
|
106
|
+
|
107
|
+
@if $border { border: $border-style $border-width $border-color; }
|
108
|
+
|
109
|
+
// We can choose whether or not to include the default box-shadow.
|
110
|
+
@if $box-shadow {
|
111
|
+
@if $experimental {
|
112
|
+
-webkit-box-shadow: $reveal-box-shadow;
|
113
|
+
}
|
114
|
+
box-shadow: $reveal-box-shadow;
|
115
|
+
}
|
116
|
+
|
117
|
+
@if $top-offset { top: $top-offset; }
|
118
|
+
}
|
119
|
+
|
120
|
+
// We use this to create a close button for the reveal modal
|
121
|
+
//
|
122
|
+
// $color - Default: $reveal-close-color || #aaa
|
123
|
+
@mixin reveal-close($color:$reveal-close-color) {
|
124
|
+
font-size: $reveal-close-font-size;
|
125
|
+
line-height: 1;
|
126
|
+
position: absolute;
|
127
|
+
top: $reveal-close-top;
|
128
|
+
#{$opposite-direction}: $reveal-close-side;
|
129
|
+
color: $color;
|
130
|
+
font-weight: $reveal-close-weight;
|
131
|
+
cursor: $cursor-pointer-value;
|
132
|
+
}
|
133
|
+
|
134
|
+
@include exports("reveal") {
|
135
|
+
@if $include-html-reveal-classes {
|
136
|
+
|
137
|
+
// Reveal Modals
|
138
|
+
.reveal-modal-bg { @include reveal-bg; }
|
139
|
+
|
140
|
+
.#{$reveal-modal-class} {
|
141
|
+
@include reveal-modal-base;
|
142
|
+
@include reveal-modal-style;
|
143
|
+
|
144
|
+
.#{$close-reveal-modal-class} { @include reveal-close; }
|
145
|
+
}
|
146
|
+
|
147
|
+
@media #{$medium-up} {
|
148
|
+
|
149
|
+
.#{$reveal-modal-class} {
|
150
|
+
@include reveal-modal-style(false, rem-calc(30), false, $box-shadow: false, $top-offset: rem-calc(100));
|
151
|
+
|
152
|
+
&.tiny { @include reveal-modal-base(false, 30%); }
|
153
|
+
&.small { @include reveal-modal-base(false, 40%); }
|
154
|
+
&.medium { @include reveal-modal-base(false, 60%); }
|
155
|
+
&.large { @include reveal-modal-base(false, 70%); }
|
156
|
+
&.xlarge { @include reveal-modal-base(false, 95%); }
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
// Reveal Print Styles
|
161
|
+
@media print {
|
162
|
+
.#{$reveal-modal-class} {background: #fff !important;}
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|