underoos 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. data/.gitignore +8 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +5 -0
  4. data/Gemfile.lock +143 -0
  5. data/LICENSE +26 -0
  6. data/Procfile +1 -0
  7. data/README.md +13 -0
  8. data/Rakefile +12 -0
  9. data/app/assets/javascripts/styleguide.js +132 -0
  10. data/app/assets/javascripts/underoos.js +18 -0
  11. data/app/assets/stylesheets/base/_button-btn-mixin.sass +72 -0
  12. data/app/assets/stylesheets/base/_elements.sass +61 -0
  13. data/app/assets/stylesheets/base/_forms.sass +362 -0
  14. data/app/assets/stylesheets/base/_helpers.sass +54 -0
  15. data/app/assets/stylesheets/base/_normalize.sass +114 -0
  16. data/app/assets/stylesheets/base/_scaffold.sass +51 -0
  17. data/app/assets/stylesheets/base/_tables.sass +99 -0
  18. data/app/assets/stylesheets/base/_transitions.sass +17 -0
  19. data/app/assets/stylesheets/base/_typography.sass +185 -0
  20. data/app/assets/stylesheets/components/_accordions.sass +17 -0
  21. data/app/assets/stylesheets/components/_breadcrumbs.sass +22 -0
  22. data/app/assets/stylesheets/components/_button-groups.sass +46 -0
  23. data/app/assets/stylesheets/components/_carets.sass +24 -0
  24. data/app/assets/stylesheets/components/_carousels.sass +18 -0
  25. data/app/assets/stylesheets/components/_close.sass +25 -0
  26. data/app/assets/stylesheets/components/_decals.sass +27 -0
  27. data/app/assets/stylesheets/components/_dropdowns.sass +85 -0
  28. data/app/assets/stylesheets/components/_media.sass +33 -0
  29. data/app/assets/stylesheets/components/_modals.sass +28 -0
  30. data/app/assets/stylesheets/components/_nav-lists.sass +22 -0
  31. data/app/assets/stylesheets/components/_navbars.sass +105 -0
  32. data/app/assets/stylesheets/components/_notifications.sass +108 -0
  33. data/app/assets/stylesheets/components/_paddles.sass +34 -0
  34. data/app/assets/stylesheets/components/_pagination.sass +41 -0
  35. data/app/assets/stylesheets/components/_pills.sass +64 -0
  36. data/app/assets/stylesheets/components/_popovers.sass +55 -0
  37. data/app/assets/stylesheets/components/_progress-bars.sass +29 -0
  38. data/app/assets/stylesheets/components/_tabs.sass +93 -0
  39. data/app/assets/stylesheets/components/_tooltips.sass +46 -0
  40. data/app/assets/stylesheets/components/_wells.sass +16 -0
  41. data/app/assets/stylesheets/layouts/_containers.sass +15 -0
  42. data/app/assets/stylesheets/layouts/_print.sass +48 -0
  43. data/app/assets/stylesheets/layouts/_queries.sass +121 -0
  44. data/app/assets/stylesheets/layouts/_upgrades.sass +64 -0
  45. data/app/assets/stylesheets/mixins/_arrows.sass +40 -0
  46. data/app/assets/stylesheets/mixins/_clearfixins.sass +15 -0
  47. data/app/assets/stylesheets/mixins/_coloring.sass +6 -0
  48. data/app/assets/stylesheets/mixins/_columns.sass +19 -0
  49. data/app/assets/stylesheets/mixins/_conversions.sass +25 -0
  50. data/app/assets/stylesheets/mixins/_font-size.sass +6 -0
  51. data/app/assets/stylesheets/mixins/_image-tools.sass +13 -0
  52. data/app/assets/stylesheets/mixins/_ir.sass +9 -0
  53. data/app/assets/stylesheets/mixins/_mixins.sass +14 -0
  54. data/app/assets/stylesheets/mixins/_tab-focus.sass +7 -0
  55. data/app/assets/stylesheets/mixins/_timing-equations.sass +29 -0
  56. data/app/assets/stylesheets/mixins/_visibility.sass +43 -0
  57. data/app/assets/stylesheets/polyfills/_box-shadow.sass +7 -0
  58. data/app/assets/stylesheets/polyfills/_box-sizing.sass +8 -0
  59. data/app/assets/stylesheets/polyfills/_functions.sass +22 -0
  60. data/app/assets/stylesheets/polyfills/_inline-block.sass +8 -0
  61. data/app/assets/stylesheets/polyfills/_opacity.sass +6 -0
  62. data/app/assets/stylesheets/polyfills/_polyfills.sass +10 -0
  63. data/app/assets/stylesheets/polyfills/_transition.sass +9 -0
  64. data/app/assets/stylesheets/polyfills/_user-select.sass +8 -0
  65. data/app/assets/stylesheets/styleguide.sass +199 -0
  66. data/app/assets/stylesheets/themes/_default.sass +119 -0
  67. data/app/assets/stylesheets/underoos.sass +52 -0
  68. data/app/controllers/underoos/styleguides_controller.rb +79 -0
  69. data/app/views/shared/_upgrades.html.haml +12 -0
  70. data/app/views/underoos/styleguides/_assets.haml +42 -0
  71. data/app/views/underoos/styleguides/_components.haml +42 -0
  72. data/app/views/underoos/styleguides/_elements.haml +242 -0
  73. data/app/views/underoos/styleguides/_forms.haml +305 -0
  74. data/app/views/underoos/styleguides/_layouts.haml +76 -0
  75. data/app/views/underoos/styleguides/_palettes.haml +18 -0
  76. data/app/views/underoos/styleguides/_resources.haml +27 -0
  77. data/app/views/underoos/styleguides/_tables.haml +124 -0
  78. data/app/views/underoos/styleguides/_typography.haml +284 -0
  79. data/app/views/underoos/styleguides/_utilities.haml +270 -0
  80. data/app/views/underoos/styleguides/components/_accordions.haml +83 -0
  81. data/app/views/underoos/styleguides/components/_breadcrumbs.haml +42 -0
  82. data/app/views/underoos/styleguides/components/_button-groups.haml +162 -0
  83. data/app/views/underoos/styleguides/components/_carets.haml +28 -0
  84. data/app/views/underoos/styleguides/components/_close.haml +20 -0
  85. data/app/views/underoos/styleguides/components/_decals.haml +40 -0
  86. data/app/views/underoos/styleguides/components/_dropdowns.haml +189 -0
  87. data/app/views/underoos/styleguides/components/_media.haml +78 -0
  88. data/app/views/underoos/styleguides/components/_modals.haml +42 -0
  89. data/app/views/underoos/styleguides/components/_nav-lists.haml +52 -0
  90. data/app/views/underoos/styleguides/components/_navbars.haml +144 -0
  91. data/app/views/underoos/styleguides/components/_navs-showcase.haml +27 -0
  92. data/app/views/underoos/styleguides/components/_notifications.haml +169 -0
  93. data/app/views/underoos/styleguides/components/_paddles.haml +68 -0
  94. data/app/views/underoos/styleguides/components/_pagination.haml +64 -0
  95. data/app/views/underoos/styleguides/components/_popovers.haml +33 -0
  96. data/app/views/underoos/styleguides/components/_progress-bars.haml +72 -0
  97. data/app/views/underoos/styleguides/components/_tabs-pills.haml +241 -0
  98. data/app/views/underoos/styleguides/components/_tooltips.haml +37 -0
  99. data/app/views/underoos/styleguides/components/_wells.haml +29 -0
  100. data/app/views/underoos/styleguides/index.html.haml +259 -0
  101. data/app/views/underoos/styleguides/partials/_form-template.haml +171 -0
  102. data/app/views/underoos/styleguides/partials/_table-data.haml +33 -0
  103. data/app/views/underoos/styleguides/partials/_transitions.haml +136 -0
  104. data/config.ru +38 -0
  105. data/config/routes.rb +3 -0
  106. data/features/generator.feature +78 -0
  107. data/features/step_definitions/underoos_steps.rb +3 -0
  108. data/features/support/env.rb +9 -0
  109. data/lib/generators/underoos/assets_generator.rb +33 -0
  110. data/lib/underoos.rb +5 -0
  111. data/lib/underoos/engine.rb +8 -0
  112. data/lib/underoos/version.rb +3 -0
  113. data/public/apple-touch-icon-114x114-precomposed.png +0 -0
  114. data/public/apple-touch-icon-57x57-precomposed.png +0 -0
  115. data/public/apple-touch-icon-72x72-precomposed.png +0 -0
  116. data/public/apple-touch-icon-precomposed.png +0 -0
  117. data/public/apple-touch-icon.png +0 -0
  118. data/public/favicon.ico +0 -0
  119. data/script/javascripts +15 -0
  120. data/underoos.gemspec +29 -0
  121. data/vendor/assets/javascripts/bootstrap-alert.js +94 -0
  122. data/vendor/assets/javascripts/bootstrap-button.js +100 -0
  123. data/vendor/assets/javascripts/bootstrap-collapse.js +138 -0
  124. data/vendor/assets/javascripts/bootstrap-dropdown.js +92 -0
  125. data/vendor/assets/javascripts/bootstrap-modal.js +210 -0
  126. data/vendor/assets/javascripts/bootstrap-popover.js +95 -0
  127. data/vendor/assets/javascripts/bootstrap-scrollspy.js +125 -0
  128. data/vendor/assets/javascripts/bootstrap-tab.js +130 -0
  129. data/vendor/assets/javascripts/bootstrap-tooltip.js +270 -0
  130. data/vendor/assets/javascripts/bootstrap-transition.js +51 -0
  131. data/vendor/assets/javascripts/bootstrap-typeahead.js +271 -0
  132. data/vendor/assets/javascripts/prettify.js +28 -0
  133. metadata +246 -0
