dvl-core 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.hound.yml +5 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +2 -0
  6. data/LICENSE.md +20 -0
  7. data/README.md +35 -0
  8. data/circle.yml +7 -0
  9. data/dvl-core.gemspec +30 -0
  10. data/lib/dvl/core.rb +11 -0
  11. data/lib/dvl/core/version.rb +5 -0
  12. data/preview/app.rb +252 -0
  13. data/script/bootstrap +45 -0
  14. data/script/cibuild +3 -0
  15. data/script/preview +3 -0
  16. data/script/release +38 -0
  17. data/spec/dvl_core_spec.rb +30 -0
  18. data/vendor/assets/javascripts/dvl/core.js +4 -0
  19. data/vendor/assets/javascripts/dvl/core/buttons.js +116 -0
  20. data/vendor/assets/javascripts/dvl/core/dropdowns.js +161 -0
  21. data/vendor/assets/javascripts/dvl/core/modals.js +281 -0
  22. data/vendor/assets/javascripts/dvl/core/tooltips.js +478 -0
  23. data/vendor/assets/stylesheets/dvl/core.scss +21 -0
  24. data/vendor/assets/stylesheets/dvl/core/buttons.scss +152 -0
  25. data/vendor/assets/stylesheets/dvl/core/code.scss +31 -0
  26. data/vendor/assets/stylesheets/dvl/core/dropdowns.scss +309 -0
  27. data/vendor/assets/stylesheets/dvl/core/forms.scss +434 -0
  28. data/vendor/assets/stylesheets/dvl/core/grid.scss +87 -0
  29. data/vendor/assets/stylesheets/dvl/core/includes.scss +163 -0
  30. data/vendor/assets/stylesheets/dvl/core/labels.scss +31 -0
  31. data/vendor/assets/stylesheets/dvl/core/legacy.scss +287 -0
  32. data/vendor/assets/stylesheets/dvl/core/links.scss +53 -0
  33. data/vendor/assets/stylesheets/dvl/core/lists.scss +30 -0
  34. data/vendor/assets/stylesheets/dvl/core/media.scss +24 -0
  35. data/vendor/assets/stylesheets/dvl/core/modals.scss +173 -0
  36. data/vendor/assets/stylesheets/dvl/core/pagination.scss +70 -0
  37. data/vendor/assets/stylesheets/dvl/core/print.scss +69 -0
  38. data/vendor/assets/stylesheets/dvl/core/progress.scss +16 -0
  39. data/vendor/assets/stylesheets/dvl/core/resets.scss +92 -0
  40. data/vendor/assets/stylesheets/dvl/core/shame.scss +35 -0
  41. data/vendor/assets/stylesheets/dvl/core/sidebar.scss +101 -0
  42. data/vendor/assets/stylesheets/dvl/core/tables.scss +122 -0
  43. data/vendor/assets/stylesheets/dvl/core/tooltips.scss +87 -0
  44. data/vendor/assets/stylesheets/dvl/core/typography.scss +158 -0
  45. metadata +228 -0
