flipper-ui 0.12.2 → 0.13.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/docs/ui/README.md +21 -3
  3. data/docs/ui/images/configured-ui.png +0 -0
  4. data/docs/ui/images/environment-banner.png +0 -0
  5. data/docs/ui/images/feature.png +0 -0
  6. data/docs/ui/images/features.png +0 -0
  7. data/lib/flipper/ui/assets/javascripts/application.coffee +3 -0
  8. data/lib/flipper/ui/assets/stylesheets/.DS_Store +0 -0
  9. data/lib/flipper/ui/assets/stylesheets/application.scss +9 -48
  10. data/lib/flipper/ui/assets/stylesheets/bootstrap/_alert.scss +51 -0
  11. data/lib/flipper/ui/assets/stylesheets/bootstrap/_badge.scss +47 -0
  12. data/lib/flipper/ui/assets/stylesheets/bootstrap/_breadcrumb.scss +38 -0
  13. data/lib/flipper/ui/assets/stylesheets/bootstrap/_button-group.scss +166 -0
  14. data/lib/flipper/ui/assets/stylesheets/bootstrap/_buttons.scss +78 -95
  15. data/lib/flipper/ui/assets/stylesheets/bootstrap/_card.scss +270 -0
  16. data/lib/flipper/ui/assets/stylesheets/bootstrap/_carousel.scss +122 -200
  17. data/lib/flipper/ui/assets/stylesheets/bootstrap/_close.scss +12 -14
  18. data/lib/flipper/ui/assets/stylesheets/bootstrap/_code.scss +15 -28
  19. data/lib/flipper/ui/assets/stylesheets/bootstrap/_custom-forms.scss +297 -0
  20. data/lib/flipper/ui/assets/stylesheets/bootstrap/_dropdown.scss +131 -0
  21. data/lib/flipper/ui/assets/stylesheets/bootstrap/_forms.scss +210 -455
  22. data/lib/flipper/ui/assets/stylesheets/bootstrap/_functions.scss +86 -0
  23. data/lib/flipper/ui/assets/stylesheets/bootstrap/_grid.scss +29 -61
  24. data/lib/flipper/ui/assets/stylesheets/bootstrap/_images.scss +42 -0
  25. data/lib/flipper/ui/assets/stylesheets/bootstrap/_input-group.scss +159 -0
  26. data/lib/flipper/ui/assets/stylesheets/bootstrap/_jumbotron.scss +8 -42
  27. data/lib/flipper/ui/assets/stylesheets/bootstrap/_list-group.scss +64 -73
  28. data/lib/flipper/ui/assets/stylesheets/bootstrap/_media.scss +3 -56
  29. data/lib/flipper/ui/assets/stylesheets/bootstrap/_mixins.scss +21 -18
  30. data/lib/flipper/ui/assets/stylesheets/bootstrap/_modal.scss +168 -0
  31. data/lib/flipper/ui/assets/stylesheets/bootstrap/_nav.scss +118 -0
  32. data/lib/flipper/ui/assets/stylesheets/bootstrap/_navbar.scss +203 -554
  33. data/lib/flipper/ui/assets/stylesheets/bootstrap/_pagination.scss +58 -69
  34. data/lib/flipper/ui/assets/stylesheets/bootstrap/_popover.scss +183 -0
  35. data/lib/flipper/ui/assets/stylesheets/bootstrap/_print.scss +71 -54
  36. data/lib/flipper/ui/assets/stylesheets/bootstrap/_progress.scss +33 -0
  37. data/lib/flipper/ui/assets/stylesheets/bootstrap/_reboot.scss +482 -0
  38. data/lib/flipper/ui/assets/stylesheets/bootstrap/_root.scss +19 -0
  39. data/lib/flipper/ui/assets/stylesheets/bootstrap/_tables.scss +109 -163
  40. data/lib/flipper/ui/assets/stylesheets/bootstrap/_tooltip.scss +97 -84
  41. data/lib/flipper/ui/assets/stylesheets/bootstrap/_transitions.scss +36 -0
  42. data/lib/flipper/ui/assets/stylesheets/bootstrap/_type.scss +66 -239
  43. data/lib/flipper/ui/assets/stylesheets/bootstrap/_utilities.scss +14 -55
  44. data/lib/flipper/ui/assets/stylesheets/bootstrap/_variables.scss +726 -698
  45. data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-grid.scss +32 -0
  46. data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-reboot.scss +12 -0
  47. data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap.scss +42 -0
  48. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_alert.scss +13 -0
  49. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_background-variant.scss +14 -4
  50. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_badge.scss +12 -0
  51. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_border-radius.scss +25 -8
  52. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +5 -0
  53. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +123 -0
  54. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_buttons.scss +89 -32
  55. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_caret.scss +65 -0
  56. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_clearfix.scss +3 -18
  57. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_float.scss +11 -0
  58. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_forms.scss +115 -66
  59. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_gradients.scss +14 -27
  60. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +52 -66
  61. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid.scss +37 -107
  62. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_hover.scss +39 -0
  63. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_image.scss +18 -15
  64. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_list-group.scss +10 -20
  65. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
  66. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -3
  67. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +10 -0
  68. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_pagination.scss +10 -11
  69. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_reset-text.scss +17 -0
  70. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  71. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +35 -0
  72. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_size.scss +1 -5
  73. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_table-row.scss +16 -14
  74. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
  75. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-hide.scss +9 -0
  76. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/{_text-overflow.scss → _text-truncate.scss} +2 -2
  77. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_transition.scss +9 -0
  78. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_visibility.scss +7 -0
  79. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_align.scss +8 -0
  80. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_background.scss +19 -0
  81. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_borders.scss +59 -0
  82. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
  83. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_display.scss +38 -0
  84. data/lib/flipper/ui/assets/stylesheets/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +26 -9
  85. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_flex.scss +46 -0
  86. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_float.scss +9 -0
  87. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_position.scss +36 -0
  88. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
  89. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_sizing.scss +12 -0
  90. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_spacing.scss +51 -0
  91. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_text.scss +52 -0
  92. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_visibility.scss +11 -0
  93. data/lib/flipper/ui/configuration.rb +24 -0
  94. data/lib/flipper/ui/decorators/feature.rb +3 -3
  95. data/lib/flipper/ui/public/css/application.css +6237 -2339
  96. data/lib/flipper/ui/public/js/application.js +3 -2
  97. data/lib/flipper/ui/views/add_actor.erb +7 -9
  98. data/lib/flipper/ui/views/add_feature.erb +8 -10
  99. data/lib/flipper/ui/views/add_group.erb +7 -9
  100. data/lib/flipper/ui/views/feature.erb +181 -141
  101. data/lib/flipper/ui/views/feature_creation_disabled.erb +1 -1
  102. data/lib/flipper/ui/views/feature_removal_disabled.erb +1 -1
  103. data/lib/flipper/ui/views/features.erb +12 -15
  104. data/lib/flipper/ui/views/layout.erb +25 -15
  105. data/lib/flipper/version.rb +1 -1
  106. data/spec/flipper/ui/actions/actors_gate_spec.rb +2 -1
  107. data/spec/flipper/ui/actions/add_feature_spec.rb +2 -1
  108. data/spec/flipper/ui/actions/groups_gate_spec.rb +2 -1
  109. data/spec/flipper/ui/configuration_spec.rb +27 -0
  110. data/spec/flipper/ui_spec.rb +24 -0
  111. metadata +58 -64
  112. data/lib/flipper/ui/assets/stylesheets/_bootstrap-compass.scss +0 -9
  113. data/lib/flipper/ui/assets/stylesheets/_bootstrap-mincer.scss +0 -19
  114. data/lib/flipper/ui/assets/stylesheets/_bootstrap-sprockets.scss +0 -9
  115. data/lib/flipper/ui/assets/stylesheets/_bootstrap.scss +0 -50
  116. data/lib/flipper/ui/assets/stylesheets/bootstrap/_alerts.scss +0 -73
  117. data/lib/flipper/ui/assets/stylesheets/bootstrap/_badges.scss +0 -68
  118. data/lib/flipper/ui/assets/stylesheets/bootstrap/_breadcrumbs.scss +0 -26
  119. data/lib/flipper/ui/assets/stylesheets/bootstrap/_button-groups.scss +0 -243
  120. data/lib/flipper/ui/assets/stylesheets/bootstrap/_component-animations.scss +0 -37
  121. data/lib/flipper/ui/assets/stylesheets/bootstrap/_dropdowns.scss +0 -214
  122. data/lib/flipper/ui/assets/stylesheets/bootstrap/_glyphicons.scss +0 -305
  123. data/lib/flipper/ui/assets/stylesheets/bootstrap/_input-groups.scss +0 -166
  124. data/lib/flipper/ui/assets/stylesheets/bootstrap/_labels.scss +0 -66
  125. data/lib/flipper/ui/assets/stylesheets/bootstrap/_modals.scss +0 -150
  126. data/lib/flipper/ui/assets/stylesheets/bootstrap/_navs.scss +0 -242
  127. data/lib/flipper/ui/assets/stylesheets/bootstrap/_normalize.scss +0 -427
  128. data/lib/flipper/ui/assets/stylesheets/bootstrap/_pager.scss +0 -54
  129. data/lib/flipper/ui/assets/stylesheets/bootstrap/_panels.scss +0 -265
  130. data/lib/flipper/ui/assets/stylesheets/bootstrap/_popovers.scss +0 -135
  131. data/lib/flipper/ui/assets/stylesheets/bootstrap/_progress-bars.scss +0 -87
  132. data/lib/flipper/ui/assets/stylesheets/bootstrap/_responsive-utilities.scss +0 -177
  133. data/lib/flipper/ui/assets/stylesheets/bootstrap/_scaffolding.scss +0 -162
  134. data/lib/flipper/ui/assets/stylesheets/bootstrap/_theme.scss +0 -273
  135. data/lib/flipper/ui/assets/stylesheets/bootstrap/_thumbnails.scss +0 -38
  136. data/lib/flipper/ui/assets/stylesheets/bootstrap/_wells.scss +0 -29
  137. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_alerts.scss +0 -14
  138. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
  139. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
  140. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_labels.scss +0 -12
  141. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -9
  142. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_opacity.scss +0 -8
  143. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_panels.scss +0 -24
  144. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +0 -10
  145. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
  146. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -21
  147. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
  148. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
  149. data/lib/flipper/ui/public/css/primer.css +0 -1
  150. data/lib/flipper/ui/public/css/primer/primer.css +0 -1933
  151. data/lib/flipper/ui/public/css/scss/primer.css +0 -1933
  152. data/lib/flipper/ui/public/js/bootstrap-sprockets.js +0 -12
  153. data/lib/flipper/ui/public/js/bootstrap.js +0 -2317
  154. data/lib/flipper/ui/public/js/bootstrap.min.js +0 -7
  155. data/lib/flipper/ui/public/js/bootstrap/affix.js +0 -162
  156. data/lib/flipper/ui/public/js/bootstrap/alert.js +0 -94
  157. data/lib/flipper/ui/public/js/bootstrap/button.js +0 -116
  158. data/lib/flipper/ui/public/js/bootstrap/carousel.js +0 -237
  159. data/lib/flipper/ui/public/js/bootstrap/collapse.js +0 -211
  160. data/lib/flipper/ui/public/js/bootstrap/dropdown.js +0 -161
  161. data/lib/flipper/ui/public/js/bootstrap/modal.js +0 -339
  162. data/lib/flipper/ui/public/js/bootstrap/popover.js +0 -108
  163. data/lib/flipper/ui/public/js/bootstrap/scrollspy.js +0 -172
  164. data/lib/flipper/ui/public/js/bootstrap/tab.js +0 -153
  165. data/lib/flipper/ui/public/js/bootstrap/tooltip.js +0 -476
  166. data/lib/flipper/ui/public/js/bootstrap/transition.js +0 -59
