megatron 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +43 -2
  3. data/app/assets/javascripts/megatron/form.js +36 -0
  4. data/app/assets/javascripts/megatron/index.js +93 -0
  5. data/app/assets/javascripts/megatron/link.js +58 -0
  6. data/app/assets/javascripts/megatron/utils/auto-navigate.js +24 -0
  7. data/app/assets/javascripts/megatron/utils/form-notify.js +39 -0
  8. data/app/assets/javascripts/megatron/utils/index.js +112 -0
  9. data/app/assets/javascripts/megatron/utils/messages.js +97 -0
  10. data/app/assets/javascripts/megatron/utils/time/date-to-html.js +59 -0
  11. data/app/assets/javascripts/megatron/utils/time/time-switch.js +87 -0
  12. data/app/assets/javascripts/megatron/utils/time/timeago.js +95 -0
  13. data/app/assets/javascripts/megatron/utils/toggler.js +163 -0
  14. data/app/assets/stylesheets/_example.scss +76 -0
  15. data/app/assets/stylesheets/_grid.scss +41 -0
  16. data/app/assets/stylesheets/_typography.scss +38 -0
  17. data/app/assets/stylesheets/application.scss +19 -0
  18. data/app/assets/stylesheets/megatron/error-pages.scss +164 -0
  19. data/app/assets/stylesheets/megatron/error-pages/_animations.scss +96 -0
  20. data/app/assets/stylesheets/megatron/error-pages/_csi.scss +41 -0
  21. data/app/assets/stylesheets/megatron/error-pages/_waves.scss +36 -0
  22. data/app/assets/stylesheets/megatron/megatron.scss +3 -0
  23. data/app/assets/stylesheets/megatron/modules/_crop-height.scss +5 -0
  24. data/app/assets/stylesheets/megatron/modules/_index.scss +22 -0
  25. data/app/assets/stylesheets/megatron/modules/_logo.scss +67 -0
  26. data/app/assets/stylesheets/megatron/modules/_new-tag.scss +11 -0
  27. data/app/assets/stylesheets/megatron/modules/_progress.scss +80 -0
  28. data/app/assets/stylesheets/megatron/modules/app/_animation-classes.scss +3 -0
  29. data/app/assets/stylesheets/megatron/modules/app/_animations.scss +62 -0
  30. data/app/assets/stylesheets/megatron/modules/app/_index.scss +5 -0
  31. data/app/assets/stylesheets/megatron/modules/app/_layout.scss +261 -0
  32. data/app/assets/stylesheets/megatron/modules/app/_sizes.scss +28 -0
  33. data/app/assets/stylesheets/megatron/modules/app/_typography.scss +111 -0
  34. data/app/assets/stylesheets/megatron/modules/box/_base.scss +94 -0
  35. data/app/assets/stylesheets/megatron/modules/box/_color-box.scss +33 -0
  36. data/app/assets/stylesheets/megatron/modules/box/_deployment_box.scss +37 -0
  37. data/app/assets/stylesheets/megatron/modules/box/_index.scss +4 -0
  38. data/app/assets/stylesheets/megatron/modules/box/_placeholder.scss +6 -0
  39. data/app/assets/stylesheets/megatron/modules/buttons/_animations.scss +35 -0
  40. data/app/assets/stylesheets/megatron/modules/buttons/_buttons.scss +266 -0
  41. data/app/assets/stylesheets/megatron/modules/buttons/_index.scss +4 -0
  42. data/app/assets/stylesheets/megatron/modules/buttons/_mixins.scss +108 -0
  43. data/app/assets/stylesheets/megatron/modules/buttons/_pills.scss +44 -0
  44. data/app/assets/stylesheets/megatron/modules/code/_codemirror.scss +98 -0
  45. data/app/assets/stylesheets/megatron/modules/code/_highlighted.scss +65 -0
  46. data/app/assets/stylesheets/megatron/modules/code/_index.scss +3 -0
  47. data/app/assets/stylesheets/megatron/modules/code/_syntax.scss +18 -0
  48. data/app/assets/stylesheets/megatron/modules/core/_colored-items.scss +22 -0
  49. data/app/assets/stylesheets/megatron/modules/core/_colors.scss +163 -0
  50. data/app/assets/stylesheets/megatron/modules/core/_index.scss +3 -0
  51. data/app/assets/stylesheets/megatron/modules/core/_mixins.scss +262 -0
  52. data/app/assets/stylesheets/megatron/modules/core/_vars.scss +30 -0
  53. data/app/assets/stylesheets/megatron/modules/core/_z-index.scss +3 -0
  54. data/app/assets/stylesheets/megatron/modules/dialog/_animations.scss +48 -0
  55. data/app/assets/stylesheets/megatron/modules/dialog/_dialog.scss +81 -0
  56. data/app/assets/stylesheets/megatron/modules/dialog/_index.scss +2 -0
  57. data/app/assets/stylesheets/megatron/modules/forms/_base.scss +31 -0
  58. data/app/assets/stylesheets/megatron/modules/forms/_check-radio.scss +99 -0
  59. data/app/assets/stylesheets/megatron/modules/forms/_check-switch.scss +88 -0
  60. data/app/assets/stylesheets/megatron/modules/forms/_footer.scss +13 -0
  61. data/app/assets/stylesheets/megatron/modules/forms/_index.scss +10 -0
  62. data/app/assets/stylesheets/megatron/modules/forms/_login.scss +92 -0
  63. data/app/assets/stylesheets/megatron/modules/forms/_radio-nav.scss +62 -0
  64. data/app/assets/stylesheets/megatron/modules/forms/_select.scss +37 -0
  65. data/app/assets/stylesheets/megatron/modules/forms/_stacked-form.scss +29 -0
  66. data/app/assets/stylesheets/megatron/modules/forms/_table-form.scss +53 -0
  67. data/app/assets/stylesheets/megatron/modules/forms/_text-input.scss +118 -0
  68. data/app/assets/stylesheets/megatron/modules/grids/_alignment.scss +39 -0
  69. data/app/assets/stylesheets/megatron/modules/grids/_grid.scss +144 -0
  70. data/app/assets/stylesheets/megatron/modules/grids/_index.scss +2 -0
  71. data/app/assets/stylesheets/megatron/modules/headers/_actions.scss +10 -0
  72. data/app/assets/stylesheets/megatron/modules/headers/_base.scss +67 -0
  73. data/app/assets/stylesheets/megatron/modules/headers/_index.scss +4 -0
  74. data/app/assets/stylesheets/megatron/modules/headers/_meta.scss +10 -0
  75. data/app/assets/stylesheets/megatron/modules/headers/_site-header.scss +8 -0
  76. data/app/assets/stylesheets/megatron/modules/lib/_codemirror.scss +301 -0
  77. data/app/assets/stylesheets/megatron/modules/lists/_base.scss +13 -0
  78. data/app/assets/stylesheets/megatron/modules/lists/_box-list.scss +53 -0
  79. data/app/assets/stylesheets/megatron/modules/lists/_index.scss +2 -0
  80. data/app/assets/stylesheets/megatron/modules/messages/_index.scss +3 -0
  81. data/app/assets/stylesheets/megatron/modules/messages/_notice.scss +57 -0
  82. data/app/assets/stylesheets/megatron/modules/messages/_notifications.scss +126 -0
  83. data/app/assets/stylesheets/megatron/modules/messages/_pop-message.scss +157 -0
  84. data/app/assets/stylesheets/megatron/modules/nav/_auto-navigate.scss +7 -0
  85. data/app/assets/stylesheets/megatron/modules/nav/_breadcrumbs.scss +35 -0
  86. data/app/assets/stylesheets/megatron/modules/nav/_index.scss +8 -0
  87. data/app/assets/stylesheets/megatron/modules/nav/_main-sidebar.scss +21 -0
  88. data/app/assets/stylesheets/megatron/modules/nav/_mixins.scss +53 -0
  89. data/app/assets/stylesheets/megatron/modules/nav/_nav-toggle.scss +61 -0
  90. data/app/assets/stylesheets/megatron/modules/nav/_primary-nav.scss +120 -0
  91. data/app/assets/stylesheets/megatron/modules/nav/_secondary-nav.scss +105 -0
  92. data/app/assets/stylesheets/megatron/modules/nav/_tabs.scss +87 -0
  93. data/app/assets/stylesheets/megatron/modules/roboticons/_font.scss +62 -0
  94. data/app/assets/stylesheets/megatron/modules/roboticons/_icons.scss +219 -0
  95. data/app/assets/stylesheets/megatron/modules/roboticons/_index.scss +2 -0
  96. data/app/assets/stylesheets/megatron/modules/slider/_base.scss +49 -0
  97. data/app/assets/stylesheets/megatron/modules/slider/_index.scss +4 -0
  98. data/app/assets/stylesheets/megatron/modules/slider/_slider.scss +282 -0
  99. data/app/assets/stylesheets/megatron/modules/slider/_switch.scss +75 -0
  100. data/app/assets/stylesheets/megatron/modules/slider/_themes.scss +42 -0
  101. data/app/assets/stylesheets/megatron/modules/tables/_base.scss +170 -0
  102. data/app/assets/stylesheets/megatron/modules/tables/_border-table.scss +28 -0
  103. data/app/assets/stylesheets/megatron/modules/tables/_box-table.scss +36 -0
  104. data/app/assets/stylesheets/megatron/modules/tables/_columns.scss +8 -0
  105. data/app/assets/stylesheets/megatron/modules/tables/_doc-table.scss +22 -0
  106. data/app/assets/stylesheets/megatron/modules/tables/_icon-cell.scss +9 -0
  107. data/app/assets/stylesheets/megatron/modules/tables/_index.scss +7 -0
  108. data/app/assets/stylesheets/megatron/modules/tables/_link-cell.scss +8 -0
  109. data/app/assets/stylesheets/megatron/modules/tables/_responsive-table.scss +13 -0
  110. data/app/assets/stylesheets/megatron/modules/widgets/_index.scss +1 -0
  111. data/app/assets/stylesheets/megatron/modules/widgets/_time-switch.scss +24 -0
  112. data/lib/megatron.rb +1 -1
  113. data/lib/megatron/engine.rb +5 -0
  114. data/lib/megatron/version.rb +1 -1
  115. data/lib/tasks/megatron_tasks.rake +4 -4
  116. data/public/assets/megatron/megatron-0.0.4.css +3 -0
  117. data/public/assets/megatron/{megatron-0.0.3.css.map → megatron-0.0.4.css.map} +3 -3
  118. data/public/assets/megatron/{megatron-0.0.3.js → megatron-0.0.4.js} +1 -1
  119. data/public/assets/megatron/megatron-0.0.4.map.json +1 -0
  120. metadata +115 -6
  121. data/public/assets/megatron/megatron-0.0.3.css +0 -2
  122. data/public/assets/megatron/megatron-0.0.3.map.json +0 -1
