flipper-ui 0.16.1 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/docs/ui/README.md +34 -24
- data/docs/ui/images/banner.png +0 -0
- data/docs/ui/images/description.png +0 -0
- data/docs/ui/images/feature.png +0 -0
- data/docs/ui/images/features.png +0 -0
- data/examples/ui/basic.ru +20 -0
- data/flipper-ui.gemspec +1 -2
- data/lib/flipper/ui.rb +4 -7
- data/lib/flipper/ui/action.rb +3 -6
- data/lib/flipper/ui/actions/feature.rb +5 -2
- data/lib/flipper/ui/actions/features.rb +14 -1
- data/lib/flipper/ui/actions/file.rb +1 -1
- data/lib/flipper/ui/assets/javascripts/application.coffee +5 -3
- data/lib/flipper/ui/configuration.rb +34 -10
- data/lib/flipper/ui/decorators/feature.rb +39 -13
- data/lib/flipper/ui/public/css/application.css +20 -6493
- data/lib/flipper/ui/public/js/application.js +5 -5
- data/lib/flipper/ui/util.rb +40 -0
- data/lib/flipper/ui/views/add_actor.erb +2 -2
- data/lib/flipper/ui/views/add_feature.erb +2 -2
- data/lib/flipper/ui/views/add_group.erb +1 -1
- data/lib/flipper/ui/views/feature.erb +199 -180
- data/lib/flipper/ui/views/features.erb +55 -36
- data/lib/flipper/ui/views/layout.erb +4 -14
- data/lib/flipper/version.rb +1 -1
- data/spec/flipper/ui/actions/actors_gate_spec.rb +9 -13
- data/spec/flipper/ui/actions/feature_spec.rb +14 -16
- data/spec/flipper/ui/actions/features_spec.rb +49 -14
- data/spec/flipper/ui/actions/file_spec.rb +0 -10
- data/spec/flipper/ui/actions/groups_gate_spec.rb +0 -6
- data/spec/flipper/ui/actions/percentage_of_actors_gate_spec.rb +0 -2
- data/spec/flipper/ui/actions/percentage_of_time_gate_spec.rb +0 -2
- data/spec/flipper/ui/configuration_spec.rb +69 -34
- data/spec/flipper/ui/decorators/feature_spec.rb +2 -32
- data/spec/flipper/ui_spec.rb +1 -1
- metadata +19 -131
- data/docs/ui/images/configured-ui.png +0 -0
- data/docs/ui/images/environment-banner.png +0 -0
- data/lib/flipper/ui/assets/stylesheets/.DS_Store +0 -0
- data/lib/flipper/ui/assets/stylesheets/application.scss +0 -19
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_alert.scss +0 -51
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_badge.scss +0 -47
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_breadcrumb.scss +0 -38
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_button-group.scss +0 -166
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_buttons.scss +0 -143
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_card.scss +0 -270
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_carousel.scss +0 -191
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_close.scss +0 -34
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_code.scss +0 -56
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_custom-forms.scss +0 -297
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_dropdown.scss +0 -131
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_forms.scss +0 -333
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_functions.scss +0 -86
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_grid.scss +0 -52
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_images.scss +0 -42
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_input-group.scss +0 -159
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_jumbotron.scss +0 -16
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_list-group.scss +0 -115
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_mixins.scss +0 -42
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_modal.scss +0 -168
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_nav.scss +0 -118
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_navbar.scss +0 -311
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_pagination.scss +0 -77
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_popover.scss +0 -183
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_print.scss +0 -124
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_progress.scss +0 -33
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_reboot.scss +0 -482
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_root.scss +0 -19
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_tables.scss +0 -180
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_tooltip.scss +0 -115
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_transitions.scss +0 -36
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_type.scss +0 -125
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_utilities.scss +0 -14
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_variables.scss +0 -894
- data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-grid.scss +0 -32
- data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-reboot.scss +0 -12
- data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap.scss +0 -42
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -13
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -12
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_border-radius.scss +0 -35
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +0 -5
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +0 -123
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_buttons.scss +0 -109
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_caret.scss +0 -65
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_clearfix.scss +0 -7
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_float.scss +0 -11
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_forms.scss +0 -137
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_gradients.scss +0 -45
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -67
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid.scss +0 -52
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -39
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_image.scss +0 -36
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_list-group.scss +0 -21
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_lists.scss +0 -7
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_pagination.scss +0 -22
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_reset-text.scss +0 -17
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_resize.scss +0 -6
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -35
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_size.scss +0 -6
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -30
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -14
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -9
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +0 -8
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_transition.scss +0 -9
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -7
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -59
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_clearfix.scss +0 -3
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_display.scss +0 -38
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -52
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -46
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_float.scss +0 -9
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_position.scss +0 -36
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -12
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -51
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_text.scss +0 -52
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -11
- data/lib/flipper/ui/assets/stylesheets/primer/.scss-lint.yml +0 -446
- data/lib/flipper/ui/assets/stylesheets/primer/_alerts.scss +0 -106
- data/lib/flipper/ui/assets/stylesheets/primer/_avatars.scss +0 -36
- data/lib/flipper/ui/assets/stylesheets/primer/_base.scss +0 -40
- data/lib/flipper/ui/assets/stylesheets/primer/_blankslate.scss +0 -96
- data/lib/flipper/ui/assets/stylesheets/primer/_buttons.scss +0 -404
- data/lib/flipper/ui/assets/stylesheets/primer/_counter.scss +0 -10
- data/lib/flipper/ui/assets/stylesheets/primer/_filter-list.scss +0 -68
- data/lib/flipper/ui/assets/stylesheets/primer/_flex-table.scss +0 -20
- data/lib/flipper/ui/assets/stylesheets/primer/_forms.scss +0 -756
- data/lib/flipper/ui/assets/stylesheets/primer/_layout.scss +0 -69
- data/lib/flipper/ui/assets/stylesheets/primer/_menu.scss +0 -113
- data/lib/flipper/ui/assets/stylesheets/primer/_mixins.scss +0 -53
- data/lib/flipper/ui/assets/stylesheets/primer/_normalize.scss +0 -425
- data/lib/flipper/ui/assets/stylesheets/primer/_states.scss +0 -32
- data/lib/flipper/ui/assets/stylesheets/primer/_tabnav.scss +0 -65
- data/lib/flipper/ui/assets/stylesheets/primer/_tooltips.scss +0 -255
- data/lib/flipper/ui/assets/stylesheets/primer/_truncate.scss +0 -27
- data/lib/flipper/ui/assets/stylesheets/primer/_type.scss +0 -92
- data/lib/flipper/ui/assets/stylesheets/primer/_utility.scss +0 -73
- data/lib/flipper/ui/assets/stylesheets/primer/_variables.scss +0 -34
- data/lib/flipper/ui/assets/stylesheets/primer/primer.scss +0 -39
- data/lib/flipper/ui/eruby.rb +0 -11
- data/lib/flipper/ui/public/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/lib/flipper/ui/public/fonts/bootstrap/glyphicons-halflings-regular.svg +0 -288
- data/lib/flipper/ui/public/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/lib/flipper/ui/public/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/lib/flipper/ui/public/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/lib/flipper/ui/public/images/remove.png +0 -0
- data/lib/flipper/ui/public/octicons/octicons.less +0 -235
- data/lib/flipper/ui/public/octicons/sprockets-octicons.scss +0 -232
@@ -1,106 +0,0 @@
|
|
1
|
-
.flash-messages {
|
2
|
-
margin-top: 15px;
|
3
|
-
margin-bottom: 15px;
|
4
|
-
}
|
5
|
-
|
6
|
-
.flash,
|
7
|
-
.flash-global {
|
8
|
-
position: relative;
|
9
|
-
font-size: 14px;
|
10
|
-
line-height: 1.6;
|
11
|
-
color: #246;
|
12
|
-
background-color: #e2eef9;
|
13
|
-
border: solid 1px #bac6d3;
|
14
|
-
|
15
|
-
&.flash-warn {
|
16
|
-
color: #4c4a42;
|
17
|
-
background-color: #fff9ea;
|
18
|
-
border-color: #dfd8c2;
|
19
|
-
}
|
20
|
-
|
21
|
-
&.flash-error {
|
22
|
-
color: #911;
|
23
|
-
background-color: #fcdede;
|
24
|
-
border-color: #d2b2b2;
|
25
|
-
}
|
26
|
-
|
27
|
-
.flash-close {
|
28
|
-
float: right;
|
29
|
-
padding: 17px; // bigger hit area
|
30
|
-
margin-top: -15px; // negative margins to account for bigger padding
|
31
|
-
margin-right: -15px;
|
32
|
-
margin-left: 20px;
|
33
|
-
color: inherit;
|
34
|
-
text-decoration: none;
|
35
|
-
cursor: pointer;
|
36
|
-
opacity: 0.6;
|
37
|
-
|
38
|
-
&:hover {
|
39
|
-
opacity: 1;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
p:last-child {
|
44
|
-
margin-bottom: 0;
|
45
|
-
}
|
46
|
-
|
47
|
-
// Flashes can have an action button instead of the cross.
|
48
|
-
.flash-action {
|
49
|
-
float: right;
|
50
|
-
margin-top: -4px;
|
51
|
-
margin-left: 20px;
|
52
|
-
}
|
53
|
-
|
54
|
-
// Make links stand out
|
55
|
-
a {
|
56
|
-
font-weight: bold;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
.flash {
|
61
|
-
padding: 15px;
|
62
|
-
border-radius: 3px;
|
63
|
-
|
64
|
-
+ .flash { margin-top: 5px; }
|
65
|
-
}
|
66
|
-
|
67
|
-
// Add an icon
|
68
|
-
.flash-with-icon {
|
69
|
-
padding-left: 40px;
|
70
|
-
|
71
|
-
> .octicon {
|
72
|
-
float: left;
|
73
|
-
margin-top: 3px;
|
74
|
-
margin-left: -25px;
|
75
|
-
}
|
76
|
-
}
|
77
|
-
|
78
|
-
|
79
|
-
// Global notices
|
80
|
-
//
|
81
|
-
// Useful for site-wide banners and global notifications.
|
82
|
-
|
83
|
-
.flash-global {
|
84
|
-
padding: 10px;
|
85
|
-
margin-top: -1px;
|
86
|
-
border-width: 1px 0;
|
87
|
-
|
88
|
-
h2,
|
89
|
-
p {
|
90
|
-
margin-top: 0;
|
91
|
-
margin-bottom: 0;
|
92
|
-
font-size: 14px;
|
93
|
-
line-height: 1.4;
|
94
|
-
}
|
95
|
-
|
96
|
-
// Global flashes can have an action buttons too.
|
97
|
-
.flash-action {
|
98
|
-
margin-top: 5px;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
// Content within flash messages.
|
103
|
-
.flash-title {
|
104
|
-
margin-top: 0;
|
105
|
-
margin-bottom: 5px;
|
106
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
.avatar {
|
2
|
-
display: inline-block;
|
3
|
-
overflow: hidden; // Ensure page layout in Firefox should images fail to load
|
4
|
-
line-height: 1;
|
5
|
-
vertical-align: middle;
|
6
|
-
border-radius: 3px;
|
7
|
-
}
|
8
|
-
|
9
|
-
.avatar-small { border-radius: 2px; }
|
10
|
-
|
11
|
-
.avatar-link {
|
12
|
-
float: left;
|
13
|
-
line-height: 1;
|
14
|
-
}
|
15
|
-
|
16
|
-
// User for example on /stars and /user for grids of avatars
|
17
|
-
.avatar-group-item {
|
18
|
-
display: inline-block;
|
19
|
-
margin-bottom: 3px;
|
20
|
-
}
|
21
|
-
|
22
|
-
// .avatar-parent-child is when you see a small avatar at the bottom right
|
23
|
-
// corner of a larger avatar.
|
24
|
-
//
|
25
|
-
// No Styleguide version
|
26
|
-
.avatar-parent-child {
|
27
|
-
position: relative;
|
28
|
-
}
|
29
|
-
|
30
|
-
.avatar-child {
|
31
|
-
position: absolute;
|
32
|
-
right: -15%;
|
33
|
-
bottom: -9%;
|
34
|
-
border-radius: 2px;
|
35
|
-
box-shadow: -2px -2px 0 rgba(255, 255, 255, 0.8);
|
36
|
-
}
|
@@ -1,40 +0,0 @@
|
|
1
|
-
* {
|
2
|
-
box-sizing: border-box;
|
3
|
-
}
|
4
|
-
|
5
|
-
input,
|
6
|
-
select,
|
7
|
-
textarea,
|
8
|
-
button {
|
9
|
-
font: #{$body-font-size}/1.4 $body-font;
|
10
|
-
}
|
11
|
-
|
12
|
-
body {
|
13
|
-
font: #{$body-font-size}/1.4 $body-font;
|
14
|
-
color: $brand-gray-dark;
|
15
|
-
background-color: #fff;
|
16
|
-
}
|
17
|
-
|
18
|
-
a {
|
19
|
-
color: $brand-blue;
|
20
|
-
text-decoration: none;
|
21
|
-
|
22
|
-
&:hover,
|
23
|
-
&:active {
|
24
|
-
text-decoration: underline;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
// Horizontal lines
|
29
|
-
//
|
30
|
-
// TODO-MDO: Remove `.rule` from everywhere and replace with `<hr>`s
|
31
|
-
hr,
|
32
|
-
.rule {
|
33
|
-
height: 0;
|
34
|
-
margin: 15px 0;
|
35
|
-
overflow: hidden;
|
36
|
-
background: transparent;
|
37
|
-
border: 0;
|
38
|
-
border-bottom: 1px solid #ddd;
|
39
|
-
@include clearfix();
|
40
|
-
}
|
@@ -1,96 +0,0 @@
|
|
1
|
-
.blankslate {
|
2
|
-
position: relative;
|
3
|
-
padding: 30px;
|
4
|
-
text-align: center;
|
5
|
-
background-color: #fafafa;
|
6
|
-
border: 1px solid #e5e5e5;
|
7
|
-
border-radius: 3px;
|
8
|
-
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
|
9
|
-
|
10
|
-
&.clean-background {
|
11
|
-
background: none;
|
12
|
-
border: 0;
|
13
|
-
box-shadow: none;
|
14
|
-
}
|
15
|
-
|
16
|
-
&.capped {
|
17
|
-
border-radius: 0 0 3px 3px;
|
18
|
-
}
|
19
|
-
|
20
|
-
&.spacious {
|
21
|
-
padding: 100px 60px 120px;
|
22
|
-
}
|
23
|
-
|
24
|
-
&.has-fixed-width {
|
25
|
-
width: 485px;
|
26
|
-
margin: 0 auto;
|
27
|
-
}
|
28
|
-
|
29
|
-
&.large-format {
|
30
|
-
h3 {
|
31
|
-
margin: 0.75em 0;
|
32
|
-
font-size: 20px;
|
33
|
-
}
|
34
|
-
|
35
|
-
p {
|
36
|
-
font-size: 16px;
|
37
|
-
|
38
|
-
&.has-fixed-width {
|
39
|
-
width: 540px;
|
40
|
-
margin: 0 auto;
|
41
|
-
text-align: left;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
.mega-octicon {
|
46
|
-
width: 40px;
|
47
|
-
height: 40px;
|
48
|
-
font-size: 40px;
|
49
|
-
color: #aaa;
|
50
|
-
}
|
51
|
-
|
52
|
-
.octicon-inbox {
|
53
|
-
font-size: 48px;
|
54
|
-
line-height: 40px;
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
code {
|
59
|
-
padding: 2px 5px 3px;
|
60
|
-
font-size: 14px;
|
61
|
-
background: #fff;
|
62
|
-
border: 1px solid #eee;
|
63
|
-
border-radius: 3px;
|
64
|
-
}
|
65
|
-
|
66
|
-
> .mega-octicon { color: #aaa; }
|
67
|
-
|
68
|
-
.mega-octicon + .mega-octicon { margin-left: 10px; }
|
69
|
-
|
70
|
-
.tabnav + & { margin-top: 20px; }
|
71
|
-
|
72
|
-
.context-loader.large-format-loader { padding-top: 50px; }
|
73
|
-
}
|
74
|
-
|
75
|
-
// Forking blank slate
|
76
|
-
.spinner-forking {
|
77
|
-
display: block;
|
78
|
-
margin: 20px auto 40px;
|
79
|
-
}
|
80
|
-
|
81
|
-
.forking-repo {
|
82
|
-
margin: 40px 0;
|
83
|
-
text-align: center;
|
84
|
-
|
85
|
-
h3 {
|
86
|
-
margin-bottom: 10px;
|
87
|
-
font-size: 28px;
|
88
|
-
font-weight: 300;
|
89
|
-
}
|
90
|
-
|
91
|
-
h4 {
|
92
|
-
margin: 0 0 30px;
|
93
|
-
font-size: 16px;
|
94
|
-
font-weight: 300;
|
95
|
-
}
|
96
|
-
}
|
@@ -1,404 +0,0 @@
|
|
1
|
-
// Shared styles
|
2
|
-
.btn {
|
3
|
-
position: relative;
|
4
|
-
display: inline-block;
|
5
|
-
padding: 6px 12px;
|
6
|
-
font-size: 13px;
|
7
|
-
font-weight: bold;
|
8
|
-
line-height: 20px;
|
9
|
-
color: #333;
|
10
|
-
white-space: nowrap;
|
11
|
-
vertical-align: middle;
|
12
|
-
cursor: pointer;
|
13
|
-
background-color: #eee;
|
14
|
-
background-image: linear-gradient(#fcfcfc, #eee);
|
15
|
-
border: 1px solid #d5d5d5;
|
16
|
-
border-radius: 3px;
|
17
|
-
user-select: none;
|
18
|
-
-webkit-appearance: none; // Corrects inability to style clickable `input` types in iOS.
|
19
|
-
|
20
|
-
i {
|
21
|
-
font-style: normal;
|
22
|
-
font-weight: 500;
|
23
|
-
opacity: 0.6;
|
24
|
-
}
|
25
|
-
|
26
|
-
.octicon {
|
27
|
-
vertical-align: text-top;
|
28
|
-
}
|
29
|
-
|
30
|
-
// Darken for just a tad more contrast against the button background
|
31
|
-
.counter {
|
32
|
-
text-shadow: none;
|
33
|
-
background-color: #e5e5e5;
|
34
|
-
}
|
35
|
-
|
36
|
-
&:focus {
|
37
|
-
text-decoration: none;
|
38
|
-
border-color: #51a7e8;
|
39
|
-
outline: none;
|
40
|
-
box-shadow: 0 0 5px rgba(81, 167, 232, 0.5);
|
41
|
-
}
|
42
|
-
|
43
|
-
&:hover,
|
44
|
-
&:active,
|
45
|
-
&.zeroclipboard-is-hover,
|
46
|
-
&.zeroclipboard-is-active {
|
47
|
-
text-decoration: none;
|
48
|
-
background-color: #ddd;
|
49
|
-
background-image: linear-gradient(#eee, #ddd);
|
50
|
-
border-color: #ccc;
|
51
|
-
}
|
52
|
-
|
53
|
-
&:active,
|
54
|
-
&.selected,
|
55
|
-
&.selected:hover,
|
56
|
-
&.zeroclipboard-is-active {
|
57
|
-
background-color: #dcdcdc;
|
58
|
-
background-image: none;
|
59
|
-
border-color: #b5b5b5;
|
60
|
-
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
|
61
|
-
}
|
62
|
-
|
63
|
-
&:disabled,
|
64
|
-
&.disabled {
|
65
|
-
&,
|
66
|
-
&:hover {
|
67
|
-
color: rgba(102, 102, 102, 0.5);
|
68
|
-
cursor: default;
|
69
|
-
background-color: rgba(229, 229, 229, 0.5);
|
70
|
-
background-image: none;
|
71
|
-
border-color: rgba(197, 197, 197, 0.5);
|
72
|
-
box-shadow: none;
|
73
|
-
}
|
74
|
-
}
|
75
|
-
}
|
76
|
-
|
77
|
-
// Green primary button
|
78
|
-
.btn-primary {
|
79
|
-
color: #fff;
|
80
|
-
text-shadow: 0 -1px 0 rgba(0,0,0,0.15);
|
81
|
-
background-color: #60b044;
|
82
|
-
background-image: linear-gradient(#8add6d, #60b044);
|
83
|
-
border-color: darken(#60b044, 2%);
|
84
|
-
|
85
|
-
.counter {
|
86
|
-
color: #60b044;
|
87
|
-
background-color: #fff;
|
88
|
-
}
|
89
|
-
|
90
|
-
&:hover {
|
91
|
-
color: #fff;
|
92
|
-
background-color: darken(#60b044, 5%);
|
93
|
-
background-image: linear-gradient(darken(#8add6d, 5%), darken(#60b044, 5%));
|
94
|
-
border-color: #4a993e;
|
95
|
-
}
|
96
|
-
|
97
|
-
&:active,
|
98
|
-
&.selected {
|
99
|
-
text-shadow: 0 1px 0 rgba(0,0,0,0.15);
|
100
|
-
background-color: darken(#60b044, 5%);
|
101
|
-
background-image: none;
|
102
|
-
border-color: darken(#4a993e, 5%);
|
103
|
-
}
|
104
|
-
|
105
|
-
&:disabled,
|
106
|
-
&.disabled {
|
107
|
-
&,
|
108
|
-
&:hover {
|
109
|
-
color: #fefefe;
|
110
|
-
background-color: #add39f;
|
111
|
-
background-image: linear-gradient(#c3ecb4, #add39f);
|
112
|
-
border-color: #b9dcac #b9dcac #a7c89b;
|
113
|
-
}
|
114
|
-
}
|
115
|
-
}
|
116
|
-
|
117
|
-
// Red danger button
|
118
|
-
.btn-danger {
|
119
|
-
color: #900;
|
120
|
-
|
121
|
-
&:hover {
|
122
|
-
color: #fff;
|
123
|
-
background-color: #b33630;
|
124
|
-
background-image: linear-gradient(#dc5f59, #b33630);
|
125
|
-
border-color: #cd504a;
|
126
|
-
}
|
127
|
-
|
128
|
-
&:active,
|
129
|
-
&.selected {
|
130
|
-
color: #fff;
|
131
|
-
background-color: #b33630;
|
132
|
-
background-image: none;
|
133
|
-
border-color: darken(#cd504a, 15%);
|
134
|
-
}
|
135
|
-
|
136
|
-
&:disabled,
|
137
|
-
&.disabled {
|
138
|
-
&,
|
139
|
-
&:hover {
|
140
|
-
color: #cb7f7f;
|
141
|
-
background-color: #efefef;
|
142
|
-
background-image: linear-gradient(#fefefe, #efefef);
|
143
|
-
border-color: #e1e1e1;
|
144
|
-
}
|
145
|
-
}
|
146
|
-
|
147
|
-
&:hover,
|
148
|
-
&:active,
|
149
|
-
&.selected {
|
150
|
-
.counter {
|
151
|
-
color: #b33630;
|
152
|
-
background-color: #fff;
|
153
|
-
}
|
154
|
-
}
|
155
|
-
}
|
156
|
-
|
157
|
-
// Outline button
|
158
|
-
//
|
159
|
-
// For when we need a linky-action that's not too heavy in busier
|
160
|
-
// areas like conversation timelines.
|
161
|
-
.btn-outline {
|
162
|
-
color: $brand-blue;
|
163
|
-
background-color: #fff; // Reset default gradient backgrounds and colors
|
164
|
-
background-image: none;
|
165
|
-
border: 1px solid #e5e5e5;
|
166
|
-
|
167
|
-
.counter {
|
168
|
-
background-color: #eee;
|
169
|
-
}
|
170
|
-
|
171
|
-
&:hover,
|
172
|
-
&:active,
|
173
|
-
&.selected,
|
174
|
-
&.selected:hover,
|
175
|
-
&.zeroclipboard-is-hover,
|
176
|
-
&.zeroclipboard-is-active {
|
177
|
-
color: #fff;
|
178
|
-
background-color: $brand-blue;
|
179
|
-
background-image: none;
|
180
|
-
border-color: $brand-blue;
|
181
|
-
|
182
|
-
.counter {
|
183
|
-
color: $brand-blue;
|
184
|
-
background-color: #fff;
|
185
|
-
}
|
186
|
-
}
|
187
|
-
|
188
|
-
&:disabled,
|
189
|
-
&.disabled {
|
190
|
-
&,
|
191
|
-
&:hover {
|
192
|
-
color: #777;
|
193
|
-
background-color: #fff;
|
194
|
-
background-image: none;
|
195
|
-
border-color: #e5e5e5;
|
196
|
-
}
|
197
|
-
}
|
198
|
-
}
|
199
|
-
|
200
|
-
// Social button count
|
201
|
-
.btn-with-count {
|
202
|
-
float: left;
|
203
|
-
border-top-right-radius: 0;
|
204
|
-
border-bottom-right-radius: 0;
|
205
|
-
}
|
206
|
-
|
207
|
-
|
208
|
-
// Minibutton overrides
|
209
|
-
//
|
210
|
-
// Tweak `line-height` to make them smaller.
|
211
|
-
.btn-sm {
|
212
|
-
padding: 2px 10px;
|
213
|
-
}
|
214
|
-
|
215
|
-
|
216
|
-
// Hidden text button
|
217
|
-
//
|
218
|
-
// Use `.hidden-text-expander` to indicate and expand hidden text.
|
219
|
-
.hidden-text-expander {
|
220
|
-
display: block;
|
221
|
-
|
222
|
-
&.inline {
|
223
|
-
position: relative;
|
224
|
-
top: -1px;
|
225
|
-
display: inline-block;
|
226
|
-
margin-left: 5px;
|
227
|
-
line-height: 0;
|
228
|
-
}
|
229
|
-
|
230
|
-
a {
|
231
|
-
display: inline-block;
|
232
|
-
height: 12px;
|
233
|
-
padding: 0 5px;
|
234
|
-
font-size: 12px;
|
235
|
-
font-weight: bold;
|
236
|
-
line-height: 6px;
|
237
|
-
color: #555;
|
238
|
-
text-decoration: none;
|
239
|
-
vertical-align: middle;
|
240
|
-
background: #ddd;
|
241
|
-
border-radius: 1px;
|
242
|
-
|
243
|
-
&:hover {
|
244
|
-
text-decoration: none;
|
245
|
-
background-color: #ccc;
|
246
|
-
}
|
247
|
-
|
248
|
-
&:active {
|
249
|
-
color: #fff;
|
250
|
-
background-color: #4183c4;
|
251
|
-
}
|
252
|
-
}
|
253
|
-
}
|
254
|
-
|
255
|
-
|
256
|
-
// Social count bubble
|
257
|
-
//
|
258
|
-
// A container that is used for social bubbles counts.
|
259
|
-
.social-count {
|
260
|
-
float: left;
|
261
|
-
padding: 2px 7px;
|
262
|
-
font-size: 11px;
|
263
|
-
font-weight: bold;
|
264
|
-
line-height: 20px;
|
265
|
-
color: $brand-gray-dark;
|
266
|
-
vertical-align: middle;
|
267
|
-
background-color: #fff;
|
268
|
-
border: 1px solid #ddd;
|
269
|
-
border-left: 0;
|
270
|
-
border-top-right-radius: 3px;
|
271
|
-
border-bottom-right-radius: 3px;
|
272
|
-
|
273
|
-
&:hover,
|
274
|
-
&:active {
|
275
|
-
text-decoration: none;
|
276
|
-
}
|
277
|
-
|
278
|
-
&:hover {
|
279
|
-
color: $brand-blue;
|
280
|
-
cursor: pointer;
|
281
|
-
}
|
282
|
-
}
|
283
|
-
|
284
|
-
|
285
|
-
// Full-width button
|
286
|
-
//
|
287
|
-
// These buttons expand to the full width of their parent container
|
288
|
-
.btn-block {
|
289
|
-
display: block;
|
290
|
-
width: 100%;
|
291
|
-
text-align: center;
|
292
|
-
}
|
293
|
-
|
294
|
-
|
295
|
-
// Button group
|
296
|
-
//
|
297
|
-
// A button group is a series of buttons laid out next to each other, all part
|
298
|
-
// of one visual button, but separated by rules to be separate.
|
299
|
-
.btn-group {
|
300
|
-
display: inline-block;
|
301
|
-
vertical-align: middle;
|
302
|
-
@include clearfix();
|
303
|
-
|
304
|
-
.btn {
|
305
|
-
position: relative;
|
306
|
-
float: left;
|
307
|
-
|
308
|
-
&:not(:first-child):not(:last-child) {
|
309
|
-
border-radius: 0;
|
310
|
-
}
|
311
|
-
|
312
|
-
&:first-child {
|
313
|
-
border-top-right-radius: 0;
|
314
|
-
border-bottom-right-radius: 0;
|
315
|
-
}
|
316
|
-
|
317
|
-
&:last-child {
|
318
|
-
border-top-left-radius: 0;
|
319
|
-
border-bottom-left-radius: 0;
|
320
|
-
}
|
321
|
-
|
322
|
-
// Bring any button into forefront for proper borders given negative margin below
|
323
|
-
&:hover,
|
324
|
-
&:focus,
|
325
|
-
&:active,
|
326
|
-
&.selected {
|
327
|
-
z-index: 2;
|
328
|
-
}
|
329
|
-
}
|
330
|
-
|
331
|
-
// Tuck buttons into one another to prevent double border
|
332
|
-
.btn + .btn {
|
333
|
-
margin-left: -1px;
|
334
|
-
box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.2);
|
335
|
-
|
336
|
-
&:hover {
|
337
|
-
box-shadow: none;
|
338
|
-
}
|
339
|
-
|
340
|
-
&:active,
|
341
|
-
&.selected {
|
342
|
-
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15);
|
343
|
-
}
|
344
|
-
}
|
345
|
-
|
346
|
-
.button_to + .button_to {
|
347
|
-
margin-left: -1px;
|
348
|
-
}
|
349
|
-
|
350
|
-
.button_to {
|
351
|
-
float: left;
|
352
|
-
|
353
|
-
.btn {
|
354
|
-
border-radius: 0;
|
355
|
-
}
|
356
|
-
|
357
|
-
&:first-child {
|
358
|
-
.btn {
|
359
|
-
border-top-left-radius: 3px;
|
360
|
-
border-bottom-left-radius: 3px;
|
361
|
-
}
|
362
|
-
}
|
363
|
-
|
364
|
-
&:last-child {
|
365
|
-
.btn {
|
366
|
-
border-top-right-radius: 3px;
|
367
|
-
border-bottom-right-radius: 3px;
|
368
|
-
}
|
369
|
-
}
|
370
|
-
}
|
371
|
-
}
|
372
|
-
|
373
|
-
// Proper spacing for multiple button groups (a la, gollum editor)
|
374
|
-
.btn-group + .btn-group,
|
375
|
-
.btn-group + .btn {
|
376
|
-
margin-left: 5px;
|
377
|
-
}
|
378
|
-
|
379
|
-
|
380
|
-
// Radio buttons
|
381
|
-
//
|
382
|
-
// Buttons backed by radio or checkbox control. Requires the use of `.hidden`
|
383
|
-
// on the `input` to properly hide it.
|
384
|
-
.btn-link {
|
385
|
-
display: inline-block;
|
386
|
-
padding: 0;
|
387
|
-
font-size: inherit;
|
388
|
-
color: $brand-blue;
|
389
|
-
white-space: nowrap;
|
390
|
-
cursor: pointer;
|
391
|
-
background-color: transparent;
|
392
|
-
border: 0;
|
393
|
-
user-select: none;
|
394
|
-
-webkit-appearance: none; // Corrects inability to style clickable `input` types in iOS.
|
395
|
-
|
396
|
-
&:hover,
|
397
|
-
&:focus {
|
398
|
-
text-decoration: underline;
|
399
|
-
}
|
400
|
-
|
401
|
-
&:focus {
|
402
|
-
outline: none; // Prevents the blue ring when clicked.
|
403
|
-
}
|
404
|
-
}
|