@@ -1,16 +1,38 @@
1
- //
2
- // List groups
3
- // --------------------------------------------------
4
-
5
-
6
1
  // Base class
7
2
  //
8
3
  // Easily usable on <ul>, <ol>, or <div>.
9
4
 
10
5
  .list-group {
6
+ display: flex;
7
+ flex-direction: column;
8
+
11
9
  // No need to set list-style: none; since .list-group-item is block level
12
- margin-bottom: 20px;
13
10
  padding-left: 0; // reset padding because ul and ol
11
+ margin-bottom: 0;
12
+ }
13
+
14
+
15
+ // Interactive list items
16
+ //
17
+ // Use anchor or button elements instead of `li`s or `div`s to create interactive
18
+ // list items. Includes an extra `.active` modifier class for selected items.
19
+
20
+ .list-group-item-action {
21
+ width: 100%; // For `<button>`s (anchors become 100% by default though)
22
+ color: $list-group-action-color;
23
+ text-align: inherit; // For `<button>`s (anchors inherit)
24
+
25
+ // Hover state
26
+ @include hover-focus {
27
+ color: $list-group-action-hover-color;
28
+ text-decoration: none;
29
+ background-color: $list-group-hover-bg;
30
+ }
31
+
32
+ &:active {
33
+ color: $list-group-action-active-color;
34
+ background-color: $list-group-action-active-bg;
35
+ }
14
36
  }