@@ -0,0 +1,53 @@
1
+ /* ================================================================== *\
2
+ Links ($links)
3
+ \* ================================================================== */
4
+
5
+ /* 1. Remove the gray background color from active links in IE 10 */
6
+ a {
7
+ background: transparent;
8
+ color: $linkColor;
9
+ cursor: pointer;
10
+ text-decoration: none;
11
+ // Improve readability when focused or hovered in all browsers
12
+ // Address `outline` inconsistency between Chrome and other browsers
13
+ &.muted {
14
+ color: $darkerGray;
15
+ text-decoration: underline;
16
+ &:hover {
17
+ text-decoration: none;
18
+ }
19
+ }
20
+ &.smallbold {
21
+ font-weight: 600;
22
+ font-size: 0.9rem;
23
+ }
24
+ &:hover {
25
+ text-decoration: underline;
26
+ }
27
+ &:active,
28
+ &:hover {
29
+ outline: 0;
30
+ }
31
+ &:focus {
32
+ outline: thin dotted;
33
+ }
34
+ &.uppercase {
35
+ // #todo consolidate this with .caps
36
+ text-transform: uppercase;
37
+ color: $darkGray;
38
+ font-size: 0.85rem;
39
+ font-weight: 600;
40
+ letter-spacing: 0.04rem;
41
+ &:hover {
42
+ text-decoration: none;
43
+ color: $darkerGray;
44
+ }
45
+ }
46
+ &.subtle_icon {
47
+ color: $darkGray;
48
+ text-decoration: none;
49
+ &:hover {
50
+ color: $darkerGray;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,30 @@
1
+ /* Nested `list-style` types for ordered lists */
2
+
3
+ ul, ol {
4
+ margin: 0;
5
+ padding: 0;
6
+ list-style: none;
7
+ }
8
+
9
+ .rendered_from_wysiwyg,
10
+ .wysiwyg_wrapper {
11
+ ul, ol {
12
+ list-style-position: inside;
13
+ margin-left: 1rem;
14
+ }
15
+ ul {
16
+ list-style-type: disc;
17
+ }
18
+ ol {
19
+ list-style: decimal;
20
+ ol {
21
+ list-style: upper-alpha;
22
+ ol {
23
+ list-style: lower-roman;
24
+ ol {
25
+ list-style: lower-alpha;
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,24 @@
1
+ // Images, audio, videos
2
+
3
+
4
+ // display: fix for IE9
5
+ audio, canvas, video {
6
+ display: inline-block;
7
+ }
8
+
9
+ // Fluid-width audio and video
10
+ audio, video {
11
+ width: 100%;
12
+ }
13
+
14
+ img {
15
+ border: 0; // Remove the `border` when inside an <a> element in IE 8/9
16
+ vertical-align: middle; // Remove gap between <img> elements and the bottom of their containers - http://cbrac.co/Q6smqV
17
+ }
18
+
19
+ // Fluid-width media that maintain their aspect ratios
20
+ img, video {
21
+ max-width: 100%;
22
+ width: auto\9;
23
+ height: auto !important;
24
+ }
@@ -0,0 +1,173 @@
1
+ //
2
+ // Modals
3
+
4
+ // .modal-open - body class for killing the scroll
5
+ // .modal - container to scroll within
6
+ // .modal-dialog - positioning shell for the actual modal
7
+ // .modal-content - actual modal w/ bg and corners and shit
8
+
9
+
10
+ // Kill the scroll on the body
11
+ .modal-open {
12
+ overflow: hidden;
13
+ }
14
+
15
+ // Container that the modal scrolls within
16
+ .modal {
17
+ display: none;
18
+ overflow: hidden;
19
+ position: fixed;
20
+ top: 0;
21
+ right: 0;
22
+ bottom: 0;
23
+ left: 0;
24
+ z-index: 1040;
25
+ -webkit-overflow-scrolling: touch;
26
+
27
+ // Prevent Chrome on Windows from adding a focus outline. For details, see
28
+ // https://github.com/twbs/bootstrap/pull/10951.
29
+ outline: 0;
30
+ }
31
+
32
+ .modal-open .modal {
33
+ overflow-x: hidden;
34
+ overflow-y: auto;
35
+ }
36
+
37
+ // Shell div to position the modal with bottom padding
38
+ .modal_dialog {
39
+ position: relative;
40
+ width: auto;
41
+ margin: 10px;
42
+ }
43
+
44
+ // Actual modal
45
+ .modal_content {
46
+ position: relative;
47
+ background-color: #fff;
48
+ border: 1px solid rgba(#000,0.15);
49
+ border-radius: $radius * 2;
50
+ background-clip: padding-box;
51
+ // Remove focus outline from opened modal
52
+ outline: 0;
53
+ }
54
+
55
+ // Modal background
56
+ .modal-backdrop {
57
+ position: fixed;
58
+ top: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ left: 0;
62
+ background-color: #000;
63
+ // Fade for backdrop
64
+ &.fade {
65
+ opacity: 0;
66
+ }
67
+ &.in {
68
+ opacity: 0.5;
69
+ }
70
+ }
71
+
72
+ // Modal header
73
+ // Top section of the modal w/ title and dismiss
74
+ .modal_header {
75
+ padding: 1rem 2rem;
76
+ background-color: #f0f0f0;
77
+ margin-bottom: 1rem;
78
+ @include border_top_radius(($radius * 2) - 1);
79
+ position: relative;
80
+ h3 {
81
+ font-size: 1.6rem;
82
+ font-weight: normal;
83
+ margin: 0;
84
+ color: #333;
85
+ }
86
+ .close {
87
+ position: absolute;
88
+ top: -9px;
89
+ right: -9px;
90
+ color: #fff;
91
+ background-color: $darkestGray;
92
+ border-radius: 50%;
93
+ width: 24px;
94
+ height: 24px;
95
+ text-decoration: none;
96
+ text-align: center;
97
+ font-size: 20px;
98
+ line-height: 24px;
99
+ &:hover {
100
+ background-color: #4d4d4d;
101
+ }
102
+ }
103
+ }
104
+
105
+ // Title text within header
106
+ .modal_title {
107
+ margin: 0;
108
+ line-height: 20px;
109
+ }
110
+
111
+ // Modal body
112
+ // Where all modal content resides (sibling of .modal_header and .modal-footer)
113
+ .modal_body {
114
+ position: relative;
115
+ padding: 0 2rem 1.5rem;
116
+
117
+ > .loading {
118
+ font-size: 2rem;
119
+ text-align: center;
120
+ }
121
+ }
122
+
123
+ // Footer (for actions)
124
+ .modal_footer {
125
+ background-color: $lighterGray;
126
+ padding: 1rem 2rem;
127
+ text-align: right; // right align buttons
128
+ @include border_bottom_radius($radius * 2);
129
+
130
+ // Properly space out buttons
131
+ .btn + .btn {
132
+ margin-left: 5px;
133
+ margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
134
+ }
135
+ // but override that for button groups
136
+ .btn-group .btn + .btn {
137
+ margin-left: -1px;
138
+ }
139
+ // and override it for block buttons as well
140
+ .btn-block + .btn-block {
141
+ margin-left: 0;
142
+ }
143
+ }
144
+
145
+ .modal_confirm {
146
+ .modal_header {
147
+ background-color: $errorColor;
148
+ h3 {
149
+ color: #fff;
150
+ }
151
+ }
152
+ .modal_body p {
153
+ font-size: 1.1rem;
154
+ margin-bottom: 0;
155
+ }
156
+ }
157
+
158
+ // Measure scrollbar width for padding body during modal show/hide
159
+ .modal-scrollbar-measure {
160
+ position: absolute;
161
+ top: -9999px;
162
+ width: 50px;
163
+ height: 50px;
164
+ overflow: scroll;
165
+ }
166
+
167
+ // Scale up the modal
168
+ @media screen and (min-width: 768px) {
169
+ .modal_dialog {
170
+ margin: 30px auto;
171
+ width: 42rem;
172
+ }
173
+ }
@@ -0,0 +1,70 @@
1
+ .pagination-wrapper {
2
+ font-size: 13px;
3
+ text-align: center;
4
+ margin-top: 2rem;
5
+ ul {
6
+ display: inline-block;
7
+ li {
8
+ display: inline;
9
+ > a,
10
+ > span {
11
+ display: block;
12
+ float: left;
13
+ padding: 4px 5px;
14
+ min-width: 30px;
15
+ background-color: #eee;
16
+ text-decoration: none;
17
+ border-color: #ccc;
18
+ border-style: solid;
19
+ border-width: 1px 1px 1px 0;
20
+ }
21
+ &.active a {
22
+ background-color: #ddd;
23
+ color: #333;
24
+ font-weight: 600;
25
+ }
26
+ a:hover {
27
+ background-color: #ddd;
28
+ }
29
+ &:last-child {
30
+ a,
31
+ span {
32
+ @include border_right_radius($radius);
33
+ min-width: 25px;
34
+ }
35
+ }
36
+
37
+ &:first-child {
38
+ a,
39
+ span {
40
+ @include border_left_radius($radius);
41
+ border-left-width: 1px;
42
+ min-width: 25px;
43
+ }
44
+ }
45
+ }
46
+ }
47
+ &.page-header-pagination-wrapper {
48
+ margin-top: 0;
49
+ .pagination_status {
50
+ float: left;
51
+ line-height: 30px;
52
+ a {
53
+ font-weight: 600;
54
+ }
55
+ }
56
+ ul {
57
+ float: left;
58
+ margin: 0;
59
+ padding: 0 0 0 1rem;
60
+ }
61
+ }
62
+ }
63
+
64
+ @media only screen and (min-width: 640px) {
65
+ .page-header-pagination-wrapper {
66
+ position: absolute;
67
+ top: 0;
68
+ right: 0;
69
+ }
70
+ }
@@ -0,0 +1,69 @@
1
+ /* ================================================================== *\
2
+ Print ($print)
3
+ Inlined to avoid an extra HTTP request - http://cbrac.co/VUjfe3
4
+ \* ================================================================== */
5
+
6
+ @media print {
7
+ /* 1. Black prints faster - http://cbrac.co/XvusCs */
8
+ * {
9
+ background: transparent !important;
10
+ box-shadow: none !important;
11
+ color: #000 !important; /* 1 */
12
+ text-shadow: none !important;
13
+ }
14
+
15
+ @page {
16
+ margin: 0.5cm;
17
+ }
18
+
19
+ a,
20
+ a:visited {
21
+ text-decoration: underline;
22
+ }
23
+
24
+ a[href]:after {
25
+ content: " (" attr(href) ")";
26
+ }
27
+
28
+ /* Don’t show links for images, or javascript/internal links */
29
+ a[href^="#"]:after,
30
+ a[href^="javascript:"]:after,
31
+ .ir a:after {
32
+ content: "";
33
+ }
34
+
35
+ abbr[title]:after {
36
+ content: " (" attr(title) ")";
37
+ }
38
+
39
+ blockquote,
40
+ pre {
41
+ border: 1px solid $darkerGray;
42
+ page-break-inside: avoid;
43
+ }
44
+
45
+ h2,
46
+ h3,
47
+ p {
48
+ orphans: 3;
49
+ widows: 3;
50
+ }
51
+
52
+ h2,
53
+ h3 {
54
+ page-break-after: avoid;
55
+ }
56
+
57
+ img,
58
+ tr {
59
+ page-break-inside: avoid;
60
+ }
61
+
62
+ img {
63
+ max-width: 100% !important;
64
+ }
65
+
66
+ thead {
67
+ display: table-header-group; /* http://cbrac.co/Q6s1o2 */
68
+ }
69
+ }
@@ -0,0 +1,16 @@
1
+ // Progress bar
2
+
3
+ .progress {
4
+ border: 1px solid $darkGray;
5
+ margin: 0.25rem 0;
6
+ padding: 2px;
7
+ background: #fff;
8
+ font-size: 0;
9
+ color: transparent;
10
+ }
11
+
12
+ .progress_inner {
13
+ background: $purpleBlue;
14
+ height: 1.1rem;
15
+ max-width: 100%;
16
+ }
@@ -0,0 +1,92 @@
1
+ /* ================================================================== *\
2
+ Base ($base)
3
+ \* ================================================================== */
4
+
5
+ /* Viewport resizing */
6
+ @-webkit-viewport {
7
+ width: device-width;
8
+ zoom: 1.0;
9
+ }
10
+ @-moz-viewport {
11
+ width: device-width;
12
+ zoom: 1.0;
13
+ }
14
+ @-ms-viewport {
15
+ width: device-width;
16
+ zoom: 1.0;
17
+ }
18
+ @-o-viewport {
19
+ width: device-width;
20
+ zoom: 1.0;
21
+ }
22
+ @viewport {
23
+ width: device-width;
24
+ zoom: 1.0;
25
+ }
26
+
27
+ /**
28
+ * Box model adjustments
29
+ * `border-box`... ALL THE THINGS - http://cbrac.co/RQrDL5
30
+ */
31
+
32
+ *, *:before, *:after {
33
+ -webkit-box-sizing: border-box;
34
+ -moz-box-sizing: border-box;
35
+ box-sizing: border-box;
36
+ }
37
+
38
+ /* Correct `block` display not defined in IE 8/9 */
39
+ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
40
+ display: block;
41
+ }
42
+
43
+ /**
44
+ * Address [hidden] styling not present in IE 8/9
45
+ * Hide the <template> element in IE, Safari, and Firefox < 22
46
+ */
47
+
48
+ [hidden], template {
49
+ display: none;
50
+ }
51
+
52
+ /* Set <html> and <body> to inherit the height of the viewport */
53
+ html, body {
54
+ min-height: 100%;
55
+ }
56
+
57
+ /**
58
+ * 1. Force a vertical scrollbar - http://cbrac.co/163MspB
59
+ * 2. Remove text size adjustments without disabling user zoom
60
+ * NOTE: Use `text-rendering` with caution - http://cbrac.co/SJt8p1
61
+ * NOTE: Avoid the webkit anti-aliasing trap - http://cbrac.co/TAdhbH
62
+ * NOTE: IE for Windows Phone 8 ignores `-ms-text-size-adjust` if the
63
+ * viewport <meta> tag is used - http://cbrac.co/1cFrAvl
64
+ */
65
+
66
+ html {
67
+ overflow-y: scroll;
68
+ -webkit-text-size-adjust: 100%;
69
+ -ms-text-size-adjust: 100%;
70
+ text-size-adjust: 100%;
71
+ }
72
+
73
+ /**
74
+ * 1. Customize `background` for text selections
75
+ * 2. Remove `text-shadow` selection highlight - http://cbrac.co/Q6swON
76
+ */
77
+
78
+ ::-moz-selection, ::selection {
79
+ background: $selectionBackground;
80
+ text-shadow: none;
81
+ }
82
+
83
+
84
+ /* Change `background` for text selections when browser is unfocused */
85
+ ::selection:window-inactive {
86
+ background: $lightGray;
87
+ }
88
+
89
+ /* Remove `background` on images when selected */
90
+ img::selection, img::-moz-selection {
91
+ background: transparent;
92
+ }