@@ -0,0 +1,28 @@
1
+ .tiny-width { max-width: $tiny; }
2
+ .x-small-width { max-width: $x-small; }
3
+ .small-width { max-width: $small; }
4
+ .medium-width { max-width: $medium; }
5
+ .large-width { max-width: $large; }
6
+ .x-large-width { max-width: $x-large; }
7
+ .max-width { max-width: 100%; }
8
+
9
+ .small-height { max-height: 5em; }
10
+ .medium-height { max-height: 15em; }
11
+ .large-height { max-height: 20em; }
12
+ .x-large-height { max-height: 25em; }
13
+ .xx-large-height { max-height: 30em; }
14
+ .max-height { max-height: 100%; }
15
+
16
+ .max-height-small { max-height: 5em; }
17
+ .max-height-medium { max-height: 15em; }
18
+ .max-height-large { max-height: 20em; }
19
+ .max-height-x-large { max-height: 25em; }
20
+ .max-height-xx-large { max-height: 30em; }
21
+ .max-height-max { max-height: 100%; }
22
+
23
+ .min-height-small { min-height: 5em; }
24
+ .min-height-medium { min-height: 15em; }
25
+ .min-height-large { min-height: 20em; }
26
+ .min-height-x-large { min-height: 25em; }
27
+ .min-height-xx-large { min-height: 30em; }
28
+ .min-height-max { min-height: 100%; }
@@ -0,0 +1,111 @@
1
+ $mono-font: "Ubuntu Mono", "Consolas", "Liberation Mono", monaco, "Lucida Console", "Consolas", monospace;
2
+ html { font-size: 62.5%; }
3
+
4
+ body {
5
+ font: {
6
+ size: 16px;
7
+ family: "Helvetica Neue", Helvetica, Arial, sans-serif;
8
+ }
9
+ }
10
+
11
+ h1, h2, h3 {
12
+ font-weight: normal;
13
+ }
14
+
15
+ h1 { font-size: 36px; }
16
+ h2 { font-size: 24px; }
17
+ h3 { font-size: 20px; }
18
+ h4 { font-size: 18px; }
19
+ h5 { font-size: 16px; }
20
+ h6 { font-size: 14px; }
21
+
22
+ h4, h5, h6 {
23
+ margin: 1em 0;
24
+ }
25
+
26
+ .mono-font {
27
+ font-family: $mono-font;
28
+ }
29
+
30
+ /* @extend this to force long lines of continuous text to wrap */
31
+ .force-wrap {
32
+ white-space: -moz-pre-wrap;
33
+ white-space: -pre-wrap;
34
+ white-space: -o-pre-wrap;
35
+ white-space: pre-wrap;
36
+ word-wrap: break-word;
37
+ }
38
+
39
+ .xx-small-text { font-size: 8px; }
40
+ .x-small-text { font-size: 10px; }
41
+ .small-text { font-size: 13px; }
42
+ .large-text { font-size: 18px; }
43
+ .x-large-text { font-size: 20px; }
44
+ .xx-large-text { font-size: 24px; }
45
+
46
+ .big-text { @extend .large-text; }
47
+
48
+ .strong-text { font-weight: bold; }
49
+ .normal-text { font-weight: normal; }
50
+
51
+ .light-text { color: $darkgray; }
52
+
53
+ .thin-chevron:after {
54
+ @extend .chevron_thin_icon:before;
55
+ @extend %icon-font;
56
+ }
57
+
58
+ .plus-circle:after {
59
+ @extend .plus_circle_icon:before;
60
+ @extend %icon-font;
61
+ }
62
+
63
+ .help-text {
64
+ font-size: 13px;
65
+ color: #888;
66
+ }
67
+
68
+ .hover-link {
69
+ text-decoration: none;
70
+ &:hover {
71
+ text-decoration: underline;
72
+ }
73
+ }
74
+
75
+ .normal-text-link {
76
+ text-decoration: none;
77
+ color: inherit;
78
+ }
79
+
80
+ .contain-margin-pad {
81
+ padding: 1px;
82
+ }
83
+
84
+ .contain-margin-border {
85
+ border: 1px solid transparent;
86
+ }
87
+
88
+ .hide {
89
+ display: none !important;
90
+ }
91
+
92
+ .ellipsis {
93
+ white-space: nowrap;
94
+ overflow: hidden;
95
+ text-overflow: ellipsis;
96
+ }
97
+
98
+ hr {
99
+ border: none;
100
+ background: none;
101
+ width: 100%;
102
+ border-bottom: 1px solid $page-border;
103
+ &.dark {
104
+ border-bottom: 1px solid $gray;
105
+ }
106
+ }
107
+
108
+ pre, p, form, ul, dl, ol {
109
+ margin: { top: $block-margin; bottom: $block-margin; }
110
+ }
111
+
@@ -0,0 +1,94 @@
1
+ $box-content-bg: $bright;
2
+
3
+ .box {
4
+ margin: { top: $block-margin; bottom: $block-margin; }
5
+ display: block;
6
+ position: relative;
7
+ @include until($small) {
8
+ $mg: -(.1 + nth($h-pad-box, 1));
9
+ margin: $block-margin $mg;
10
+ }
11
+ }
12
+
13
+ a.box {
14
+ color: inherit;
15
+ text-decoration: none;
16
+ }
17
+
18
+ .auto-radius {
19
+ @include at-least($medium) {
20
+ border-top: {
21
+ left-radius: 4px;
22
+ right-radius: 4px;
23
+ }
24
+ }
25
+ }
26
+
27
+ .bordered {
28
+ border-width: 1px;
29
+ border-style: solid;
30
+ }
31
+
32
+ .rounded {
33
+ border-radius: 4px;
34
+ }
35
+
36
+ .box-header {
37
+ margin-top: $block-margin;
38
+ border: 1px solid $page-border;
39
+ border-bottom-width: 2px;
40
+ background-color: $page-gray;
41
+ background-image: linear-gradient(rgba(#fff, .2), rgba(#fff, 0));
42
+ position: relative;
43
+ @include pad-box;
44
+ @extend .auto-radius;
45
+
46
+ &.wide, .wide > &, .wide > .box & {
47
+ border: { left: 0; right: 0; radius: 0; }
48
+ }
49
+ }
50
+
51
+ .box-content {
52
+ margin-bottom: $block-margin;
53
+ border: 1px solid $page-border;
54
+ background: $box-content-bg;
55
+ padding-top: 1px;
56
+ position: relative;
57
+ overflow: hidden;
58
+ @include h-pad-box;
59
+ .box &:not(:first-child) {
60
+ border-top: 0;
61
+ margin-bottom: 0;
62
+ }
63
+ }
64
+
65
+ .box-well {
66
+ border-radius: 4px;
67
+ box-shadow: rgba(#000, .2) 0 1px 4px inset;
68
+ background-color: rgba(#000, .03);
69
+ margin: { top: $block-margin; bottom: $block-margin; }
70
+ border: 1px solid transparent;
71
+ @include h-pad-box;
72
+ }
73
+
74
+ .box-info {
75
+ background: #f4f4f4;
76
+ position: relative;
77
+ border: 1px solid $page-border;
78
+ font-size: 12px;
79
+
80
+ .box &:not(:first-child) {
81
+ border-top: 0;
82
+ }
83
+
84
+ @include v-pad-box((5px, 10px));
85
+ @include h-pad-box;
86
+
87
+ .box-content & {
88
+ border: {
89
+ left: none;
90
+ right: none;
91
+ }
92
+ }
93
+ }
94
+
@@ -0,0 +1,33 @@
1
+ @mixin color-box($bg) {
2
+ $border: adjust-color($bg, $lightness: -15%, $saturation: -20%);
3
+ $color: adjust-color($bg, $lightness: -45%, $saturation: -50%);
4
+ background-color: $bg;
5
+ border-color: $border;
6
+ color: $color;
7
+ a:not([class*=btn]) {
8
+ color: darken($color, 5);
9
+ }
10
+ }
11
+
12
+ @mixin dark-color-box($bg) {
13
+ $border: adjust-color($bg, $lightness: -15%, $saturation: -20%);
14
+ $color: adjust-color($bg, $lightness: 45%, $saturation: -50%);
15
+ background-color: $bg;
16
+ border-color: $border;
17
+ text-shadow: $border 0 1px 1px;
18
+ color: $color;
19
+ a:not([class*=btn]) {
20
+ color: lighten($color, 5);
21
+ }
22
+ }
23
+
24
+ .softred-box { @include color-box($softred) }
25
+ .softorange-box { @include color-box($softorange) }
26
+ .softyellow-box { @include color-box($softyellow) }
27
+ .softgreen-box { @include color-box($softgreen) }
28
+ .softblue-box { @include color-box($softblue) }
29
+ .softpurple-box { @include color-box($softpurple) }
30
+ .white-box { @include color-box($white) }
31
+ .offwhite-box { @include color-box($offwhite) }
32
+ .gray-box { @include dark-color-box($gray) }
33
+ .boyblue-box { @include dark-color-box($boyblue) }
@@ -0,0 +1,37 @@
1
+ .deployment_info {
2
+ @extend .box-info;
3
+ display: table;
4
+ width: 100%;
5
+ border-bottom: none;
6
+
7
+ &-item {
8
+ display: table-cell;
9
+ padding: 0 10px;
10
+
11
+ &:first-child {
12
+ padding-left: 0;
13
+ }
14
+
15
+ &:last-child {
16
+ padding-right: 0;
17
+ }
18
+ }
19
+ &:last-child {
20
+ border-bottom: 1px solid $page-border;
21
+ }
22
+ }
23
+
24
+ .shell-box {
25
+ border: 1px solid rgba(0, 0, 0, 0.3);
26
+ box-shadow: rgba(0, 0, 0, 0.15) 0 1px 3px inset, rgba(255, 255, 255, 0.8) 0 1px;
27
+ padding: 6px 8px;
28
+ font-size: 14px;
29
+ white-space: pre-wrap;
30
+ word-wrap: break-word;
31
+ background-color: #424242;
32
+ color: #eee;
33
+ font-family: "Liberation Mono","Ubuntu Mono", monaco,
34
+ "Lucida Console", "Consolas", monospace;
35
+ text-shadow: #000 0 1px;
36
+ margin: $block-margin 0;
37
+ }
@@ -0,0 +1,4 @@
1
+ @import "base";
2
+ @import "deployment_box";
3
+ @import "placeholder";
4
+ @import "color-box";
@@ -0,0 +1,6 @@
1
+ .placeholder-box {
2
+ background: $white;
3
+ border: 1px solid $page-border;
4
+ text-align: center;
5
+ @include v-pad-box;
6
+ }
@@ -0,0 +1,35 @@
1
+ @keyframes blue-pulse {
2
+ 0%, 100% {
3
+ background-color: $button-blue;
4
+ }
5
+ 50% {
6
+ background-color: darken($button-blue, 12);
7
+ }
8
+ }
9
+
10
+ @keyframes green-pulse {
11
+ 0%, 100% {
12
+ background-color: $green;
13
+ }
14
+ 50% {
15
+ background-color: darken($green, 12);
16
+ }
17
+ }
18
+
19
+ @keyframes light-blue-pulse {
20
+ 0%, 100% {
21
+ background-color: hsl(206, 43%, 94%);
22
+ }
23
+ 50% {
24
+ background-color: #fdfdfd;
25
+ }
26
+ }
27
+ @keyframes destroy-pulse {
28
+ 0%, 100% {
29
+ background-color: $button-red;
30
+ }
31
+ 50% {
32
+ background-color: darken($button-red, 8);
33
+ }
34
+ }
35
+
@@ -0,0 +1,266 @@
1
+ $button-blue: $boyblue;
2
+ $button-red: $red;
3
+ $button-dark: lighten($night, 8);
4
+
5
+ // Button style reset and basic styles
6
+ @mixin btn-base() {
7
+ font: {
8
+ size: 14px;
9
+ family: "Helvetica Neue", Helvetica, Arial, sans-serif;
10
+ }
11
+
12
+ padding: 4px 16px;
13
+ border-radius: 4px;
14
+ line-height: 31px;
15
+
16
+ vertical-align: middle;
17
+ margin: { top: 0; bottom: 0 }
18
+ text-align: center;
19
+ cursor: pointer;
20
+ display: inline-block;
21
+ /*border: transparent 1px solid;*/
22
+ border: none;
23
+ @include smooth-text;
24
+
25
+ // Remove default outlines
26
+ &:active, &:hover { outline: none }
27
+ &:focus { outline: none; }
28
+ &::-moz-focus-inner { border: none; padding: 0; }
29
+
30
+ // Remove any hover decorations for links
31
+ &, &:hover, &:focus { text-decoration: none; }
32
+
33
+ &.small {
34
+ font-size: 10px;
35
+ padding: 1px 8px;
36
+ border-radius: 4px;
37
+ line-height: 20px;
38
+ }
39
+
40
+ &.medium {
41
+ font-size: 13px;
42
+ padding: 3px 10px;
43
+ border-radius: 4px;
44
+ line-height: 24px;
45
+ }
46
+
47
+ &.large {
48
+ font-size: 18px;
49
+ padding: 8px 20px;
50
+ border-radius: 5px;
51
+ line-height: 32px;
52
+ }
53
+ &.x-large {
54
+ font-size: 24px;
55
+ padding: 12px 25px;
56
+ border-radius: 5px;
57
+ line-height: 32px;
58
+ }
59
+ }
60
+
61
+ %btn-base {
62
+ @include btn-base;
63
+ font-weight: bold;
64
+ &:focus {
65
+ transition: box-shadow .15s ease;
66
+ }
67
+
68
+ &:hover, &:active {
69
+ transition: none;
70
+ }
71
+
72
+ &.disabled, &[disabled] {
73
+ opacity: .5;
74
+ cursor: default;
75
+ pointer-events: none;
76
+ }
77
+ }
78
+
79
+ .btn {
80
+ $bg: #fdfdfd;
81
+
82
+ @extend %btn-base;
83
+ @include light-button($bg);
84
+ color: $text-color;
85
+
86
+ &:hover, &:focus {
87
+ $bg: hsl(206, 43%, 96%);
88
+ background-color: $bg;
89
+ box-shadow: hsl(203, 47%, 65%) 0 0 0 1px inset;
90
+ color: hsl(204, 36%, 46%);
91
+ }
92
+
93
+ &:focus {
94
+ animation: light-blue-pulse 1.5s linear infinite;
95
+ box-shadow: hsl(204, 67%, 70%) 0 0 0 2px inset;
96
+ }
97
+
98
+ &:active {
99
+ background-color: $bg;
100
+ background-image: none;
101
+ box-shadow: hsl(203, 47%, 65%) 0 0 0 1px inset, rgba(#000, .2) 0 1px 7px inset;
102
+ }
103
+ }
104
+
105
+ .text-btn {
106
+ @include btn-base;
107
+ border: 0;
108
+ padding: { left: 0; right: 0; }
109
+ border-radius: 0;
110
+ margin: 0 15px;
111
+ background: transparent linear-gradient($button-blue, $button-blue) 50% 75%/0px 1px no-repeat;
112
+ transition: background .1s ease, color .15s ease;
113
+
114
+ color: $text-color;
115
+
116
+ text-shadow: 1px 0 hsl(0, 100%, 100%), -1px 0 hsl(0, 100%, 100%), 2px 0 hsl(0, 100%, 100%), -2px 0 hsl(0, 100%, 100%);
117
+ &:hover, &:focus {
118
+ color: $button-blue;
119
+ background: transparent linear-gradient($button-blue, $button-blue) 50% 75%/100% 1px no-repeat;
120
+ }
121
+
122
+ &:active {
123
+ transform: scale(.97, .97);
124
+ color: $text-color;
125
+ background: transparent linear-gradient($text-color, $text-color) 50% 75%/100% 1px no-repeat;
126
+ }
127
+ }
128
+
129
+ .primary-btn {
130
+ @extend %btn-base;
131
+ @include dark-button($button-blue);
132
+ color: #fff;
133
+
134
+ &:hover {
135
+ @include dark-button(darken($button-blue, 8));
136
+ color: #fff;
137
+ }
138
+
139
+ &:focus {
140
+ border-color: transparent;
141
+ animation: blue-pulse 1.5s linear infinite;
142
+ box-shadow: lighten($button-blue, 20) 0 0 0 2px inset;
143
+ color: #fff;
144
+ }
145
+
146
+ &:active {
147
+ background-color: darken($button-blue, 5);
148
+ background-image: none;
149
+ @include dark-button-active-shadow;
150
+ }
151
+ }
152
+
153
+ .destroy-btn {
154
+ $destroy-bright: #fdfdfd;
155
+ $button-red: $red;
156
+
157
+ @extend %btn-base;
158
+
159
+ @include light-button($destroy-bright);
160
+ color: $button-red;
161
+
162
+ &:focus {
163
+ border-color: $button-red;
164
+ box-shadow: rgba($button-red, 0.8) 0 0 0 2px inset;
165
+ }
166
+
167
+ &:hover {
168
+ @include dark-button($button-red);
169
+ color: #fff;
170
+ }
171
+
172
+ &:active {
173
+ color: #fff;
174
+ background-color: darken($button-red, 8);
175
+ border-color: scale-color($button-red, $lightness: -30%);
176
+ background-image: none;
177
+ @include dark-button-active-shadow;
178
+ @include dark-text-shadow(scale-color($button-red, $lightness: -5%));
179
+ }
180
+ }
181
+
182
+ .primary-destroy-btn {
183
+ $button-darkred: darken($button-red, 8);
184
+ @extend %btn-base;
185
+ @include dark-button($button-red);
186
+ color: #fff;
187
+
188
+ &:hover, &:focus {
189
+ @include dark-button($button-darkred);
190
+ color: #fff;
191
+ }
192
+
193
+ &:focus {
194
+ animation: destroy-pulse 1.5s linear infinite;
195
+ box-shadow: lighten($button-red, 25) 0 0 0 2px inset;
196
+ }
197
+
198
+ &:active {
199
+ color: #fff;
200
+ background-color: $button-darkred;
201
+ border-color: transparent;
202
+ @include dark-button-active-shadow;
203
+ }
204
+ }
205
+
206
+ .dark-btn {
207
+ color: #fff;
208
+ @extend %btn-base;
209
+ @include dark-button($button-dark);
210
+
211
+ &:hover {
212
+ @include dark-button(darken($button-dark, 8));
213
+ }
214
+
215
+ &:focus {
216
+ box-shadow: rgba(#fff, .5) 0 0 0 2px inset;
217
+ border-color: transparent;
218
+ }
219
+
220
+ &:active {
221
+ background-color: darken($button-dark, 12);
222
+ background-image: none;
223
+ @include dark-button-active-shadow;
224
+ }
225
+ }
226
+
227
+ .green-btn {
228
+ @extend %btn-base;
229
+ @include dark-button($green);
230
+ color: #fff;
231
+
232
+ &:hover {
233
+ @include dark-button(darken($green, 5));
234
+ }
235
+
236
+ &:focus {
237
+ border-color: transparent;
238
+ box-shadow: lighten($green, 20) 0 0 0 2px inset;
239
+ }
240
+
241
+ &:active {
242
+ background-color: darken($green, 8);
243
+ background-image: none;
244
+ @include dark-button-active-shadow;
245
+ }
246
+ }
247
+
248
+ .green-outline-btn {
249
+ @include dark-outline-button($green);
250
+ }
251
+
252
+ .blue-outline-btn {
253
+ @include dark-outline-button($boyblue);
254
+ }
255
+
256
+ .dark-outline-btn {
257
+ @include dark-outline-button($button-dark);
258
+ }
259
+
260
+ .header-btn {
261
+ margin-left: 8px;
262
+ float: right;
263
+ .page-header & {
264
+ margin: 13px 0;
265
+ }
266
+ }