15
37
 
16
38
 
@@ -21,79 +43,63 @@
21
43
  .list-group-item {
22
44
  position: relative;
23
45
  display: block;
24
- padding: 10px 15px;
46
+ padding: $list-group-item-padding-y $list-group-item-padding-x;
25
47
  // Place the border on the list items and negative margin up for better styling
26
- margin-bottom: -1px;
48
+ margin-bottom: -$list-group-border-width;
27
49
  background-color: $list-group-bg;
28
- border: 1px solid $list-group-border;
50
+ border: $list-group-border-width solid $list-group-border-color;
29
51
 
30
- // Round the first and last items
31
52
  &:first-child {
32
53
  @include border-top-radius($list-group-border-radius);
33
54
  }
55
+
34
56
  &:last-child {
35
57
  margin-bottom: 0;
36
58
  @include border-bottom-radius($list-group-border-radius);
37
59
  }
38
- }
39
-
40
-
41
- // Linked list items
42
- //
43
- // Use anchor elements instead of `li`s or `div`s to create linked list items.
44
- // Includes an extra `.active` modifier class for showing selected items.
45
-
46
- a.list-group-item {
47
- color: $list-group-link-color;
48
-
49
- .list-group-item-heading {
50
- color: $list-group-link-heading-color;
51
- }
52
60
 
53
- // Hover state
54
- &:hover,
55
- &:focus {
61
+ @include hover-focus {
62
+ z-index: 1; // Place hover/active items above their siblings for proper border styling
56
63
  text-decoration: none;
57
- color: $list-group-link-hover-color;
58
- background-color: $list-group-hover-bg;
59
64
  }
60
- }
61
65
 
62
- .list-group-item {
63
- // Disabled state
64
66
  &.disabled,
65
- &.disabled:hover,
66
- &.disabled:focus {
67
- background-color: $list-group-disabled-bg;
67
+ &:disabled {
68
68
  color: $list-group-disabled-color;
69
- cursor: $cursor-disabled;
70
-
71
- // Force color to inherit for custom content
72
- .list-group-item-heading {
73
- color: inherit;
74
- }
75
- .list-group-item-text {
76
- color: $list-group-disabled-text-color;
77
- }
69
+ background-color: $list-group-disabled-bg;
78
70
  }
79
71
 
80
- // Active class on item itself, not parent
81
- &.active,
82
- &.active:hover,
83
- &.active:focus {
72
+ // Include both here for `<a>`s and `<button>`s
73
+ &.active {
84
74
  z-index: 2; // Place active items above their siblings for proper border styling
85
75
  color: $list-group-active-color;
86
76
  background-color: $list-group-active-bg;
87
- border-color: $list-group-active-border;
77
+ border-color: $list-group-active-border-color;
78
+ }
79
+ }
80
+
88
81
 
89
- // Force color to inherit for custom content
90
- .list-group-item-heading,
91
- .list-group-item-heading > small,
92
- .list-group-item-heading > .small {
93
- color: inherit;
82
+ // Flush list items
83
+ //
84
+ // Remove borders and border-radius to keep list group items edge-to-edge. Most
85
+ // useful within other components (e.g., cards).
86
+
87
+ .list-group-flush {
88
+ .list-group-item {
89
+ border-right: 0;
90
+ border-left: 0;
91
+ @include border-radius(0);
92
+ }
93
+
94
+ &:first-child {
95
+ .list-group-item:first-child {
96
+ border-top: 0;
94
97
  }
95
- .list-group-item-text {
96
- color: $list-group-active-text-color;
98
+ }
99
+
100
+ &:last-child {
101
+ .list-group-item:last-child {
102
+ border-bottom: 0;
97
103
  }
98
104
  }
99
105
  }
@@ -104,21 +110,6 @@ a.list-group-item {
104
110
  // Add modifier classes to change text and background color on individual items.
105
111
  // Organizationally, this must come after the `:hover` states.
106
112
 
107
- @include list-group-item-variant(success, $state-success-bg, $state-success-text);
108
- @include list-group-item-variant(info, $state-info-bg, $state-info-text);
109
- @include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
110
- @include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
111
-
112
-
113
- // Custom content options
114
- //
115
- // Extra classes for creating well-formatted content within `.list-group-item`s.
116
-
117
- .list-group-item-heading {
118
- margin-top: 0;
119
- margin-bottom: 5px;
120
- }
121
- .list-group-item-text {
122
- margin-bottom: 0;
123
- line-height: 1.3;
113
+ @each $color, $value in $theme-colors {
114
+ @include list-group-item-variant($color, theme-color-level($color, -9), theme-color-level($color, 6));
124
115
  }
@@ -1,61 +1,8 @@
1
1
  .media {
2
- // Proper spacing between instances of .media
3
- margin-top: 15px;
4
-
5
- &:first-child {
6
- margin-top: 0;
7
- }
8
- }
9
-
10
- .media,
11
- .media-body {
12
- zoom: 1;
13
- overflow: hidden;
2
+ display: flex;
3
+ align-items: flex-start;
14
4
  }
15
5
 
16
6
  .media-body {
17
- width: 10000px;
18
- }
19
-
20
- .media-object {
21
- display: block;
22
- }
23
-
24
- .media-right,
25
- .media > .pull-right {
26
- padding-left: 10px;
27
- }
28
-
29
- .media-left,
30
- .media > .pull-left {
31
- padding-right: 10px;
32
- }
33
-
34
- .media-left,
35
- .media-right,
36
- .media-body {
37
- display: table-cell;
38
- vertical-align: top;
39
- }
40
-
41
- .media-middle {
42
- vertical-align: middle;
43
- }
44
-
45
- .media-bottom {
46
- vertical-align: bottom;
47
- }
48
-
49
- // Reset margins on headings for tighter default spacing
50
- .media-heading {
51
- margin-top: 0;
52
- margin-bottom: 5px;
53
- }
54
-
55
- // Media list variation
56
- //
57
- // Undo default ul/ol styles
58
- .media-list {
59
- padding-left: 0;
60
- list-style: none;
7
+ flex: 1;
61
8
  }
@@ -1,39 +1,42 @@
1
- // Mixins
2
- // --------------------------------------------------
1
+ // Toggles
2
+ //
3
+ // Used in conjunction with global variables to enable certain theme features.
3
4
 
4
5
  // Utilities
5
- @import "mixins/hide-text";
6
- @import "mixins/opacity";
6
+ @import "mixins/breakpoints";
7
+ @import "mixins/hover";
7
8
  @import "mixins/image";
8
- @import "mixins/labels";
9
- @import "mixins/reset-filter";
9
+ @import "mixins/badge";
10
10
  @import "mixins/resize";
11
- @import "mixins/responsive-visibility";
11
+ @import "mixins/screen-reader";
12
12
  @import "mixins/size";
13
- @import "mixins/tab-focus";
13
+ @import "mixins/reset-text";
14
14
  @import "mixins/text-emphasis";
15
- @import "mixins/text-overflow";
16
- @import "mixins/vendor-prefixes";
15
+ @import "mixins/text-hide";
16
+ @import "mixins/text-truncate";
17
+ @import "mixins/visibility";
17
18
 
18
- // Components
19
- @import "mixins/alerts";
19
+ // // Components
20
+ @import "mixins/alert";
20
21
  @import "mixins/buttons";
21
- @import "mixins/panels";
22
+ @import "mixins/caret";
22
23
  @import "mixins/pagination";
24
+ @import "mixins/lists";
23
25
  @import "mixins/list-group";
24
26
  @import "mixins/nav-divider";
25
27
  @import "mixins/forms";
26
- @import "mixins/progress-bar";
27
28
  @import "mixins/table-row";
28
29
 
29
- // Skins
30
+ // // Skins
30
31
  @import "mixins/background-variant";
31
32
  @import "mixins/border-radius";
33
+ @import "mixins/box-shadow";
32
34
  @import "mixins/gradients";
35
+ @import "mixins/transition";
33
36
 
34
- // Layout
37
+ // // Layout
35
38
  @import "mixins/clearfix";
36
- @import "mixins/center-block";
37
- @import "mixins/nav-vertical-align";
39
+ // @import "mixins/navbar-align";
38
40
  @import "mixins/grid-framework";
39
41
  @import "mixins/grid";
42
+ @import "mixins/float";
@@ -0,0 +1,168 @@
1
+ // .modal-open - body class for killing the scroll
2
+ // .modal - container to scroll within
3
+ // .modal-dialog - positioning shell for the actual modal
4
+ // .modal-content - actual modal w/ bg and corners and stuff
5
+
6
+
7
+ // Kill the scroll on the body
8
+ .modal-open {
9
+ overflow: hidden;
10
+ }
11
+
12
+ // Container that the modal scrolls within
13
+ .modal {
14
+ position: fixed;
15
+ top: 0;
16
+ right: 0;
17
+ bottom: 0;
18
+ left: 0;
19
+ z-index: $zindex-modal;
20
+ display: none;
21
+ overflow: hidden;
22
+ // Prevent Chrome on Windows from adding a focus outline. For details, see
23
+ // https://github.com/twbs/bootstrap/pull/10951.
24
+ outline: 0;
25
+ // We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
26
+ // gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
27
+ // See also https://github.com/twbs/bootstrap/issues/17695
28
+
29
+ .modal-open & {
30
+ overflow-x: hidden;
31
+ overflow-y: auto;
32
+ }
33
+ }
34
+
35
+ // Shell div to position the modal with bottom padding
36
+ .modal-dialog {
37
+ position: relative;
38
+ width: auto;
39
+ margin: $modal-dialog-margin;
40
+ // allow clicks to pass through for custom click handling to close modal
41
+ pointer-events: none;
42
+
43
+ // When fading in the modal, animate it to slide down
44
+ .modal.fade & {
45
+ @include transition($modal-transition);
46
+ transform: translate(0, -25%);
47
+ }
48
+ .modal.show & {
49
+ transform: translate(0, 0);
50
+ }
51
+ }
52
+
53
+ .modal-dialog-centered {
54
+ display: flex;
55
+ align-items: center;
56
+ min-height: calc(100% - (#{$modal-dialog-margin} * 2));
57
+ }
58
+
59
+ // Actual modal
60
+ .modal-content {
61
+ position: relative;
62
+ display: flex;
63
+ flex-direction: column;
64
+ width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
65
+ // counteract the pointer-events: none; in the .modal-dialog
66
+ pointer-events: auto;
67
+ background-color: $modal-content-bg;
68
+ background-clip: padding-box;
69
+ border: $modal-content-border-width solid $modal-content-border-color;
70
+ @include border-radius($border-radius-lg);
71
+ @include box-shadow($modal-content-box-shadow-xs);
72
+ // Remove focus outline from opened modal
73
+ outline: 0;
74
+ }
75
+
76
+ // Modal background
77
+ .modal-backdrop {
78
+ position: fixed;
79
+ top: 0;
80
+ right: 0;
81
+ bottom: 0;
82
+ left: 0;
83
+ z-index: $zindex-modal-backdrop;
84
+ background-color: $modal-backdrop-bg;
85
+
86
+ // Fade for backdrop
87
+ &.fade { opacity: 0; }
88
+ &.show { opacity: $modal-backdrop-opacity; }
89
+ }
90
+
91
+ // Modal header
92
+ // Top section of the modal w/ title and dismiss
93
+ .modal-header {
94
+ display: flex;
95
+ align-items: flex-start; // so the close btn always stays on the upper right corner
96
+ justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
97
+ padding: $modal-header-padding;
98
+ border-bottom: $modal-header-border-width solid $modal-header-border-color;
99
+ @include border-top-radius($border-radius-lg);
100
+
101
+ .close {
102
+ padding: $modal-header-padding;
103
+ // auto on the left force icon to the right even when there is no .modal-title
104
+ margin: (-$modal-header-padding) (-$modal-header-padding) (-$modal-header-padding) auto;
105
+ }
106
+ }
107
+
108
+ // Title text within header
109
+ .modal-title {
110
+ margin-bottom: 0;
111
+ line-height: $modal-title-line-height;
112
+ }
113
+
114
+ // Modal body
115
+ // Where all modal content resides (sibling of .modal-header and .modal-footer)
116
+ .modal-body {
117
+ position: relative;
118
+ // Enable `flex-grow: 1` so that the body take up as much space as possible
119
+ // when should there be a fixed height on `.modal-dialog`.
120
+ flex: 1 1 auto;
121
+ padding: $modal-inner-padding;
122
+ }
123
+
124
+ // Footer (for actions)
125
+ .modal-footer {
126
+ display: flex;
127
+ align-items: center; // vertically center
128
+ justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
129
+ padding: $modal-inner-padding;
130
+ border-top: $modal-footer-border-width solid $modal-footer-border-color;
131
+
132
+ // Easily place margin between footer elements
133
+ > :not(:first-child) { margin-left: .25rem; }
134
+ > :not(:last-child) { margin-right: .25rem; }
135
+ }
136
+
137
+ // Measure scrollbar width for padding body during modal show/hide
138
+ .modal-scrollbar-measure {
139
+ position: absolute;
140
+ top: -9999px;
141
+ width: 50px;
142
+ height: 50px;
143
+ overflow: scroll;
144
+ }
145
+
146
+ // Scale up the modal
147
+ @include media-breakpoint-up(sm) {
148
+ // Automatically set modal's width for larger viewports
149
+ .modal-dialog {
150
+ max-width: $modal-md;
151
+ margin: $modal-dialog-margin-y-sm-up auto;
152
+ }
153
+
154
+ .modal-dialog-centered {
155
+ min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
156
+ }
157
+
158
+ .modal-content {
159
+ @include box-shadow($modal-content-box-shadow-sm-up);
160
+ }
161
+
162
+ .modal-sm { max-width: $modal-sm; }
163
+
164
+ }
165
+
166
+ @include media-breakpoint-up(lg) {
167
+ .modal-lg { max-width: $modal-lg; }
168
+ }