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,118 @@
1
+ %text-input {
2
+ @include v-pad_box((5px, 7px));
3
+ border: 1px solid hsl(0, 0%, 79%);
4
+ border-radius: 3px;
5
+ padding: 5px .9em;
6
+ margin: 0;
7
+ line-height: 1.65em;
8
+ box-shadow: transparent 0 0 0 2px inset;
9
+ transition: background-color .3s ease-out, box-shadow .15s ease, border-color .15s ease;
10
+ color: #666;
11
+ font-size: 14px;
12
+
13
+ &:focus {
14
+ box-shadow: 0 0 0 2px hsl(203, 47%, 65%) inset;
15
+ border-color: hsl(203, 47%, 65%);
16
+ background-color: #fff;
17
+ outline: none;
18
+ }
19
+
20
+ &.error {
21
+ border-color: hsl(0, 37%, 70%);
22
+ background-color: hsl(0, 47%, 98%);
23
+ &:focus {
24
+ border-color: hsl(0, 47%, 65%);
25
+ background-color: #fff;
26
+ box-shadow: 0 0 0 2px rgba($red, .8) inset;
27
+ }
28
+ }
29
+
30
+ &.dark {
31
+ background-color: #424242;
32
+ color: #eee;
33
+ text-shadow: #000 0 1px;
34
+ &:focus {
35
+ background-color: #333;
36
+ }
37
+ }
38
+ }
39
+
40
+ textarea {
41
+ @extend %text-input;
42
+ min-height: 10em;
43
+ width: 100%;
44
+ display: block;
45
+
46
+ label + & {
47
+ margin-top: .4em;
48
+ }
49
+
50
+ &.short {
51
+ min-height: 7em;
52
+ }
53
+ &.tiny {
54
+ min-height: 3em;
55
+ height: 3em;
56
+ }
57
+ }
58
+
59
+ [type=text], [type=password] {
60
+ @extend %text-input;
61
+ vertical-align: middle;
62
+ margin-right: .5em;
63
+
64
+ &.big {
65
+ font-size: 15px;
66
+ padding: { top: 10px; bottom: 10px; }
67
+ margin-right: .8em;
68
+ }
69
+ }
70
+
71
+ .input-label {
72
+ display: inline-block;
73
+ letter-spacing: -5px;
74
+ input { letter-spacing: 0; }
75
+
76
+ &:before, &:after {
77
+ color: #888;
78
+ letter-spacing: 0;
79
+ display: inline-block;
80
+ background: $softwhite;
81
+ border: 1px solid hsl(0, 0%, 79%);
82
+ padding: 0 .9em;
83
+ @include v-pad_box((5px, 7px));
84
+ font-size: 14px;
85
+ line-height: 1.65em;
86
+ box-shadow: transparent 0 0 0 2px inset;
87
+ }
88
+
89
+ &[data-suffix]{
90
+ margin-right: .4em;
91
+ input {
92
+ border-top-right-radius: 0px;
93
+ border-bottom-right-radius: 0px;
94
+ margin-right: 0;
95
+ }
96
+ &:after {
97
+ content: attr(data-suffix);
98
+ border-top-right-radius: 4px;
99
+ border-bottom-right-radius: 4px;
100
+ border-left: 0;
101
+ }
102
+ }
103
+
104
+ &[data-prefix]{
105
+ input {
106
+ border-top-left-radius: 0px;
107
+ border-bottom-left-radius: 0px;
108
+ }
109
+ &:before {
110
+ content: attr(data-prefix);
111
+ border-top-left-radius: 4px;
112
+ border-bottom-left-radius: 4px;
113
+ border-right: 0;
114
+ }
115
+ }
116
+
117
+ }
118
+
@@ -0,0 +1,39 @@
1
+ .grid {
2
+
3
+ /* ==========================================================================
4
+ * Horizontal alignment
5
+ * ========================================================================== */
6
+
7
+
8
+ /* ==========================================================================
9
+ * Vertical alignment
10
+ * ========================================================================== */
11
+
12
+ &.align-top, &.align-middle, &.align-bottom {
13
+ &:before {
14
+ content: '';
15
+ display: inline-block;
16
+ height: 100%;
17
+ }
18
+ }
19
+
20
+ // Top-aligned cells
21
+ &.align-top {
22
+ .grid-cell, &:before { vertical-align: top; }
23
+ }
24
+
25
+ // Middle-aligned cells
26
+ &.align-middle {
27
+ .grid-cell, &:before { vertical-align: middle; }
28
+ }
29
+
30
+ // Bottom-aligned cells
31
+ &.align-bottom {
32
+ .grid-cell, &:before { vertical-align: bottom; }
33
+ }
34
+ }
35
+
36
+ .text-left, .align-left { text-align: left; }
37
+ .text-center, .align-center { text-align: center; }
38
+ .text-right, .align-right { text-align: right; }
39
+
@@ -0,0 +1,144 @@
1
+ /* ==========================================================================
2
+ * Grid core
3
+ * ========================================================================== */
4
+
5
+ $grid-gutter: 4%;
6
+ $margin: 30px;
7
+
8
+ $grid-gutter-none: 0;
9
+ $grid-gutter-small: 2%;
10
+ $grid-gutter-large: 8%;
11
+
12
+ .grid {
13
+ display: block;
14
+ padding: 0;
15
+ $m: -.5 * $grid-gutter;
16
+ margin: { left: $m; right: $m; }
17
+ letter-spacing: -5px;
18
+ text-rendering: optimizespeed;
19
+
20
+ // Nested `grid` object adjustments
21
+ > .grid {
22
+ overflow: hidden;
23
+ margin-right: 0;
24
+ margin-left: 0;
25
+ }
26
+
27
+ /* ==========================================================================
28
+ * Gutter sizing
29
+ * ========================================================================== */
30
+
31
+ // No gutter (0%)
32
+ &.no-gutter {
33
+ $m: -.5 * $grid-gutter-none;
34
+ margin: { left: $m; right: $m; }
35
+ > .grid-cell {
36
+ padding: 0 0.5 * $grid-gutter-none;
37
+ }
38
+
39
+ &.match-gutters {
40
+ > .grid-cell {
41
+ padding: 0;
42
+ margin: { left: 0; right: 0; }
43
+ }
44
+ }
45
+ }
46
+
47
+ // Small gutter (2%)
48
+ &.small-gutter {
49
+ $m: -.5 * $grid-gutter-small;
50
+ margin: { left: $m; right: $m; }
51
+ > .grid-cell {
52
+ padding: 0 0.5 * $grid-gutter-small;
53
+ }
54
+
55
+ &.match-gutters {
56
+ > .grid-cell {
57
+ padding: 0 0.5 * $grid-gutter-small;
58
+ margin: { bottom: $grid-gutter-small; }
59
+ }
60
+ }
61
+ }
62
+
63
+ // Large gutter (8%)
64
+ &.large-gutter {
65
+ $m: -.5 * $grid-gutter-large;
66
+ margin: { left: $m; right: $m; }
67
+ > .grid-cell {
68
+ padding: 0 0.5 * $grid-gutter-large;
69
+ }
70
+
71
+ &.match-gutters {
72
+ > .grid-cell {
73
+ padding: 0 0.5 * $grid-gutter-large;
74
+ margin: { bottom: $grid-gutter-large; }
75
+ }
76
+ }
77
+ }
78
+
79
+
80
+ /* ==========================================================================
81
+ * Adhere to set gutter spacing & ignore inner elements' margin
82
+ * ========================================================================== */
83
+
84
+ &.match-gutters {
85
+ > .grid-cell {
86
+ padding: 0.5 * $grid-gutter;
87
+ @extend %destroy-margins;
88
+ }
89
+ }
90
+ }
91
+
92
+
93
+ // Grid cells - Apply `.x-of-x` classes to set width.
94
+ .grid-cell {
95
+ display: inline-block;
96
+ width: 100%;
97
+ margin: 0;
98
+ padding: 0 .5 * $grid-gutter;
99
+ text-align: left;
100
+ vertical-align: top;
101
+ letter-spacing: normal;
102
+ word-spacing: normal;
103
+ text-rendering: auto;
104
+ &.auto {
105
+ width: auto;
106
+ }
107
+ }
108
+
109
+ /* =====================================================================
110
+ * Cell sizing
111
+ * ===================================================================== */
112
+
113
+ $cell-sizes: (1:one, 2:two, 3:three, 4:four, 5:five, 6:six);
114
+
115
+ @mixin grid-cell($num) {
116
+ @for $i from 1 to $num {
117
+ .#{map-get($cell-sizes, $i)}-of-#{map-get($cell-sizes, $num)} {
118
+ width: 100%*$i/$num;
119
+ }
120
+ .small-#{map-get($cell-sizes, $i)}-of-#{map-get($cell-sizes, $num)} {
121
+ @include at-least($small) {
122
+ width: 100%*$i/$num;
123
+ }
124
+ }
125
+ .medium-#{map-get($cell-sizes, $i)}-of-#{map-get($cell-sizes, $num)} {
126
+ @include at-least($medium) {
127
+ width: 100%*$i/$num;
128
+ }
129
+ }
130
+ .large-#{map-get($cell-sizes, $i)}-of-#{map-get($cell-sizes, $num)} {
131
+ @include at-least($medium) {
132
+ width: 100%*$i/$num;
133
+ }
134
+ }
135
+ }
136
+ }
137
+
138
+ @include grid-cell(2);
139
+ @include grid-cell(3);
140
+ @include grid-cell(4);
141
+ @include grid-cell(5);
142
+ @include grid-cell(6);
143
+ .small-golden { width: 38.2%; }
144
+ .large-golden { width: 61.8%; }
@@ -0,0 +1,2 @@
1
+ @import "grid";
2
+ @import "alignment";
@@ -0,0 +1,10 @@
1
+ .header-actions {
2
+ text-align: right;
3
+ display: table-cell;
4
+ a, button {
5
+ margin-left: .8em;
6
+ }
7
+ > * {
8
+ display: inline-block;
9
+ }
10
+ }
@@ -0,0 +1,67 @@
1
+ $page-header-bg: #fafafa;
2
+
3
+ header {
4
+ h1,h2,h3,h4,h5,h6 {
5
+ margin: { top: $block-margin; bottom: $block-margin; }
6
+ }
7
+ }
8
+
9
+ .page-header, .main-header, .box-header {
10
+ display: table;
11
+ width: 100%;
12
+
13
+ > * {
14
+ vertical-align: middle;
15
+ }
16
+
17
+ h1,h2,h3,h4,h5,h6 {
18
+ display: table-cell;
19
+ }
20
+ }
21
+
22
+ .main-header {
23
+ margin: { top: $block-margin; bottom: $block-margin; }
24
+ }
25
+
26
+ .page-header {
27
+ background: $page-header-bg;
28
+ border-bottom: $page-border 1px solid;
29
+ @include h-pad_box;
30
+ height: $page-header-height;
31
+ position: relative;
32
+ z-index: 2;
33
+
34
+ h1 {
35
+ margin: 0;
36
+ font-size: 22px;
37
+ line-height: 1em;
38
+ font-weight: normal;
39
+ }
40
+
41
+ &.plain {
42
+ border-bottom: none;
43
+ background: none;
44
+ }
45
+
46
+ .breadcrumb {
47
+ font-weight: normal;
48
+ text-decoration: none;
49
+ }
50
+ }
51
+
52
+ .page-header-content {
53
+ padding-top: 14px;
54
+ padding-bottom: 15px;
55
+ display: table-cell;
56
+ }
57
+
58
+
59
+ .page-header-info {
60
+ font-size: 12px;
61
+ @extend .expand;
62
+ @extend .h-padded;
63
+ &:last-child {
64
+ position: relative;
65
+ top: 7px;
66
+ }
67
+ }
@@ -0,0 +1,4 @@
1
+ @import "base";
2
+ @import "actions";
3
+ @import "site-header";
4
+ @import "meta";
@@ -0,0 +1,10 @@
1
+ .header-cell {
2
+ display: table-cell;
3
+ }
4
+
5
+ .header-meta {
6
+ text-align: right;
7
+ display: table-cell;
8
+ padding-left: .8em;
9
+ font-size: 14px;
10
+ }
@@ -0,0 +1,8 @@
1
+ $header-pad: 15px;
2
+
3
+ .site-header {
4
+ text-shadow: darken($base-bg, 25) 0 -1px;
5
+ padding: $header-pad;
6
+ position: absolute;
7
+ width: 100%;
8
+ }
@@ -0,0 +1,301 @@
1
+ /* BASICS */
2
+
3
+ .CodeMirror {
4
+ /* Set height, width, borders, and global font properties here */
5
+ font-family: monospace;
6
+ height: 300px;
7
+ }
8
+ .CodeMirror-scroll {
9
+ /* Set scrolling behaviour here */
10
+ overflow: auto;
11
+ }
12
+
13
+ /* PADDING */
14
+
15
+ .CodeMirror-lines {
16
+ padding: 4px 0; /* Vertical padding around content */
17
+ }
18
+ .CodeMirror pre {
19
+ padding: 0 4px; /* Horizontal padding of content */
20
+ }
21
+
22
+ .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
23
+ background-color: white; /* The little square between H and V scrollbars */
24
+ }
25
+
26
+ /* GUTTER */
27
+
28
+ .CodeMirror-gutters {
29
+ border-right: 1px solid #ddd;
30
+ background-color: #f7f7f7;
31
+ white-space: nowrap;
32
+ }
33
+ .CodeMirror-linenumbers {}
34
+ .CodeMirror-linenumber {
35
+ padding: 0 3px 0 5px;
36
+ min-width: 20px;
37
+ text-align: right;
38
+ color: #999;
39
+ -moz-box-sizing: content-box;
40
+ box-sizing: content-box;
41
+ }
42
+
43
+ .CodeMirror-guttermarker { color: black; }
44
+ .CodeMirror-guttermarker-subtle { color: #999; }
45
+
46
+ /* CURSOR */
47
+
48
+ .CodeMirror div.CodeMirror-cursor {
49
+ border-left: 1px solid black;
50
+ }
51
+ /* Shown when moving in bi-directional text */
52
+ .CodeMirror div.CodeMirror-secondarycursor {
53
+ border-left: 1px solid silver;
54
+ }
55
+ .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
56
+ width: auto;
57
+ border: 0;
58
+ background: #7e7;
59
+ }
60
+ .cm-animate-fat-cursor {
61
+ width: auto;
62
+ border: 0;
63
+ -webkit-animation: blink 1.06s steps(1) infinite;
64
+ -moz-animation: blink 1.06s steps(1) infinite;
65
+ animation: blink 1.06s steps(1) infinite;
66
+ }
67
+ @-moz-keyframes blink {
68
+ 0% { background: #7e7; }
69
+ 50% { background: none; }
70
+ 100% { background: #7e7; }
71
+ }
72
+ @-webkit-keyframes blink {
73
+ 0% { background: #7e7; }
74
+ 50% { background: none; }
75
+ 100% { background: #7e7; }
76
+ }
77
+ @keyframes blink {
78
+ 0% { background: #7e7; }
79
+ 50% { background: none; }
80
+ 100% { background: #7e7; }
81
+ }
82
+
83
+ /* Can style cursor different in overwrite (non-insert) mode */
84
+ div.CodeMirror-overwrite div.CodeMirror-cursor {}
85
+
86
+ .cm-tab { display: inline-block; }
87
+
88
+ .CodeMirror-ruler {
89
+ border-left: 1px solid #ccc;
90
+ position: absolute;
91
+ }
92
+
93
+ /* DEFAULT THEME */
94
+
95
+ .cm-s-default .cm-keyword {color: #708;}
96
+ .cm-s-default .cm-atom {color: #219;}
97
+ .cm-s-default .cm-number {color: #164;}
98
+ .cm-s-default .cm-def {color: #00f;}
99
+ .cm-s-default .cm-variable,
100
+ .cm-s-default .cm-punctuation,
101
+ .cm-s-default .cm-property,
102
+ .cm-s-default .cm-operator {}
103
+ .cm-s-default .cm-variable-2 {color: #05a;}
104
+ .cm-s-default .cm-variable-3 {color: #085;}
105
+ .cm-s-default .cm-comment {color: #a50;}
106
+ .cm-s-default .cm-string {color: #a11;}
107
+ .cm-s-default .cm-string-2 {color: #f50;}
108
+ .cm-s-default .cm-meta {color: #555;}
109
+ .cm-s-default .cm-qualifier {color: #555;}
110
+ .cm-s-default .cm-builtin {color: #30a;}
111
+ .cm-s-default .cm-bracket {color: #997;}
112
+ .cm-s-default .cm-tag {color: #170;}
113
+ .cm-s-default .cm-attribute {color: #00c;}
114
+ .cm-s-default .cm-header {color: blue;}
115
+ .cm-s-default .cm-quote {color: #090;}
116
+ .cm-s-default .cm-hr {color: #999;}
117
+ .cm-s-default .cm-link {color: #00c;}
118
+
119
+ .cm-negative {color: #d44;}
120
+ .cm-positive {color: #292;}
121
+ .cm-header, .cm-strong {font-weight: bold;}
122
+ .cm-em {font-style: italic;}
123
+ .cm-link {text-decoration: underline;}
124
+
125
+ .cm-s-default .cm-error {color: #f00;}
126
+ .cm-invalidchar {color: #f00;}
127
+
128
+ /* Default styles for common addons */
129
+
130
+ div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
131
+ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
132
+ .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
133
+ .CodeMirror-activeline-background {background: #e8f2ff;}
134
+
135
+ /* STOP */
136
+
137
+ /* The rest of this file contains styles related to the mechanics of
138
+ the editor. You probably shouldn't touch them. */
139
+
140
+ .CodeMirror {
141
+ line-height: 1;
142
+ position: relative;
143
+ overflow: hidden;
144
+ background: white;
145
+ color: black;
146
+ }
147
+
148
+ .CodeMirror-scroll {
149
+ /* 30px is the magic margin used to hide the element's real scrollbars */
150
+ /* See overflow: hidden in .CodeMirror */
151
+ margin-bottom: -30px; margin-right: -30px;
152
+ padding-bottom: 30px;
153
+ height: 100%;
154
+ outline: none; /* Prevent dragging from highlighting the element */
155
+ position: relative;
156
+ -moz-box-sizing: content-box;
157
+ box-sizing: content-box;
158
+ }
159
+ .CodeMirror-sizer {
160
+ position: relative;
161
+ border-right: 30px solid transparent;
162
+ -moz-box-sizing: content-box;
163
+ box-sizing: content-box;
164
+ }
165
+
166
+ /* The fake, visible scrollbars. Used to force redraw during scrolling
167
+ before actuall scrolling happens, thus preventing shaking and
168
+ flickering artifacts. */
169
+ .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
170
+ position: absolute;
171
+ z-index: 6;
172
+ display: none;
173
+ }
174
+ .CodeMirror-vscrollbar {
175
+ right: 0; top: 0;
176
+ overflow-x: hidden;
177
+ overflow-y: scroll;
178
+ }
179
+ .CodeMirror-hscrollbar {
180
+ bottom: 0; left: 0;
181
+ overflow-y: hidden;
182
+ overflow-x: scroll;
183
+ }
184
+ .CodeMirror-scrollbar-filler {
185
+ right: 0; bottom: 0;
186
+ }
187
+ .CodeMirror-gutter-filler {
188
+ left: 0; bottom: 0;
189
+ }
190
+
191
+ .CodeMirror-gutters {
192
+ position: absolute; left: 0; top: 0;
193
+ padding-bottom: 30px;
194
+ z-index: 3;
195
+ }
196
+ .CodeMirror-gutter {
197
+ white-space: normal;
198
+ height: 100%;
199
+ -moz-box-sizing: content-box;
200
+ box-sizing: content-box;
201
+ padding-bottom: 30px;
202
+ margin-bottom: -32px;
203
+ display: inline-block;
204
+ /* Hack to make IE7 behave */
205
+ *zoom:1;
206
+ *display:inline;
207
+ }
208
+ .CodeMirror-gutter-elt {
209
+ position: absolute;
210
+ cursor: default;
211
+ z-index: 4;
212
+ }
213
+
214
+ .CodeMirror-lines {
215
+ cursor: text;
216
+ }
217
+ .CodeMirror pre {
218
+ /* Reset some styles that the rest of the page might have set */
219
+ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
220
+ border-width: 0;
221
+ background: transparent;
222
+ font-family: inherit;
223
+ font-size: inherit;
224
+ margin: 0;
225
+ white-space: pre;
226
+ word-wrap: normal;
227
+ line-height: inherit;
228
+ color: inherit;
229
+ z-index: 2;
230
+ position: relative;
231
+ overflow: visible;
232
+ }
233
+ .CodeMirror-wrap pre {
234
+ word-wrap: break-word;
235
+ white-space: pre-wrap;
236
+ word-break: normal;
237
+ }
238
+
239
+ .CodeMirror-linebackground {
240
+ position: absolute;
241
+ left: 0; right: 0; top: 0; bottom: 0;
242
+ z-index: 0;
243
+ }
244
+
245
+ .CodeMirror-linewidget {
246
+ position: relative;
247
+ z-index: 2;
248
+ overflow: auto;
249
+ }
250
+
251
+ .CodeMirror-widget {}
252
+
253
+ .CodeMirror-wrap .CodeMirror-scroll {
254
+ overflow-x: hidden;
255
+ }
256
+
257
+ .CodeMirror-measure {
258
+ position: absolute;
259
+ width: 100%;
260
+ height: 0;
261
+ overflow: hidden;
262
+ visibility: hidden;
263
+ }
264
+ .CodeMirror-measure pre { position: static; }
265
+
266
+ .CodeMirror div.CodeMirror-cursor {
267
+ position: absolute;
268
+ border-right: none;
269
+ width: 0;
270
+ }
271
+
272
+ div.CodeMirror-cursors {
273
+ visibility: hidden;
274
+ position: relative;
275
+ z-index: 1;
276
+ }
277
+ .CodeMirror-focused div.CodeMirror-cursors {
278
+ visibility: visible;
279
+ }
280
+
281
+ .CodeMirror-selected { background: #d9d9d9; }
282
+ .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
283
+ .CodeMirror-crosshair { cursor: crosshair; }
284
+
285
+ .cm-searching {
286
+ background: #ffa;
287
+ background: rgba(255, 255, 0, .4);
288
+ }
289
+
290
+ /* IE7 hack to prevent it from returning funny offsetTops on the spans */
291
+ .CodeMirror span { *vertical-align: text-bottom; }
292
+
293
+ /* Used to force a border model for a node */
294
+ .cm-force-border { padding-right: .1px; }
295
+
296
+ @media print {
297
+ /* Hide the cursor when printing */
298
+ .CodeMirror div.CodeMirror-cursors {
299
+ visibility: hidden;
300
+ }
301
+ }