fastfood 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 +2 -0
- data/.travis.yml +26 -0
- data/Gemfile +3 -0
- data/LICENSE +21 -0
- data/README.md +18 -0
- data/Rakefile +12 -0
- data/app/assets/stylesheets/_fastfood.scss +48 -0
- data/app/assets/stylesheets/fastfood/_alerts.scss +73 -0
- data/app/assets/stylesheets/fastfood/_badges.scss +68 -0
- data/app/assets/stylesheets/fastfood/_breadcrumbs.scss +26 -0
- data/app/assets/stylesheets/fastfood/_button-groups.scss +243 -0
- data/app/assets/stylesheets/fastfood/_buttons.scss +160 -0
- data/app/assets/stylesheets/fastfood/_carousel.scss +269 -0
- data/app/assets/stylesheets/fastfood/_close.scss +36 -0
- data/app/assets/stylesheets/fastfood/_code.scss +69 -0
- data/app/assets/stylesheets/fastfood/_component-animations.scss +37 -0
- data/app/assets/stylesheets/fastfood/_dropdowns.scss +214 -0
- data/app/assets/stylesheets/fastfood/_forms.scss +578 -0
- data/app/assets/stylesheets/fastfood/_grid.scss +85 -0
- data/app/assets/stylesheets/fastfood/_input-groups.scss +166 -0
- data/app/assets/stylesheets/fastfood/_jumbotron.scss +50 -0
- data/app/assets/stylesheets/fastfood/_labels.scss +66 -0
- data/app/assets/stylesheets/fastfood/_list-group.scss +124 -0
- data/app/assets/stylesheets/fastfood/_media.scss +61 -0
- data/app/assets/stylesheets/fastfood/_mixins.scss +39 -0
- data/app/assets/stylesheets/fastfood/_modals.scss +150 -0
- data/app/assets/stylesheets/fastfood/_navbar.scss +664 -0
- data/app/assets/stylesheets/fastfood/_navs.scss +242 -0
- data/app/assets/stylesheets/fastfood/_normalize.scss +427 -0
- data/app/assets/stylesheets/fastfood/_pager.scss +54 -0
- data/app/assets/stylesheets/fastfood/_pagination.scss +88 -0
- data/app/assets/stylesheets/fastfood/_panels.scss +265 -0
- data/app/assets/stylesheets/fastfood/_popovers.scss +135 -0
- data/app/assets/stylesheets/fastfood/_print.scss +107 -0
- data/app/assets/stylesheets/fastfood/_progress-bars.scss +87 -0
- data/app/assets/stylesheets/fastfood/_responsive-embed.scss +35 -0
- data/app/assets/stylesheets/fastfood/_responsive-utilities.scss +177 -0
- data/app/assets/stylesheets/fastfood/_scaffolding.scss +204 -0
- data/app/assets/stylesheets/fastfood/_tables.scss +234 -0
- data/app/assets/stylesheets/fastfood/_theme.scss +273 -0
- data/app/assets/stylesheets/fastfood/_thumbnails.scss +38 -0
- data/app/assets/stylesheets/fastfood/_tooltip.scss +102 -0
- data/app/assets/stylesheets/fastfood/_type.scss +306 -0
- data/app/assets/stylesheets/fastfood/_utilities.scss +73 -0
- data/app/assets/stylesheets/fastfood/_wells.scss +29 -0
- data/app/assets/stylesheets/fastfood/mixins/_alerts.scss +14 -0
- data/app/assets/stylesheets/fastfood/mixins/_background-variant.scss +11 -0
- data/app/assets/stylesheets/fastfood/mixins/_border-radius.scss +18 -0
- data/app/assets/stylesheets/fastfood/mixins/_buttons.scss +52 -0
- data/app/assets/stylesheets/fastfood/mixins/_center-block.scss +7 -0
- data/app/assets/stylesheets/fastfood/mixins/_clearfix.scss +22 -0
- data/app/assets/stylesheets/fastfood/mixins/_forms.scss +88 -0
- data/app/assets/stylesheets/fastfood/mixins/_gradients.scss +58 -0
- data/app/assets/stylesheets/fastfood/mixins/_grid-framework.scss +81 -0
- data/app/assets/stylesheets/fastfood/mixins/_grid.scss +123 -0
- data/app/assets/stylesheets/fastfood/mixins/_hide-text.scss +21 -0
- data/app/assets/stylesheets/fastfood/mixins/_image.scss +33 -0
- data/app/assets/stylesheets/fastfood/mixins/_labels.scss +12 -0
- data/app/assets/stylesheets/fastfood/mixins/_list-group.scss +31 -0
- data/app/assets/stylesheets/fastfood/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/fastfood/mixins/_nav-vertical-align.scss +9 -0
- data/app/assets/stylesheets/fastfood/mixins/_opacity.scss +8 -0
- data/app/assets/stylesheets/fastfood/mixins/_pagination.scss +23 -0
- data/app/assets/stylesheets/fastfood/mixins/_panels.scss +24 -0
- data/app/assets/stylesheets/fastfood/mixins/_progress-bar.scss +10 -0
- data/app/assets/stylesheets/fastfood/mixins/_reset-filter.scss +8 -0
- data/app/assets/stylesheets/fastfood/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/fastfood/mixins/_responsive-visibility.scss +21 -0
- data/app/assets/stylesheets/fastfood/mixins/_size.scss +10 -0
- data/app/assets/stylesheets/fastfood/mixins/_tab-focus.scss +9 -0
- data/app/assets/stylesheets/fastfood/mixins/_table-row.scss +28 -0
- data/app/assets/stylesheets/fastfood/mixins/_text-emphasis.scss +11 -0
- data/app/assets/stylesheets/fastfood/mixins/_text-overflow.scss +8 -0
- data/app/assets/stylesheets/fastfood/mixins/_vendor-prefixes.scss +222 -0
- data/bin/fastfood +6 -0
- data/fastfood.gemspec +30 -0
- data/lib/.gitkeep +0 -0
- data/lib/fastfood.rb +28 -0
- data/lib/fastfood/engine.rb +5 -0
- data/lib/fastfood/generator.rb +80 -0
- data/lib/fastfood/version.rb +3 -0
- data/lib/tasks/install.rake +20 -0
- metadata +225 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 8e5d5f68d1426501d5432024c2ac9b66ee244411
|
|
4
|
+
data.tar.gz: a199d749bfa280befc6209a2c4c3b68f4bca593d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 32228eb4dedebffba9842247f3c0a1d03fa52507eac2856d885b316963d6f2665328d29110e8efad38f7c6bffae221bc3067c88aeb71698c5abfcb459df41cea
|
|
7
|
+
data.tar.gz: 74dc359461d9b4467cc20235c9ba07eb59b5ea6e3804a8280a5f0e23a358683c978c9d35d6e96d8831064868852e9262544426bf9a5c4e88c87bdb859a6215b9
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
language: ruby
|
|
2
|
+
rvm:
|
|
3
|
+
- 2.2.1
|
|
4
|
+
|
|
5
|
+
script:
|
|
6
|
+
- gem build fastfood.gemspec
|
|
7
|
+
- gem install fastfood*.gem
|
|
8
|
+
|
|
9
|
+
after_script:
|
|
10
|
+
- rvm --version
|
|
11
|
+
- ruby --version
|
|
12
|
+
- gem --version
|
|
13
|
+
|
|
14
|
+
deploy:
|
|
15
|
+
provider: rubygems
|
|
16
|
+
api_key:
|
|
17
|
+
secure: j1lu+5cJpFMgfn40IkA/iB+d52FeHiIRn5/LPpY5xoq4KNJRA5TbCJISurYblABhaRGgmKdIrYF06ZQcjr1QomPVrdzNHwMDEc6UndSRJLNKI7LV6SrGvx5m0PbvUacpeja8jaelWo3+YWtj9ItG8GtEc8/Vu1YkeEcctz8KtGlvtN6zftHoYU85wdKyFl0duskMgahPDVGIbLnRKSmn1W2gGtnCX6kD3rP6l/6n3IO1ISnPINL0qT0s6KOp1ChcMJfdGm1jUMareH92rkUbP9iM2amP/zG9gEZRckY8SweFrHEckUbGasedz6ma1pGTzzolE9QIVBhPYejgjj+ArXe4iYhXYy8ZoTSW9I5s2L+G29H+hWCj5KleZVpOP8ruotu67DXsMbTmM4C94qhqs9vWetTmZMKFCVfF0ZtJmdstxAUGyiyV6v7LrODCv7mTenXR1f6ZDGxbMWcFq+Fcx7JMwdEBN0QnPFg/LC42MpE8F0nfMVtcrXrLMyG5u/YhHJL+Q0+Mb8pJQdLhTPZMEBw/OalEoZGZET+I7e68WmPB62ekc22ULj4YS5JqguvthPlwKlgF5EKAWkQswuhiYqZRerso+L6p3q0F5KElTB3WmYgehX/2KNk9oltAgPMJwvIGL32KCzudrMSTYr4C5VHcX22zY4IZd1V3L6AK13c=
|
|
18
|
+
gemspec: fastfood.gemspec
|
|
19
|
+
on:
|
|
20
|
+
branch: master
|
|
21
|
+
|
|
22
|
+
notifications:
|
|
23
|
+
email:
|
|
24
|
+
recipients:
|
|
25
|
+
- flavertonrodrigues@gmail.com
|
|
26
|
+
on_success: always
|
data/Gemfile
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Flaverton Rodrigues Rosa <contato@flaverton.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# FastFood
|
|
2
|
+
|
|
3
|
+
A ideia inicial é que se tenha um kit de interface pronto, que somente troque as tipografia e cores. Então a proposta é, versione somente o arquivo que guarda suas variáveis com estas informações, todo resto é mantido na gem.
|
|
4
|
+
|
|
5
|
+
This project is based on work of:
|
|
6
|
+
|
|
7
|
+
- [Twitter Bootstrap](https://github.com/twbs/bootstrap)
|
|
8
|
+
- [Thoughtbot Bourbon](https://github.com/thoughtbot/bourbon)
|
|
9
|
+
|
|
10
|
+
Muito obrigado!
|
|
11
|
+
|
|
12
|
+
## Todo
|
|
13
|
+
|
|
14
|
+
[ ] Generate `fastfood_variables.scss` file as inicial template
|
|
15
|
+
|
|
16
|
+
## References
|
|
17
|
+
- [Import of “bourbon” doesn't work in Jekyll setup](http://stackoverflow.com/questions/24548223/import-of-bourbon-doesnt-work-in-jekyll-setup)
|
|
18
|
+
- [RubyGems - Make your own gem](http://guides.rubygems.org/make-your-own-gem/)
|
data/Rakefile
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
# encoding: utf-8
|
|
3
|
+
require "rubygems"
|
|
4
|
+
require "bundler"
|
|
5
|
+
require "cucumber/rake/task"
|
|
6
|
+
require "rspec/core/rake_task"
|
|
7
|
+
|
|
8
|
+
Bundler::GemHelper.install_tasks
|
|
9
|
+
Cucumber::Rake::Task.new
|
|
10
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
11
|
+
|
|
12
|
+
task :default => [:spec, :cucumber]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Mixins
|
|
2
|
+
@import "fastfood/mixins";
|
|
3
|
+
|
|
4
|
+
// Reset and dependencies
|
|
5
|
+
@import "fastfood/normalize";
|
|
6
|
+
@import "fastfood/print";
|
|
7
|
+
|
|
8
|
+
// Core CSS
|
|
9
|
+
@import "fastfood/scaffolding";
|
|
10
|
+
@import "fastfood/type";
|
|
11
|
+
@import "fastfood/code";
|
|
12
|
+
@import "fastfood/grid";
|
|
13
|
+
@import "fastfood/tables";
|
|
14
|
+
@import "fastfood/forms";
|
|
15
|
+
@import "fastfood/buttons";
|
|
16
|
+
|
|
17
|
+
// Components
|
|
18
|
+
@import "fastfood/component-animations";
|
|
19
|
+
@import "fastfood/dropdowns";
|
|
20
|
+
@import "fastfood/button-groups";
|
|
21
|
+
@import "fastfood/input-groups";
|
|
22
|
+
@import "fastfood/navs";
|
|
23
|
+
@import "fastfood/navbar";
|
|
24
|
+
@import "fastfood/breadcrumbs";
|
|
25
|
+
@import "fastfood/pagination";
|
|
26
|
+
@import "fastfood/pager";
|
|
27
|
+
@import "fastfood/labels";
|
|
28
|
+
@import "fastfood/badges";
|
|
29
|
+
@import "fastfood/jumbotron";
|
|
30
|
+
@import "fastfood/thumbnails";
|
|
31
|
+
@import "fastfood/alerts";
|
|
32
|
+
@import "fastfood/progress-bars";
|
|
33
|
+
@import "fastfood/media";
|
|
34
|
+
@import "fastfood/list-group";
|
|
35
|
+
@import "fastfood/panels";
|
|
36
|
+
@import "fastfood/responsive-embed";
|
|
37
|
+
@import "fastfood/wells";
|
|
38
|
+
@import "fastfood/close";
|
|
39
|
+
|
|
40
|
+
// Components w/ JavaScript
|
|
41
|
+
@import "fastfood/modals";
|
|
42
|
+
@import "fastfood/tooltip";
|
|
43
|
+
@import "fastfood/popovers";
|
|
44
|
+
@import "fastfood/carousel";
|
|
45
|
+
|
|
46
|
+
// Utility classes
|
|
47
|
+
@import "fastfood/utilities";
|
|
48
|
+
@import "fastfood/responsive-utilities";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Alerts
|
|
3
|
+
// --------------------------------------------------
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
// Base styles
|
|
7
|
+
// -------------------------
|
|
8
|
+
|
|
9
|
+
.alert {
|
|
10
|
+
padding: $alert-padding;
|
|
11
|
+
margin-bottom: $line-height-computed;
|
|
12
|
+
border: 1px solid transparent;
|
|
13
|
+
border-radius: $alert-border-radius;
|
|
14
|
+
|
|
15
|
+
// Headings for larger alerts
|
|
16
|
+
h4 {
|
|
17
|
+
margin-top: 0;
|
|
18
|
+
// Specified for the h4 to prevent conflicts of changing $headings-color
|
|
19
|
+
color: inherit;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Provide class for links that match alerts
|
|
23
|
+
.alert-link {
|
|
24
|
+
font-weight: $alert-link-font-weight;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Improve alignment and spacing of inner content
|
|
28
|
+
> p,
|
|
29
|
+
> ul {
|
|
30
|
+
margin-bottom: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
> p + p {
|
|
34
|
+
margin-top: 5px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Dismissible alerts
|
|
39
|
+
//
|
|
40
|
+
// Expand the right padding and account for the close button's positioning.
|
|
41
|
+
|
|
42
|
+
.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
|
|
43
|
+
.alert-dismissible {
|
|
44
|
+
padding-right: ($alert-padding + 20);
|
|
45
|
+
|
|
46
|
+
// Adjust close link position
|
|
47
|
+
.close {
|
|
48
|
+
position: relative;
|
|
49
|
+
top: -2px;
|
|
50
|
+
right: -21px;
|
|
51
|
+
color: inherit;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Alternate styles
|
|
56
|
+
//
|
|
57
|
+
// Generate contextual modifier classes for colorizing the alert.
|
|
58
|
+
|
|
59
|
+
.alert-success {
|
|
60
|
+
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.alert-info {
|
|
64
|
+
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.alert-warning {
|
|
68
|
+
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.alert-danger {
|
|
72
|
+
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
|
|
73
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Badges
|
|
3
|
+
// --------------------------------------------------
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
// Base class
|
|
7
|
+
.badge {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
min-width: 10px;
|
|
10
|
+
padding: 3px 7px;
|
|
11
|
+
font-size: $font-size-small;
|
|
12
|
+
font-weight: $badge-font-weight;
|
|
13
|
+
color: $badge-color;
|
|
14
|
+
line-height: $badge-line-height;
|
|
15
|
+
vertical-align: baseline;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
text-align: center;
|
|
18
|
+
background-color: $badge-bg;
|
|
19
|
+
border-radius: $badge-border-radius;
|
|
20
|
+
|
|
21
|
+
// Empty badges collapse automatically (not available in IE8)
|
|
22
|
+
&:empty {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Quick fix for badges in buttons
|
|
27
|
+
.btn & {
|
|
28
|
+
position: relative;
|
|
29
|
+
top: -1px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.btn-xs &,
|
|
33
|
+
.btn-group-xs > .btn & {
|
|
34
|
+
top: 0;
|
|
35
|
+
padding: 1px 5px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// [converter] extracted a& to a.badge
|
|
39
|
+
|
|
40
|
+
// Account for badges in navs
|
|
41
|
+
.list-group-item.active > &,
|
|
42
|
+
.nav-pills > .active > a > & {
|
|
43
|
+
color: $badge-active-color;
|
|
44
|
+
background-color: $badge-active-bg;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.list-group-item > & {
|
|
48
|
+
float: right;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.list-group-item > & + & {
|
|
52
|
+
margin-right: 5px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.nav-pills > li > a > & {
|
|
56
|
+
margin-left: 3px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Hover state, but only for links
|
|
61
|
+
a.badge {
|
|
62
|
+
&:hover,
|
|
63
|
+
&:focus {
|
|
64
|
+
color: $badge-link-hover-color;
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Breadcrumbs
|
|
3
|
+
// --------------------------------------------------
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.breadcrumb {
|
|
7
|
+
padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal;
|
|
8
|
+
margin-bottom: $line-height-computed;
|
|
9
|
+
list-style: none;
|
|
10
|
+
background-color: $breadcrumb-bg;
|
|
11
|
+
border-radius: $border-radius-base;
|
|
12
|
+
|
|
13
|
+
> li {
|
|
14
|
+
display: inline-block;
|
|
15
|
+
|
|
16
|
+
+ li:before {
|
|
17
|
+
content: "#{$breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
|
|
18
|
+
padding: 0 5px;
|
|
19
|
+
color: $breadcrumb-color;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
> .active {
|
|
24
|
+
color: $breadcrumb-active-color;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Button groups
|
|
3
|
+
// --------------------------------------------------
|
|
4
|
+
|
|
5
|
+
// Make the div behave like a button
|
|
6
|
+
.btn-group,
|
|
7
|
+
.btn-group-vertical {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: inline-block;
|
|
10
|
+
vertical-align: middle; // match .btn alignment given font-size hack above
|
|
11
|
+
> .btn {
|
|
12
|
+
position: relative;
|
|
13
|
+
float: left;
|
|
14
|
+
// Bring the "active" button to the front
|
|
15
|
+
&:hover,
|
|
16
|
+
&:focus,
|
|
17
|
+
&:active,
|
|
18
|
+
&.active {
|
|
19
|
+
z-index: 2;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Prevent double borders when buttons are next to each other
|
|
25
|
+
.btn-group {
|
|
26
|
+
.btn + .btn,
|
|
27
|
+
.btn + .btn-group,
|
|
28
|
+
.btn-group + .btn,
|
|
29
|
+
.btn-group + .btn-group {
|
|
30
|
+
margin-left: -1px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Optional: Group multiple button groups together for a toolbar
|
|
35
|
+
.btn-toolbar {
|
|
36
|
+
margin-left: -5px; // Offset the first child's margin
|
|
37
|
+
@include clearfix;
|
|
38
|
+
|
|
39
|
+
.btn-group,
|
|
40
|
+
.input-group {
|
|
41
|
+
float: left;
|
|
42
|
+
}
|
|
43
|
+
> .btn,
|
|
44
|
+
> .btn-group,
|
|
45
|
+
> .input-group {
|
|
46
|
+
margin-left: 5px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
|
51
|
+
border-radius: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
|
|
55
|
+
.btn-group > .btn:first-child {
|
|
56
|
+
margin-left: 0;
|
|
57
|
+
&:not(:last-child):not(.dropdown-toggle) {
|
|
58
|
+
@include border-right-radius(0);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
|
|
62
|
+
.btn-group > .btn:last-child:not(:first-child),
|
|
63
|
+
.btn-group > .dropdown-toggle:not(:first-child) {
|
|
64
|
+
@include border-left-radius(0);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
|
|
68
|
+
.btn-group > .btn-group {
|
|
69
|
+
float: left;
|
|
70
|
+
}
|
|
71
|
+
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
|
|
72
|
+
border-radius: 0;
|
|
73
|
+
}
|
|
74
|
+
.btn-group > .btn-group:first-child:not(:last-child) {
|
|
75
|
+
> .btn:last-child,
|
|
76
|
+
> .dropdown-toggle {
|
|
77
|
+
@include border-right-radius(0);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
|
|
81
|
+
@include border-left-radius(0);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// On active and open, don't show outline
|
|
85
|
+
.btn-group .dropdown-toggle:active,
|
|
86
|
+
.btn-group.open .dropdown-toggle {
|
|
87
|
+
outline: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
// Sizing
|
|
92
|
+
//
|
|
93
|
+
// Remix the default button sizing classes into new ones for easier manipulation.
|
|
94
|
+
|
|
95
|
+
.btn-group-xs > .btn { @extend .btn-xs; }
|
|
96
|
+
.btn-group-sm > .btn { @extend .btn-sm; }
|
|
97
|
+
.btn-group-lg > .btn { @extend .btn-lg; }
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
// Split button dropdowns
|
|
101
|
+
// ----------------------
|
|
102
|
+
|
|
103
|
+
// Give the line between buttons some depth
|
|
104
|
+
.btn-group > .btn + .dropdown-toggle {
|
|
105
|
+
padding-left: 8px;
|
|
106
|
+
padding-right: 8px;
|
|
107
|
+
}
|
|
108
|
+
.btn-group > .btn-lg + .dropdown-toggle {
|
|
109
|
+
padding-left: 12px;
|
|
110
|
+
padding-right: 12px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// The clickable button for toggling the menu
|
|
114
|
+
// Remove the gradient and set the same inset shadow as the :active state
|
|
115
|
+
.btn-group.open .dropdown-toggle {
|
|
116
|
+
@include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
|
117
|
+
|
|
118
|
+
// Show no shadow for `.btn-link` since it has no other button styles.
|
|
119
|
+
&.btn-link {
|
|
120
|
+
@include box-shadow(none);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
// Reposition the caret
|
|
126
|
+
.btn .caret {
|
|
127
|
+
margin-left: 0;
|
|
128
|
+
}
|
|
129
|
+
// Carets in other button sizes
|
|
130
|
+
.btn-lg .caret {
|
|
131
|
+
border-width: $caret-width-large $caret-width-large 0;
|
|
132
|
+
border-bottom-width: 0;
|
|
133
|
+
}
|
|
134
|
+
// Upside down carets for .dropup
|
|
135
|
+
.dropup .btn-lg .caret {
|
|
136
|
+
border-width: 0 $caret-width-large $caret-width-large;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
// Vertical button groups
|
|
141
|
+
// ----------------------
|
|
142
|
+
|
|
143
|
+
.btn-group-vertical {
|
|
144
|
+
> .btn,
|
|
145
|
+
> .btn-group,
|
|
146
|
+
> .btn-group > .btn {
|
|
147
|
+
display: block;
|
|
148
|
+
float: none;
|
|
149
|
+
width: 100%;
|
|
150
|
+
max-width: 100%;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Clear floats so dropdown menus can be properly placed
|
|
154
|
+
> .btn-group {
|
|
155
|
+
@include clearfix;
|
|
156
|
+
> .btn {
|
|
157
|
+
float: none;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
> .btn + .btn,
|
|
162
|
+
> .btn + .btn-group,
|
|
163
|
+
> .btn-group + .btn,
|
|
164
|
+
> .btn-group + .btn-group {
|
|
165
|
+
margin-top: -1px;
|
|
166
|
+
margin-left: 0;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.btn-group-vertical > .btn {
|
|
171
|
+
&:not(:first-child):not(:last-child) {
|
|
172
|
+
border-radius: 0;
|
|
173
|
+
}
|
|
174
|
+
&:first-child:not(:last-child) {
|
|
175
|
+
border-top-right-radius: $border-radius-base;
|
|
176
|
+
@include border-bottom-radius(0);
|
|
177
|
+
}
|
|
178
|
+
&:last-child:not(:first-child) {
|
|
179
|
+
border-bottom-left-radius: $border-radius-base;
|
|
180
|
+
@include border-top-radius(0);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
|
|
184
|
+
border-radius: 0;
|
|
185
|
+
}
|
|
186
|
+
.btn-group-vertical > .btn-group:first-child:not(:last-child) {
|
|
187
|
+
> .btn:last-child,
|
|
188
|
+
> .dropdown-toggle {
|
|
189
|
+
@include border-bottom-radius(0);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
|
|
193
|
+
@include border-top-radius(0);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
// Justified button groups
|
|
198
|
+
// ----------------------
|
|
199
|
+
|
|
200
|
+
.btn-group-justified {
|
|
201
|
+
display: table;
|
|
202
|
+
width: 100%;
|
|
203
|
+
table-layout: fixed;
|
|
204
|
+
border-collapse: separate;
|
|
205
|
+
> .btn,
|
|
206
|
+
> .btn-group {
|
|
207
|
+
float: none;
|
|
208
|
+
display: table-cell;
|
|
209
|
+
width: 1%;
|
|
210
|
+
}
|
|
211
|
+
> .btn-group .btn {
|
|
212
|
+
width: 100%;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
> .btn-group .dropdown-menu {
|
|
216
|
+
left: auto;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
// Checkbox and radio options
|
|
222
|
+
//
|
|
223
|
+
// In order to support the browser's form validation feedback, powered by the
|
|
224
|
+
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
|
|
225
|
+
// `display: none;` or `visibility: hidden;` as that also hides the popover.
|
|
226
|
+
// Simply visually hiding the inputs via `opacity` would leave them clickable in
|
|
227
|
+
// certain cases which is prevented by using `clip` and `pointer-events`.
|
|
228
|
+
// This way, we ensure a DOM element is visible to position the popover from.
|
|
229
|
+
//
|
|
230
|
+
// See https://github.com/twbs/bootstrap/pull/12794 and
|
|
231
|
+
// https://github.com/twbs/bootstrap/pull/14559 for more information.
|
|
232
|
+
|
|
233
|
+
[data-toggle="buttons"] {
|
|
234
|
+
> .btn,
|
|
235
|
+
> .btn-group > .btn {
|
|
236
|
+
input[type="radio"],
|
|
237
|
+
input[type="checkbox"] {
|
|
238
|
+
position: absolute;
|
|
239
|
+
clip: rect(0,0,0,0);
|
|
240
|
+
pointer-events: none;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|