@@ -0,0 +1,16 @@
1
+
2
+ .well
3
+ +box-sizing(border-box)
4
+ border: 1px solid $component_border
5
+ border-radius: $radii
6
+ background-color: transparent
7
+ margin-bottom: 1.25em
8
+ padding: 1.25em
9
+ &.lite
10
+ background-color: $off_white
11
+ &.dark
12
+ background-color: $off_grey
13
+ &.primary
14
+ background-color: $primary
15
+ border-color: darken($primary, 30%)
16
+
@@ -0,0 +1,15 @@
1
+
2
+ .container
3
+ +box-sizing(border-box)
4
+ +clearfixer
5
+ max-width: $base_width * 1px
6
+ margin-left: auto
7
+ margin-right: auto
8
+ &.outer
9
+ padding-left: 1%
10
+ padding-right: 1%
11
+ &.fluid, &.fixed
12
+ max-width: none
13
+ &.fixed
14
+ width: $base_width * 1px
15
+
@@ -0,0 +1,48 @@
1
+
2
+ // A very basic print stylesheet based off http://html5boilerplate.com/
3
+ @media print
4
+ *
5
+ background: transparent !important
6
+ box-shadow: none !important
7
+ color: black !important
8
+ text-shadow: none !important
9
+ filter: none !important
10
+ -ms-filter: none !important
11
+
12
+ a, a:visited
13
+ text-decoration: underline
14
+
15
+ a[href]:after
16
+ content: " (" attr(href) ")"
17
+
18
+ abbr[title]:after
19
+ content: " (" attr(title) ")"
20
+
21
+ .ir a:after,
22
+ a[href^="javascript:"]:after,
23
+ a[href^="#"]:after
24
+ content: ""
25
+
26
+ pre, blockquote
27
+ border: 1px solid #999
28
+ page-break-inside: avoid
29
+
30
+ thead
31
+ display: table-header-group
32
+
33
+ tr, img
34
+ page-break-inside: avoid
35
+
36
+ img
37
+ max-width: 100% !important
38
+
39
+ @page
40
+ margin: 0.5cm
41
+
42
+ p, h2, h3
43
+ orphans: 3
44
+ widows: 3
45
+
46
+ h2, h3
47
+ page-break-after: avoid
48
+
@@ -0,0 +1,121 @@
1
+
2
+ // Mixin the container sizes
3
+ @mixin resize_containers($base_value)
4
+ .container
5
+ max-width: $base_value * 1px
6
+ &.fluid, &.fixed
7
+ max-width: none
8
+ &.fixed
9
+ width: $base_value * 1px
10
+
11
+ // Large screens
12
+ @media (min-width: 1200px)
13
+ +resize_containers(1200)
14
+
15
+ // Default desktop and tablet portrait
16
+ @media (min-width: 890px)
17
+ .nav-collapse.collapse
18
+ height: auto !important
19
+ overflow: visible !important
20
+
21
+ // This is the point where your navigation needs to collapse
22
+ @media (max-width: 889px)
23
+ .navbar.fixed
24
+ position: static
25
+ .navbar .nav-collapse
26
+ clear: left
27
+ .navbar .nav,
28
+ .navbar .nav > li
29
+ float: none
30
+
31
+ .navbar .dropdown-menu
32
+ +box-shadow(none)
33
+ background-color: transparent
34
+ border: none
35
+ border-radius: 0
36
+ position: static
37
+ top: auto
38
+ left: auto
39
+ display: block
40
+ float: none
41
+ margin: 0 0.5em
42
+ padding: 0
43
+ clip: auto
44
+ height: auto
45
+ width: auto
46
+ max-width: none
47
+ overflow: visible
48
+
49
+ .navbar .dropdown .dropdown-toggle,
50
+ .navbar .dropdown .dropdown-toggle:hover,
51
+ .navbar .dropdown .dropdown-toggle:active,
52
+ .navbar .nav .open > .dropdown-toggle,
53
+ .navbar .nav .active > .dropdown-toggle,
54
+ .navbar .nav .open.active > .dropdown-toggle
55
+ +box-shadow(none)
56
+ background-color: transparent
57
+ color: $component_normal
58
+ padding-bottom: 0.25em
59
+ text-shadow: none
60
+ cursor: default
61
+
62
+ .navbar .dropdown .caret
63
+ display: none
64
+
65
+ .btn-navbar
66
+ display: block
67
+
68
+ .nav-collapse
69
+ height: 0
70
+ overflow: hidden
71
+
72
+ .navbar .dropdown-menu .divider
73
+ display: none
74
+
75
+ .navbar form,
76
+ .navbar .pull-right
77
+ float: none
78
+
79
+ // Portrait tablet and below
80
+ @media (max-width: 768px)
81
+ +resize_containers(768)
82
+
83
+ // Landscape mobile and below
84
+ @media (max-width: 480px)
85
+ +resize_containers(480)
86
+
87
+ input[type="checkbox"],
88
+ input[type="radio"]
89
+ border: 1px solid #ccc
90
+
91
+ .form-horizontal,
92
+ .default-manage-form
93
+ li > label
94
+ float: none
95
+ padding-top: 0
96
+ text-align: left
97
+ width: auto
98
+
99
+ .boolean > label,
100
+ .choice > label,
101
+ .hint
102
+ padding-left: 0
103
+
104
+ .form-actions,
105
+ form .buttons
106
+ padding-left: 0.75em
107
+ padding-right: 0.75em
108
+
109
+ .modal
110
+ position: absolute
111
+ margin: 0
112
+ top: 10px
113
+ left: 10px
114
+ right: 10px
115
+ width: auto
116
+
117
+
118
+ // Portrait mobile
119
+ @media (max-width: 320px)
120
+ +resize_containers(320)
121
+
@@ -0,0 +1,64 @@
1
+
2
+ // The main container for the upgrade notification
3
+ #upgrade_notifications
4
+ display: none
5
+ color: $white
6
+ font-weight: bold
7
+ position: absolute
8
+ top: 10px
9
+ left: 10px
10
+ z-index: 99999
11
+
12
+ // Settings for the icon
13
+ #upgrade_notifications .upgrade-icon
14
+ background-color: $danger
15
+ border: 1px solid darken($danger, 10%)
16
+ cursor: pointer
17
+ font-size: 1em
18
+ line-height: 1
19
+ text-align: center
20
+ width: 1.2em
21
+ height: 1.2em
22
+
23
+ // Settings for block message
24
+ #upgrade_notifications .upgrade-notification
25
+ background-color: $danger
26
+ border: 1px solid darken($danger, 10%)
27
+ cursor: default
28
+ font-size: 0.85em
29
+ text-align: left
30
+ display: none
31
+ margin-top: 0.2em
32
+ padding: 0.75em
33
+ position: relative
34
+ top: 0
35
+ left: 0
36
+ width: 200px
37
+
38
+ // Make the links readable
39
+ #upgrade_notifications .upgrade-notification a
40
+ color: $white
41
+ text-decoration: underline
42
+
43
+ // Show the message on hover
44
+ #upgrade_notifications .upgrade-icon:hover .upgrade-notification
45
+ display: block
46
+
47
+ // Default all message containers to be hidden
48
+ #upgrade_notifications .upgrade-container
49
+ display: none
50
+
51
+ // Space out multiple containers
52
+ #upgrade_notifications .upgrade-container + .upgrade-container
53
+ margin-top: 1em
54
+
55
+ // Show the upgrade notifications if a condition is met
56
+ html.no-js #upgrade_notifications,
57
+ html.lt-ie8 #upgrade_notifications
58
+ display: block
59
+
60
+ // Show the correct notification container
61
+ html.no-js #upgrade_notifications #no_js,
62
+ html.lt-ie8 #upgrade_notifications #lt_ie8
63
+ display: block
64
+
@@ -0,0 +1,40 @@
1
+
2
+ // Mixins for creating arrows on pseudo elements
3
+
4
+ @mixin _arrow
5
+ position: absolute
6
+ width: 0
7
+ height: 0
8
+
9
+ // Set `top` and `left` positions from the caller
10
+ @mixin arrow_north($color:#000, $size:5px)
11
+ +_arrow
12
+ border-left: $size solid transparent
13
+ border-right: $size solid transparent
14
+ border-bottom: $size solid $color
15
+ margin-left: -$size
16
+
17
+ // Set `bottom` and `left` positions from the caller
18
+ @mixin arrow_south($color:#000, $size:5px)
19
+ +_arrow
20
+ border-left: $size solid transparent
21
+ border-right: $size solid transparent
22
+ border-top: $size solid $color
23
+ margin-left: -$size
24
+
25
+ // Set `top` and `right` positions from the caller
26
+ @mixin arrow_east($color:#000, $size:5px)
27
+ +_arrow
28
+ border-top: $size solid transparent
29
+ border-bottom: $size solid transparent
30
+ border-left: $size solid $color
31
+ margin-top: -$size
32
+
33
+ // Set `top` and `left` positions from the caller
34
+ @mixin arrow_west($color:#000, $size:5px)
35
+ +_arrow
36
+ border-top: $size solid transparent
37
+ border-bottom: $size solid transparent
38
+ border-right: $size solid $color
39
+ margin-top: -$size
40
+
@@ -0,0 +1,15 @@
1
+
2
+ // The [micro clearfix](http://nicolasgallagher.com/micro-clearfix-hack/)
3
+ @mixin clearfixer
4
+ *zoom: 1
5
+ &:before, &:after
6
+ content: ""
7
+ display: table
8
+ &:after
9
+ clear: both
10
+
11
+ // The standard `clearfix` found in Compass
12
+ @mixin clearfix
13
+ overflow: hidden
14
+ *zoom: 1
15
+
@@ -0,0 +1,6 @@
1
+
2
+ // Fills a background color and darkens the border based off a percentage
3
+ @mixin background-darken-border($color, $percentage:20%)
4
+ background-color: $color
5
+ border: 1px solid darken($color, $percentage)
6
+
@@ -0,0 +1,19 @@
1
+
2
+ // The base `column` settings, should be extended by all columns
3
+ @mixin base-column
4
+ +box-sizing(border-box)
5
+ display: block
6
+ float: left
7
+
8
+ // An alternate base `column` which floats elements to the right
9
+ @mixin base-column-right
10
+ +box-sizing(border-box)
11
+ display: block
12
+ float: right
13
+
14
+ // The base `row` settings, should be extended by all rows
15
+ @mixin base-row
16
+ +box-sizing(border-box)
17
+ +clearfixer
18
+ display: block
19
+
@@ -0,0 +1,25 @@
1
+
2
+ // Converts target `px` value to `em` in context constraints of the base font size
3
+ @function to_em($target_px, $context:$base_font_size)
4
+ @return ($target_px / $context) * 1em
5
+
6
+ // Converts target `px` value to `rem` in context constraints of the user's base font size
7
+ @function to_rem($target_px, $context:$context_px)
8
+ @return ($target_px / $context) * 1rem
9
+
10
+ // Converts target `px` value to `percentage` in context constraints of the container's width
11
+ @function to_percent($target_px, $context:$base_width)
12
+ @return percentage($target_px / $context)
13
+
14
+ // Returns the vertical rhythm in pixels calculated from the `$base_vertical` setting
15
+ @function vertical_pixel($target_px)
16
+ @return ($base_vertical / $target_px) * 1px
17
+
18
+ // Returns the vertical rhythm in em calculated from the `$base_vertical` setting
19
+ @function vertical_em($target_px)
20
+ @return to_em(($base_vertical / $target_px), $base_font_size)
21
+
22
+ // Returns the vertical rhythm in percent calculated from the `$base_vertical` setting
23
+ @function vertical_percent($target_px)
24
+ @return to_percent(($base_vertical / $target_px), $base_font_size)
25
+
@@ -0,0 +1,6 @@
1
+
2
+ // Use `rems` to insert a font size
3
+ @mixin font-size($target_px, $context:$context_px)
4
+ font-size: $target_px * 1px
5
+ font-size: to_rem($target_px, $context)
6
+
@@ -0,0 +1,13 @@
1
+
2
+ // Image interpolation from http://stitchcss.com/
3
+ @mixin sharpen-image
4
+ image-rendering: -moz-crisp-edges
5
+ -ms-interpolation-mode: nearest-neighbor
6
+
7
+ @mixin high-quality-image
8
+ image-rendering: optimizeQuality
9
+ -ms-interpolation-mode: bicubic
10
+
11
+ @mixin low-quality-image
12
+ image-rendering: optimizeSpeed
13
+
@@ -0,0 +1,9 @@
1
+
2
+ // Image replacement
3
+ @mixin ir
4
+ background-color: transparent
5
+ border: 0
6
+ color: transparent
7
+ font: 0/0 a
8
+ text-shadow: none
9
+
@@ -0,0 +1,14 @@
1
+
2
+ // underoos mixins
3
+ @import arrows
4
+ @import clearfixins
5
+ @import coloring
6
+ @import columns
7
+ @import conversions
8
+ @import font-size
9
+ @import image-tools
10
+ @import ir
11
+ @import tab-focus
12
+ @import timing-equations
13
+ @import visibility
14
+
@@ -0,0 +1,7 @@
1
+
2
+ // Sets normal focus behavior
3
+ @mixin tab-focus
4
+ outline: thin dotted
5
+ outline: 5px auto -webkit-focus-ring-color
6
+ outline-offset: -2px
7
+