reustyle 2.0.7

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 (358) hide show
  1. checksums.yaml +7 -0
  2. data/.drone.yml +17 -0
  3. data/.gitignore +25 -0
  4. data/.nvmrc +1 -0
  5. data/.rbenv-gemsets +1 -0
  6. data/.ruby-version +1 -0
  7. data/CONTRIBUTING.md +68 -0
  8. data/Gemfile +4 -0
  9. data/Gruntfile.js +234 -0
  10. data/LICENSE.txt +13 -0
  11. data/README.md +196 -0
  12. data/Rakefile +6 -0
  13. data/bower.json +54 -0
  14. data/config/autoprefixer.yml +6 -0
  15. data/config/scss-lint.yml +55 -0
  16. data/dist/icons.svg +1 -0
  17. data/dist/ustyle-content.css +1 -0
  18. data/dist/ustyle-latest.css +1 -0
  19. data/dist/ustyle.js +567 -0
  20. data/dist/ustyle.json +1 -0
  21. data/dist/ustyle.min.js +1 -0
  22. data/grunt/modules/dss-helper.js +115 -0
  23. data/grunt/modules/file.js +24 -0
  24. data/grunt/modules/html-parser.js +22 -0
  25. data/grunt/modules/templates.js +57 -0
  26. data/grunt/tasks/browser-sync.js +23 -0
  27. data/grunt/tasks/builder.js +67 -0
  28. data/grunt/tasks/styleguide.js +299 -0
  29. data/index.js +37 -0
  30. data/lib/ustyle/deploy.rb +41 -0
  31. data/lib/ustyle/engine.rb +32 -0
  32. data/lib/ustyle/hash.rb +44 -0
  33. data/lib/ustyle/helpers/icon_helper.rb +15 -0
  34. data/lib/ustyle/icons.rb +13 -0
  35. data/lib/ustyle/middleware/icon_middleware.rb +27 -0
  36. data/lib/ustyle/sass_functions.rb +65 -0
  37. data/lib/ustyle/sinatra.rb +34 -0
  38. data/lib/ustyle/sprockets.rb +6 -0
  39. data/lib/ustyle/utils.rb +42 -0
  40. data/lib/ustyle/version.rb +4 -0
  41. data/lib/ustyle.rb +58 -0
  42. data/package-lock.json +9303 -0
  43. data/package.json +89 -0
  44. data/styleguide/CNAME +1 -0
  45. data/styleguide/assets/images/CTAs.png +0 -0
  46. data/styleguide/assets/images/badge-label-usp.png +0 -0
  47. data/styleguide/assets/images/bower-logo.png +0 -0
  48. data/styleguide/assets/images/caveat.png +0 -0
  49. data/styleguide/assets/images/cloudfront-logo.png +0 -0
  50. data/styleguide/assets/images/design-conventions.png +0 -0
  51. data/styleguide/assets/images/error-texts.png +0 -0
  52. data/styleguide/assets/images/external-requirements.png +0 -0
  53. data/styleguide/assets/images/favicon/android-chrome-192x192.png +0 -0
  54. data/styleguide/assets/images/favicon/android-chrome-512x512.png +0 -0
  55. data/styleguide/assets/images/favicon/apple-touch-icon-114x114.png +0 -0
  56. data/styleguide/assets/images/favicon/apple-touch-icon-120x120.png +0 -0
  57. data/styleguide/assets/images/favicon/apple-touch-icon-144x144.png +0 -0
  58. data/styleguide/assets/images/favicon/apple-touch-icon-152x152.png +0 -0
  59. data/styleguide/assets/images/favicon/apple-touch-icon-180x180.png +0 -0
  60. data/styleguide/assets/images/favicon/apple-touch-icon-57x57.png +0 -0
  61. data/styleguide/assets/images/favicon/apple-touch-icon-60x60.png +0 -0
  62. data/styleguide/assets/images/favicon/apple-touch-icon-72x72.png +0 -0
  63. data/styleguide/assets/images/favicon/apple-touch-icon-76x76.png +0 -0
  64. data/styleguide/assets/images/favicon/apple-touch-icon.png +0 -0
  65. data/styleguide/assets/images/favicon/browserconfig.xml +9 -0
  66. data/styleguide/assets/images/favicon/favicon-16x16.png +0 -0
  67. data/styleguide/assets/images/favicon/favicon-32x32.png +0 -0
  68. data/styleguide/assets/images/favicon/favicon.ico +0 -0
  69. data/styleguide/assets/images/favicon/manifest.json +18 -0
  70. data/styleguide/assets/images/favicon/mstile-144x144.png +0 -0
  71. data/styleguide/assets/images/favicon/mstile-150x150.png +0 -0
  72. data/styleguide/assets/images/favicon/mstile-310x150.png +0 -0
  73. data/styleguide/assets/images/favicon/mstile-310x310.png +0 -0
  74. data/styleguide/assets/images/favicon/mstile-70x70.png +0 -0
  75. data/styleguide/assets/images/favicon/safari-pinned-tab.svg +46 -0
  76. data/styleguide/assets/images/icons.svg +1 -0
  77. data/styleguide/assets/images/infographic-01.png +0 -0
  78. data/styleguide/assets/images/infographic-02.png +0 -0
  79. data/styleguide/assets/images/npm-logo.png +0 -0
  80. data/styleguide/assets/images/placeholder-text.png +0 -0
  81. data/styleguide/assets/images/ruby-logo.png +0 -0
  82. data/styleguide/assets/images/site-consistency01.png +0 -0
  83. data/styleguide/assets/images/site-consistency02.png +0 -0
  84. data/styleguide/assets/images/site-consistency03.png +0 -0
  85. data/styleguide/assets/images/styleguide-examples/accurate-housing.jpg +0 -0
  86. data/styleguide/assets/images/styleguide-examples/altered.jpg +0 -0
  87. data/styleguide/assets/images/styleguide-examples/bad-subject.jpg +0 -0
  88. data/styleguide/assets/images/styleguide-examples/centered.jpg +0 -0
  89. data/styleguide/assets/images/styleguide-examples/cliche.jpg +0 -0
  90. data/styleguide/assets/images/styleguide-examples/cold.jpg +0 -0
  91. data/styleguide/assets/images/styleguide-examples/good-subject.jpg +0 -0
  92. data/styleguide/assets/images/styleguide-examples/illustrations_1.png +0 -0
  93. data/styleguide/assets/images/styleguide-examples/illustrations_2.png +0 -0
  94. data/styleguide/assets/images/styleguide-examples/illustrations_3.png +0 -0
  95. data/styleguide/assets/images/styleguide-examples/illustrations_4.png +0 -0
  96. data/styleguide/assets/images/styleguide-examples/illustrations_5.png +0 -0
  97. data/styleguide/assets/images/styleguide-examples/illustrations_6.png +0 -0
  98. data/styleguide/assets/images/styleguide-examples/innaccurate-housing.jpg +0 -0
  99. data/styleguide/assets/images/styleguide-examples/natural-1.jpg +0 -0
  100. data/styleguide/assets/images/styleguide-examples/natural-2.jpg +0 -0
  101. data/styleguide/assets/images/styleguide-examples/natural-3.jpg +0 -0
  102. data/styleguide/assets/images/styleguide-examples/not-centered.jpg +0 -0
  103. data/styleguide/assets/images/styleguide-examples/realistic.jpg +0 -0
  104. data/styleguide/assets/images/styleguide-examples/unaltered.jpg +0 -0
  105. data/styleguide/assets/images/styleguide-examples/unnatural-1.jpg +0 -0
  106. data/styleguide/assets/images/styleguide-examples/unnatural-2.jpg +0 -0
  107. data/styleguide/assets/images/styleguide-examples/unnatural-3.jpg +0 -0
  108. data/styleguide/assets/images/styleguide-examples/warm.jpg +0 -0
  109. data/styleguide/assets/images/tone-framework.png +0 -0
  110. data/styleguide/assets/images/tone.png +0 -0
  111. data/styleguide/assets/images/tooltip.png +0 -0
  112. data/styleguide/assets/images/tsandcs.png +0 -0
  113. data/styleguide/assets/images/ustyle.svg +73 -0
  114. data/styleguide/assets/images/ux-conventions-consistency.png +0 -0
  115. data/styleguide/assets/images/ux-conventions-error.png +0 -0
  116. data/styleguide/assets/images/ux-conventions-errors.png +0 -0
  117. data/styleguide/assets/images/ux-conventions-flexibility.png +0 -0
  118. data/styleguide/assets/images/ux-conventions-freedom.png +0 -0
  119. data/styleguide/assets/images/ux-conventions-minimalist.png +0 -0
  120. data/styleguide/assets/images/ux-conventions-real-world.png +0 -0
  121. data/styleguide/assets/images/ux-conventions-recognition.png +0 -0
  122. data/styleguide/assets/images/ux-conventions-visibility.png +0 -0
  123. data/styleguide/assets/javascripts/app.js +115 -0
  124. data/styleguide/assets/javascripts/modules/stats.js +50 -0
  125. data/styleguide/assets/javascripts/vendor/highlight.js +1 -0
  126. data/styleguide/assets/javascripts/vendor/svg4everybody.js +1 -0
  127. data/styleguide/assets/sass/main.scss +42 -0
  128. data/styleguide/assets/sass/modules/_code.scss +8 -0
  129. data/styleguide/assets/sass/modules/_colours.scss +26 -0
  130. data/styleguide/assets/sass/modules/_copyright.scss +4 -0
  131. data/styleguide/assets/sass/modules/_grid.scss +12 -0
  132. data/styleguide/assets/sass/modules/_home.scss +5 -0
  133. data/styleguide/assets/sass/modules/_images.scss +24 -0
  134. data/styleguide/assets/sass/modules/_links.scss +3 -0
  135. data/styleguide/assets/sass/modules/_logo.scss +182 -0
  136. data/styleguide/assets/sass/modules/_made-at.scss +6 -0
  137. data/styleguide/assets/sass/modules/_markdown.scss +7 -0
  138. data/styleguide/assets/sass/modules/_nav-mobile.scss +72 -0
  139. data/styleguide/assets/sass/modules/_nav.scss +32 -0
  140. data/styleguide/assets/sass/modules/_sidebar.scss +94 -0
  141. data/styleguide/assets/sass/modules/_states.scss +4 -0
  142. data/styleguide/assets/sass/modules/_styleguide.scss +138 -0
  143. data/styleguide/assets/sass/modules/_table.scss +3 -0
  144. data/styleguide/assets/sass/modules/_tooltip.scss +9 -0
  145. data/styleguide/assets/sass/modules/_typography.scss +14 -0
  146. data/styleguide/assets/sass/modules/_version.scss +11 -0
  147. data/styleguide/assets/sass/structure/_base.scss +18 -0
  148. data/styleguide/assets/sass/structure/_header.scss +12 -0
  149. data/styleguide/assets/sass/vendor/_highlight.scss +139 -0
  150. data/styleguide/assets/sass/vendor/_pure-table.scss +75 -0
  151. data/styleguide/content/brand/index.md +47 -0
  152. data/styleguide/content/brand/logo.tpl +279 -0
  153. data/styleguide/content/design/accessibility-testing.md +82 -0
  154. data/styleguide/content/design/index.tpl +367 -0
  155. data/styleguide/content/design/typography.md +68 -0
  156. data/styleguide/content/design/validating-designs.tpl +304 -0
  157. data/styleguide/content/index.tpl +51 -0
  158. data/styleguide/content/language/grammar.md +220 -0
  159. data/styleguide/content/language/microcopy.md +170 -0
  160. data/styleguide/content/language/tone.md +135 -0
  161. data/styleguide/content/pattern-library/grid.tpl +64 -0
  162. data/styleguide/content/pattern-library/index.tpl +88 -0
  163. data/styleguide/partials/_footer.tpl +8 -0
  164. data/styleguide/partials/_head.tpl +26 -0
  165. data/styleguide/partials/_header.tpl +37 -0
  166. data/styleguide/partials/_sidebar.tpl +27 -0
  167. data/styleguide/partials/colour.tpl +24 -0
  168. data/styleguide/partials/icons.tpl +28 -0
  169. data/styleguide/partials/style_block.tpl +44 -0
  170. data/styleguide/templates/simple.tpl +25 -0
  171. data/styleguide/templates/stats.tpl +50 -0
  172. data/styleguide/templates/styleguide.tpl +36 -0
  173. data/tasks/publish.rake +67 -0
  174. data/ustyle.gemspec +32 -0
  175. data/vendor/assets/images/forms/checkbox-rebrand.svg +1 -0
  176. data/vendor/assets/images/forms/checkbox.svg +1 -0
  177. data/vendor/assets/images/icons/alarm.svg +1 -0
  178. data/vendor/assets/images/icons/android.svg +1 -0
  179. data/vendor/assets/images/icons/arrow-circle.svg +1 -0
  180. data/vendor/assets/images/icons/arrow-down.svg +1 -0
  181. data/vendor/assets/images/icons/arrow-up.svg +1 -0
  182. data/vendor/assets/images/icons/book.svg +1 -0
  183. data/vendor/assets/images/icons/bookmark.svg +1 -0
  184. data/vendor/assets/images/icons/breadcrumb.svg +1 -0
  185. data/vendor/assets/images/icons/calculator.svg +1 -0
  186. data/vendor/assets/images/icons/calendar.svg +1 -0
  187. data/vendor/assets/images/icons/car.svg +1 -0
  188. data/vendor/assets/images/icons/checkbox-tick.svg +1 -0
  189. data/vendor/assets/images/icons/chevron-left.svg +1 -0
  190. data/vendor/assets/images/icons/chevron-right.svg +1 -0
  191. data/vendor/assets/images/icons/clock.svg +1 -0
  192. data/vendor/assets/images/icons/close.svg +1 -0
  193. data/vendor/assets/images/icons/cog.svg +1 -0
  194. data/vendor/assets/images/icons/controller.svg +1 -0
  195. data/vendor/assets/images/icons/credit-card.svg +1 -0
  196. data/vendor/assets/images/icons/cross.svg +1 -0
  197. data/vendor/assets/images/icons/dashcam.svg +1 -0
  198. data/vendor/assets/images/icons/dual-fuel.svg +1 -0
  199. data/vendor/assets/images/icons/electric-light.svg +1 -0
  200. data/vendor/assets/images/icons/envelope.svg +1 -0
  201. data/vendor/assets/images/icons/exit-noexit.svg +1 -0
  202. data/vendor/assets/images/icons/facebook-brand.svg +1 -0
  203. data/vendor/assets/images/icons/facebook.svg +1 -0
  204. data/vendor/assets/images/icons/filter.svg +1 -0
  205. data/vendor/assets/images/icons/fixed-variable.svg +1 -0
  206. data/vendor/assets/images/icons/gas.svg +1 -0
  207. data/vendor/assets/images/icons/gauge.svg +1 -0
  208. data/vendor/assets/images/icons/github.svg +1 -0
  209. data/vendor/assets/images/icons/google-brand.svg +1 -0
  210. data/vendor/assets/images/icons/google.svg +1 -0
  211. data/vendor/assets/images/icons/graph-up.svg +1 -0
  212. data/vendor/assets/images/icons/home.svg +1 -0
  213. data/vendor/assets/images/icons/hot.svg +1 -0
  214. data/vendor/assets/images/icons/info.svg +1 -0
  215. data/vendor/assets/images/icons/kettle.svg +1 -0
  216. data/vendor/assets/images/icons/key.svg +1 -0
  217. data/vendor/assets/images/icons/lock.svg +1 -0
  218. data/vendor/assets/images/icons/magnify-in.svg +1 -0
  219. data/vendor/assets/images/icons/magnify.svg +1 -0
  220. data/vendor/assets/images/icons/menu.svg +1 -0
  221. data/vendor/assets/images/icons/message.svg +1 -0
  222. data/vendor/assets/images/icons/mobile.svg +1 -0
  223. data/vendor/assets/images/icons/monthly-dd.svg +1 -0
  224. data/vendor/assets/images/icons/network.svg +1 -0
  225. data/vendor/assets/images/icons/no-exit.svg +1 -0
  226. data/vendor/assets/images/icons/pdf.svg +1 -0
  227. data/vendor/assets/images/icons/pencil.svg +1 -0
  228. data/vendor/assets/images/icons/person-add.svg +1 -0
  229. data/vendor/assets/images/icons/person.svg +1 -0
  230. data/vendor/assets/images/icons/phone.svg +1 -0
  231. data/vendor/assets/images/icons/piggy-bank.svg +1 -0
  232. data/vendor/assets/images/icons/pin.svg +1 -0
  233. data/vendor/assets/images/icons/play.svg +1 -0
  234. data/vendor/assets/images/icons/pound-circle.svg +1 -0
  235. data/vendor/assets/images/icons/pound-note.svg +1 -0
  236. data/vendor/assets/images/icons/present.svg +1 -0
  237. data/vendor/assets/images/icons/print.svg +1 -0
  238. data/vendor/assets/images/icons/quarterly-dd.svg +1 -0
  239. data/vendor/assets/images/icons/question-circle.svg +1 -0
  240. data/vendor/assets/images/icons/quote.svg +1 -0
  241. data/vendor/assets/images/icons/recycle.svg +1 -0
  242. data/vendor/assets/images/icons/remove.svg +1 -0
  243. data/vendor/assets/images/icons/renewable.svg +1 -0
  244. data/vendor/assets/images/icons/results.svg +1 -0
  245. data/vendor/assets/images/icons/save.svg +1 -0
  246. data/vendor/assets/images/icons/share.svg +1 -0
  247. data/vendor/assets/images/icons/shield.svg +1 -0
  248. data/vendor/assets/images/icons/sim.svg +1 -0
  249. data/vendor/assets/images/icons/smiley.svg +1 -0
  250. data/vendor/assets/images/icons/sort.svg +1 -0
  251. data/vendor/assets/images/icons/speech-circle.svg +1 -0
  252. data/vendor/assets/images/icons/speech.svg +1 -0
  253. data/vendor/assets/images/icons/spinner-rebrand.svg +1 -0
  254. data/vendor/assets/images/icons/spinner.svg +1 -0
  255. data/vendor/assets/images/icons/star-half.svg +1 -0
  256. data/vendor/assets/images/icons/star.svg +1 -0
  257. data/vendor/assets/images/icons/starline-half.svg +1 -0
  258. data/vendor/assets/images/icons/starline.svg +1 -0
  259. data/vendor/assets/images/icons/talk.svg +1 -0
  260. data/vendor/assets/images/icons/tick-circle.svg +1 -0
  261. data/vendor/assets/images/icons/tick.svg +1 -0
  262. data/vendor/assets/images/icons/tv.svg +1 -0
  263. data/vendor/assets/images/icons/twitter-brand.svg +1 -0
  264. data/vendor/assets/images/icons/twitter.svg +1 -0
  265. data/vendor/assets/images/icons/ustyle.svg +1 -0
  266. data/vendor/assets/images/icons/uswitch.svg +1 -0
  267. data/vendor/assets/images/icons/variable.svg +1 -0
  268. data/vendor/assets/images/icons/warning-circle.svg +1 -0
  269. data/vendor/assets/images/icons/warning.svg +1 -0
  270. data/vendor/assets/images/icons/wifi.svg +1 -0
  271. data/vendor/assets/images/icons/wiki.svg +1 -0
  272. data/vendor/assets/images/icons/xml.svg +1 -0
  273. data/vendor/assets/images/icons.svg +1 -0
  274. data/vendor/assets/javascripts/ustyle/backdrop.js +56 -0
  275. data/vendor/assets/javascripts/ustyle/classtoggler.js +76 -0
  276. data/vendor/assets/javascripts/ustyle/overlay.js +152 -0
  277. data/vendor/assets/javascripts/ustyle/tabs.js +166 -0
  278. data/vendor/assets/javascripts/ustyle/utils.js +113 -0
  279. data/vendor/assets/javascripts/ustyle.js +4 -0
  280. data/vendor/assets/stylesheets/rebrand-content.scss +1 -0
  281. data/vendor/assets/stylesheets/rebrand.scss +1 -0
  282. data/vendor/assets/stylesheets/ustyle/_all.scss +55 -0
  283. data/vendor/assets/stylesheets/ustyle/_content.scss +5 -0
  284. data/vendor/assets/stylesheets/ustyle/_global.scss +20 -0
  285. data/vendor/assets/stylesheets/ustyle/articles/_base.scss +100 -0
  286. data/vendor/assets/stylesheets/ustyle/articles/_guide.scss +57 -0
  287. data/vendor/assets/stylesheets/ustyle/articles/_more.scss +31 -0
  288. data/vendor/assets/stylesheets/ustyle/articles/_news.scss +213 -0
  289. data/vendor/assets/stylesheets/ustyle/articles/_related.scss +76 -0
  290. data/vendor/assets/stylesheets/ustyle/basics/_extends.scss +73 -0
  291. data/vendor/assets/stylesheets/ustyle/basics/_fonts.scss +27 -0
  292. data/vendor/assets/stylesheets/ustyle/basics/_functions.scss +78 -0
  293. data/vendor/assets/stylesheets/ustyle/basics/_grid.scss +86 -0
  294. data/vendor/assets/stylesheets/ustyle/basics/_typography.scss +123 -0
  295. data/vendor/assets/stylesheets/ustyle/basics/_variables.scss +166 -0
  296. data/vendor/assets/stylesheets/ustyle/basics/variables/_colors.scss +94 -0
  297. data/vendor/assets/stylesheets/ustyle/basics/variables/_forms.scss +98 -0
  298. data/vendor/assets/stylesheets/ustyle/basics/variables/_icons.scss +43 -0
  299. data/vendor/assets/stylesheets/ustyle/components/_backdrop.scss +23 -0
  300. data/vendor/assets/stylesheets/ustyle/components/_breadcrumbs.scss +66 -0
  301. data/vendor/assets/stylesheets/ustyle/components/_button.scss +187 -0
  302. data/vendor/assets/stylesheets/ustyle/components/_calculator.scss +41 -0
  303. data/vendor/assets/stylesheets/ustyle/components/_comp-table-row.scss +341 -0
  304. data/vendor/assets/stylesheets/ustyle/components/_compliance-banner.scss +38 -0
  305. data/vendor/assets/stylesheets/ustyle/components/_content-group.scss +33 -0
  306. data/vendor/assets/stylesheets/ustyle/components/_cta.scss +66 -0
  307. data/vendor/assets/stylesheets/ustyle/components/_grid-classes.scss +52 -0
  308. data/vendor/assets/stylesheets/ustyle/components/_hero.scss +115 -0
  309. data/vendor/assets/stylesheets/ustyle/components/_links.scss +26 -0
  310. data/vendor/assets/stylesheets/ustyle/components/_lists-li.scss +92 -0
  311. data/vendor/assets/stylesheets/ustyle/components/_lists.scss +39 -0
  312. data/vendor/assets/stylesheets/ustyle/components/_loader.scss +139 -0
  313. data/vendor/assets/stylesheets/ustyle/components/_overlay.scss +183 -0
  314. data/vendor/assets/stylesheets/ustyle/components/_progress.scss +138 -0
  315. data/vendor/assets/stylesheets/ustyle/components/_promo-banner.scss +131 -0
  316. data/vendor/assets/stylesheets/ustyle/components/_reminder.scss +87 -0
  317. data/vendor/assets/stylesheets/ustyle/components/_tab-navigation.scss +114 -0
  318. data/vendor/assets/stylesheets/ustyle/components/_table-toolbar.scss +91 -0
  319. data/vendor/assets/stylesheets/ustyle/components/_tabs.scss +300 -0
  320. data/vendor/assets/stylesheets/ustyle/components/_tooltip.scss +243 -0
  321. data/vendor/assets/stylesheets/ustyle/components/_usp.scss +88 -0
  322. data/vendor/assets/stylesheets/ustyle/content/_base.scss +227 -0
  323. data/vendor/assets/stylesheets/ustyle/content/_c-header.scss +27 -0
  324. data/vendor/assets/stylesheets/ustyle/content/_c-social.scss +9 -0
  325. data/vendor/assets/stylesheets/ustyle/content/_c-tabs.scss +30 -0
  326. data/vendor/assets/stylesheets/ustyle/forms/_base.scss +9 -0
  327. data/vendor/assets/stylesheets/ustyle/forms/_fields.scss +78 -0
  328. data/vendor/assets/stylesheets/ustyle/forms/_input-group.scss +154 -0
  329. data/vendor/assets/stylesheets/ustyle/forms/_input.scss +61 -0
  330. data/vendor/assets/stylesheets/ustyle/forms/_radio-checkbox.scss +144 -0
  331. data/vendor/assets/stylesheets/ustyle/forms/_reset.scss +21 -0
  332. data/vendor/assets/stylesheets/ustyle/forms/_select.scss +154 -0
  333. data/vendor/assets/stylesheets/ustyle/forms/_textarea.scss +33 -0
  334. data/vendor/assets/stylesheets/ustyle/forms/_toggle.scss +114 -0
  335. data/vendor/assets/stylesheets/ustyle/forms/_validation.scss +104 -0
  336. data/vendor/assets/stylesheets/ustyle/icons/_base.scss +241 -0
  337. data/vendor/assets/stylesheets/ustyle/mixins/_arrow.scss +51 -0
  338. data/vendor/assets/stylesheets/ustyle/mixins/_base.scss +7 -0
  339. data/vendor/assets/stylesheets/ustyle/mixins/_baseline.scss +43 -0
  340. data/vendor/assets/stylesheets/ustyle/mixins/_forms.scss +84 -0
  341. data/vendor/assets/stylesheets/ustyle/mixins/_general.scss +24 -0
  342. data/vendor/assets/stylesheets/ustyle/mixins/_link-colors.scss +44 -0
  343. data/vendor/assets/stylesheets/ustyle/mixins/_media-query.scss +121 -0
  344. data/vendor/assets/stylesheets/ustyle/mixins/_typography.scss +98 -0
  345. data/vendor/assets/stylesheets/ustyle/tables/_base.scss +4 -0
  346. data/vendor/assets/stylesheets/ustyle/tables/_tables-basic.scss +72 -0
  347. data/vendor/assets/stylesheets/ustyle/tables/_tables-sortable.scss +72 -0
  348. data/vendor/assets/stylesheets/ustyle/tables/_tables-with-key-cells.scss +18 -0
  349. data/vendor/assets/stylesheets/ustyle/tables/_variables.scss +15 -0
  350. data/vendor/assets/stylesheets/ustyle/utilities/_general.scss +116 -0
  351. data/vendor/assets/stylesheets/ustyle/utilities/_grid.scss +13 -0
  352. data/vendor/assets/stylesheets/ustyle/utilities/_images.scss +34 -0
  353. data/vendor/assets/stylesheets/ustyle/utilities/_responsive.scss +101 -0
  354. data/vendor/assets/stylesheets/ustyle/utilities/_spacing.scss +73 -0
  355. data/vendor/assets/stylesheets/ustyle/vendor/normalize.scss +427 -0
  356. data/vendor/assets/stylesheets/ustyle-content.scss +2 -0
  357. data/vendor/assets/stylesheets/ustyle.scss +1 -0
  358. metadata +517 -0
@@ -0,0 +1,213 @@
1
+ // @page Pattern Library/Articles
2
+ // @name News article
3
+ //
4
+ // @description
5
+ // The news item article standard. It mirrors the guide article. The news item image is a background image as the problem of not displaying `<img>` tags on mobile hasn't been resolved.
6
+ //
7
+ // @markup
8
+ // <div class='us-article-group'>
9
+ // <div class='us-news-item us-col-md-4'>
10
+ // <a class='us-news-item-link' href='#'>
11
+ // <div class='us-news-item-image-container'>
12
+ // <div class='us-news-item-image background' style='background-image: url(https://assets0.uswitch.com/s3/uswitch-wp-cms-assets/money/guides/wp-content/uploads/2014/11/DB2011AU01018_SMALL.jpg)'></div>
13
+ // </div>
14
+ // <div class='us-news-meta'>
15
+ // <span class='category'>Consumer rights</span>
16
+ // <span class='date'>14 Nov 2014</span>
17
+ // </div>
18
+ // <h3 class='us-news-item-title'>Customer uses promoted tweet to complain about BA</h3>
19
+ // <p class='us-news-item-snippet'>Sign of things to come? Social media helps to empower disgruntled consumer amid lost luggage row</p>
20
+ // <div class='us-news-item-readmore'>
21
+ // <span class='us-news-item-readmorelink'>More consumer rights</span>
22
+ // </div>
23
+ // </a>
24
+ // </div>
25
+ // </div>
26
+
27
+ $item-padding: 9px;
28
+ $news-item-image-size: 128px !default;
29
+ $base-item-image-size: $news-item-image-size;
30
+
31
+ %base-item {
32
+ margin-bottom: 1em;
33
+
34
+ &:hover {
35
+ %base-item-image {
36
+ opacity: .8;
37
+ }
38
+
39
+ %readmore:after {
40
+ left: .5em;
41
+ }
42
+
43
+ }
44
+
45
+ .us-article-group & {
46
+ @include respond-to(mobile) {
47
+ padding: 0;
48
+ margin-bottom: 0;
49
+ }
50
+ }
51
+ }
52
+
53
+ %base-item-link {
54
+ @extend %bordered-box;
55
+ @extend %backface-visibility--hidden;
56
+ position: relative;
57
+ display: block;
58
+ overflow: hidden;
59
+ text-decoration: none;
60
+ background-color: #fff;
61
+ transition: border-color 333ms, background-color 333ms;
62
+ padding: 8px;
63
+
64
+ @include respond-to(small-tablet,true) {
65
+ padding-bottom: em(35px);
66
+ }
67
+
68
+ .us-article-group & {
69
+ @include respond-to(mobile) {
70
+ border-top-width: 0;
71
+ }
72
+ }
73
+ }
74
+
75
+ %base-item-title {
76
+ @extend %heading-4;
77
+ padding: $item-padding;
78
+ margin: 0;
79
+ color: $c-navy;
80
+ }
81
+
82
+ %base-item-description {
83
+ @include baseline(14px);
84
+ padding: 0 $item-padding;
85
+ color: $c-navy;
86
+ }
87
+
88
+ %base-item-image-container {
89
+ display: none;
90
+
91
+ @include respond-to(small-tablet, true) {
92
+ display: block;
93
+ }
94
+ }
95
+
96
+ %base-item-image {
97
+ @extend %backface-visibility--hidden;
98
+ width: 100%;
99
+ height: auto;
100
+ transition: opacity 333ms;
101
+
102
+ &.background {
103
+ height: $base-item-image-size;
104
+ background-position: center center;
105
+ background-repeat: no-repeat;
106
+ background-size: cover;
107
+ }
108
+ }
109
+
110
+ %readmore-link {
111
+ @extend %anchor-link;
112
+ @include normal-font;
113
+ @include link-colors($c-uswitch-navy, $c-darker-grey, $c-uswitch-navy, $c-uswitch-navy, $c-uswitch-navy);
114
+ }
115
+
116
+ %readmore {
117
+ position: absolute;
118
+ bottom: 0;
119
+ display: none;
120
+ padding: $item-padding;
121
+ color: $c-uswitch-navy;
122
+ white-space: nowrap;
123
+
124
+ @include respond-to(small-tablet,true) {
125
+ display: block;
126
+ }
127
+
128
+ &:after {
129
+ @extend %link-triangle;
130
+ }
131
+
132
+ }
133
+
134
+ .us-article-group {
135
+ @include respond-to(mobile) {
136
+ margin-bottom: 1em;
137
+ overflow: hidden;
138
+
139
+ %base-item:first-child {
140
+ %base-item-link {
141
+ border-top-width: 1px;
142
+ border-bottom-width: 1px;
143
+ }
144
+ }
145
+
146
+ %base-item:last-child {
147
+ %base-item-link {
148
+ border-bottom-width: 1px;
149
+ }
150
+ }
151
+ }
152
+ }
153
+
154
+ .us-news-item {
155
+ @extend %base-item;
156
+ }
157
+
158
+ .us-news-item-link {
159
+ @extend %base-item-link;
160
+ }
161
+
162
+ .us-news-item-title {
163
+ @extend %base-item-title;
164
+ }
165
+
166
+ .us-news-item-snippet {
167
+ @extend %base-item-description;
168
+ }
169
+
170
+ .us-news-item-image-container {
171
+ @extend %base-item-image-container;
172
+ }
173
+
174
+ .us-news-item-image {
175
+ @extend %base-item-image;
176
+ }
177
+
178
+ .us-news-item-readmore {
179
+ @extend %readmore;
180
+ }
181
+
182
+ .us-news-item-readmorelink {
183
+ @extend %readmore-link;
184
+ }
185
+
186
+ .us-news-meta {
187
+ padding-right: $item-padding;
188
+ padding-left: $item-padding;
189
+ overflow: hidden;
190
+
191
+ .category,
192
+ .date {
193
+ padding-top: em(4px);
194
+ padding-bottom: em(4px);
195
+ font-size: em(13px);
196
+ font-weight: bold;
197
+ color: $c-navy;
198
+
199
+ @include respond-to(large-desktop) {
200
+ font-size: em(14px);
201
+ }
202
+ }
203
+
204
+ .date {
205
+ display: block;
206
+ float: right;
207
+ }
208
+
209
+ .category {
210
+ display: block;
211
+ float: left;
212
+ }
213
+ }
@@ -0,0 +1,76 @@
1
+ // @page Pattern Library/Articles
2
+ // @name Related items
3
+ //
4
+ // @description
5
+ // Related lists used for content sidebars.
6
+ //
7
+ // @markup
8
+ // <h2 class="us-related__title">Title here</h2>
9
+ // <ul class="us-related us-list--reset">
10
+ // <li class="us-related__item">
11
+ // <a class="us-related__item-link" href="#">Car accident claims — How to make a car insurance claim</a>
12
+ // </li>
13
+ // <li class="us-related__item">
14
+ // <a class="us-related__item-link" href="#">How to get the best car insurance deals</a>
15
+ // </li>
16
+ // <li class="us-related__item">
17
+ // <a class="us-related__item-link" href="#">No claims bonus explained: how to protect a no claims discount</a>
18
+ // </li>
19
+ // </ul>
20
+
21
+ .us-related {
22
+ margin-bottom: $gutter-width;
23
+ }
24
+
25
+ .us-related__item {
26
+ margin-bottom: 0;
27
+ }
28
+
29
+ .us-related__title {
30
+ font-size: 1.125em;
31
+ }
32
+
33
+ .us-related__item-link {
34
+ @extend %clearfix;
35
+ @include link-colors($c-typegrey-2, $c-typecyan, $c-typegrey-2, $c-typegrey-2);
36
+ display: block;
37
+ padding-top: .5em;
38
+ padding-bottom: .5em;
39
+ border-bottom: 1px solid $c-bordergrey;
40
+ transition: color .3s, border-color .3s;
41
+ }
42
+
43
+ .us-related__item-link--more {
44
+ @include link-colors($c-typegrey, $c-typecyan, $c-typegrey, $c-typegrey);
45
+ padding-right: .5em;
46
+ text-align: right;
47
+ background-color: $c-cyan-light;
48
+
49
+ &:after {
50
+ @extend %link-triangle;
51
+ }
52
+ }
53
+
54
+ .us-related__item-title {
55
+ @extend %small-font;
56
+ @include normal-font;
57
+ vertical-align: middle;
58
+
59
+ @include respond-to(desktop) {
60
+ display: inline-block;
61
+ width: calc(100% - 90px);
62
+ margin-left: $gutter-width / 4;
63
+ }
64
+ }
65
+
66
+ .us-related__item-image {
67
+ @include respond-to(desktop) {
68
+ display: inline-block;
69
+ width: 70px;
70
+ height: 70px;
71
+ vertical-align: middle;
72
+ background-position: center center;
73
+ background-repeat: no-repeat;
74
+ background-size: 100%;
75
+ }
76
+ }
@@ -0,0 +1,73 @@
1
+ // -------------------------
2
+ // These are default, handy extends that can be used anywhere to minimise
3
+ // repetition and keep everything compartmentalised in CSS
4
+ // -------------------------
5
+
6
+ %small-font {
7
+ font-size: em(14px);
8
+ line-height: 1.15em;
9
+ }
10
+
11
+ %float-left {
12
+ float: left;
13
+ }
14
+
15
+ %float-right {
16
+ float: right;
17
+ }
18
+
19
+ %reset-box-model {
20
+ padding: 0;
21
+ margin: 0;
22
+ }
23
+
24
+ // Clearfix - micro clearfix
25
+
26
+ %clearfix {
27
+ @include clearfix;
28
+ }
29
+
30
+ // A bordered box used for all news/guide/seemore/block items
31
+
32
+ %bordered-box {
33
+ border: 1px solid $c-grey;
34
+
35
+ &:hover {
36
+ border-color: $c-uswitch-navy;
37
+ }
38
+ }
39
+
40
+ // Triangle used across all buttons/link lists
41
+
42
+ %link-triangle {
43
+ position: relative;
44
+ left: 0;
45
+ display: inline;
46
+ margin: 0 0 0 .5em;
47
+ font-size: .5em;
48
+ line-height: 0;
49
+ vertical-align: middle;
50
+ content: "\25b6\fe0e";
51
+ transition: left 200ms;
52
+ }
53
+
54
+ // Vertical alignment helpers
55
+
56
+ %vertical-align-parent {
57
+ transform-style: preserve-3d;
58
+ }
59
+
60
+ %vertical-align-child {
61
+ top: 50%;
62
+ transform: translateY(-50%);
63
+ }
64
+
65
+ // Backface visibility
66
+ %backface-visibility--hidden {
67
+ backface-visibility: hidden;
68
+ }
69
+
70
+ // Normalise Firefox mobile inputs - https://bugzilla.mozilla.org/show_bug.cgi?id=763671
71
+ %input-background--normalise {
72
+ background-image: none;
73
+ }
@@ -0,0 +1,27 @@
1
+ // Extends here are used to minimise repetition and reuse already
2
+ // declared font families across the site. It is not recommended that you
3
+ // redeclare font families on other components. Instead extend these.
4
+
5
+ %heading-font {
6
+ font: {
7
+ family: $heading-font;
8
+ weight: 700;
9
+ };
10
+ }
11
+
12
+ %heading-font-primary {
13
+ @extend %heading-font;
14
+ }
15
+
16
+ %heading-font-secondary {
17
+ @extend %heading-font;
18
+ }
19
+
20
+ %normal-font {
21
+ font-family: $normal-font;
22
+ }
23
+
24
+ %italic-font {
25
+ @extend %normal-font;
26
+ font-style: italic;
27
+ }
@@ -0,0 +1,78 @@
1
+ /// Returns a `rem` value from pixels
2
+ ///
3
+ /// @param {Number (unit)} $pixels
4
+ /// The pixel number you want converted to `rem`
5
+ ///
6
+ /// @param {Number (unit)} $font-size [$base-font-size]
7
+ /// The font-size relative to `rems`
8
+ ///
9
+ /// @return {Unit}
10
+
11
+ @function rem($pixels, $font-size: $base-font-size) {
12
+ @return $pixels / $font-size * 1rem;
13
+ }
14
+
15
+ /// Returns a `em` value from pixels
16
+ ///
17
+ /// @param {Number (unit)} $pixels
18
+ /// The pixel number you want converted to `em`
19
+ ///
20
+ /// @param {Number (unit)} $font-size [$base-font-size]
21
+ /// The font-size relative to `ems`
22
+ ///
23
+ /// @return {Unit}
24
+
25
+ @function em($pixels, $font-size: $base-font-size) {
26
+ @return $pixels / $font-size * 1em;
27
+ }
28
+
29
+ /// Returns a column % from `$grid-columns`
30
+ ///
31
+ /// @param {Number (unitless)} $columns
32
+ /// The column number to convert to a % of the grid
33
+ ///
34
+ /// @return {Unit (percentage)}
35
+
36
+ @function col-width($columns) {
37
+ @return percentage($columns / $grid-columns);
38
+ }
39
+
40
+ /// Returns a colour based on a black + `$color` percentage mix
41
+ ///
42
+ /// @param {String} $color
43
+ /// The colour you want to darken
44
+ ///
45
+ /// @param {Number (unit)} $percentage
46
+ /// The percentage amount to mix of black with the colour
47
+
48
+ @function shade($color, $percentage) {
49
+ @return mix(#000, $color, $percentage);
50
+ }
51
+
52
+ /// Returns a colour based on a white + `$color` percentage mix
53
+ ///
54
+ /// @param {String} $color
55
+ /// The colour you want to darken
56
+ ///
57
+ /// @param {Number (unit)} $percentage
58
+ /// The percentage amount to mix of white with the colour
59
+
60
+ @function tint($color, $percentage) {
61
+ @return mix(#fff, $color, $percentage);
62
+ }
63
+
64
+ /// Returns the opposite direction of each direction in a list
65
+ /// @param {List} $directions - List of initial directions
66
+ /// @return {List} - List of opposite directions
67
+
68
+ @function opposite-direction($directions) {
69
+ $opposite-directions: ();
70
+ $directions-normal: "top", "bottom", "left", "right", "up", "down";
71
+ $directions-opposite: "bottom", "top", "right", "left", "down", "up";
72
+
73
+ @each $direction in $directions {
74
+ $opposite-directions: append($opposite-directions, unquote(nth($directions-opposite, index($directions-normal, $direction))));
75
+ }
76
+
77
+ @return $opposite-directions;
78
+ }
@@ -0,0 +1,86 @@
1
+ ////
2
+ //// @author David Annez
3
+ //// @group Grid
4
+ ////
5
+
6
+ /// Adds a negative left and right margin of `$gutter-width / 2` to normalise the outer padding of columns
7
+ ///
8
+ /// @param {String} $breakpoint [$default-grid-breakpoint]
9
+ /// The breakpoint where you want the margin to be set
10
+
11
+ @mixin us-row($breakpoint: $default-grid-breakpoint) {
12
+ @extend %clearfix;
13
+ @if $breakpoint == "mobile" {
14
+ margin-right: -$gutter-width / 2;
15
+ margin-left: -$gutter-width / 2;
16
+ } @else {
17
+ @include respond-to($breakpoint, true) {
18
+ margin-right: -$gutter-width / 2;
19
+ margin-left: -$gutter-width / 2;
20
+ }
21
+ }
22
+ }
23
+
24
+ /// The grid column builder for uSwitch - floats, sets a % width and adds left and right padding for column gutters
25
+ ///
26
+ /// @param {Number (unitless)} $cols
27
+ /// The number of columns to make the selected element
28
+
29
+ @mixin us-col($cols) {
30
+ float: left;
31
+ padding-left: $gutter-width / 2;
32
+ padding-right: $gutter-width / 2;
33
+ width: col-width($cols);
34
+ }
35
+
36
+ /// Grid class and extend generator for ease of class/no-class use
37
+ ///
38
+ /// @access private
39
+ ///
40
+ /// @param {String} $selector
41
+ /// The CSS selector to use for building the the grid placeholders and classes
42
+ ///
43
+ /// @param {Number (unitless)} $cols
44
+ /// The number of columns for the `$selector`
45
+ ///
46
+ /// @param {Bool} $html-classes [$html-grid-classes]
47
+ /// If set to false will only output placeholder classes for selective CSS generation
48
+
49
+ @mixin _grid-class($selector, $cols, $html-classes: $html-grid-classes) {
50
+ @if $html-classes {
51
+ .#{$selector}-#{$cols},
52
+ %#{$selector}-#{$cols} {
53
+ @include us-col($cols);
54
+ }
55
+ } @else {
56
+ %#{$selector}-#{$cols} {
57
+ @include us-col($cols);
58
+ }
59
+ }
60
+ }
61
+
62
+ %us-grid-row {
63
+ @include us-row;
64
+ }
65
+
66
+ %container {
67
+ @extend %clearfix;
68
+ position: relative;
69
+ padding: 0 $gutter-width / 2;
70
+ margin-right: auto;
71
+ margin-left: auto;
72
+
73
+ @include respond-to(tablet) {
74
+ max-width: $tablet-container-width;
75
+ }
76
+
77
+ @include respond-to(desktop, true) {
78
+ max-width: $desktop-container-width;
79
+ }
80
+
81
+ @include respond-to(large-desktop) {
82
+ max-width: $large-container-width;
83
+ }
84
+ }
85
+
86
+ @import "ustyle/components/grid-classes";
@@ -0,0 +1,123 @@
1
+ @if $establish-type-rules {
2
+ // @page Pattern Library/Typography
3
+ // @name Headings
4
+ //
5
+ // @description
6
+ // The default heading styling across all uSwitch pages.
7
+ // We allow extending the sizes of these headings with `%heading-{$i}` so that we don't repeat similar font sizes across the site.
8
+ //
9
+ // #### Best practices
10
+ // * Headings are for structure, not presentation
11
+ // * The first heading on the page should be an H1
12
+ // * Headings should be listed in consecutive order [H1, H2, H3], not [H1, H5, H2]
13
+ //
14
+ // @markup
15
+ // <h1>Heading 1</h1>
16
+ // <h2>Heading 2</h2>
17
+ // <h3>Heading 3</h3>
18
+ // <h4>Heading 4</h4>
19
+ // <h5>Heading 5</h5>
20
+ // <h6>Heading 6</h6>
21
+
22
+ html {
23
+ @include normal-font;
24
+ font-size: $base-font-size;
25
+ line-height: $base-line-ratio + em;
26
+ }
27
+
28
+ body {
29
+ color: $c-typegrey;
30
+ }
31
+
32
+ h1,
33
+ h2,
34
+ h3,
35
+ h4,
36
+ h5,
37
+ h6 {
38
+ margin-top: 0;
39
+ margin-bottom: .375em;
40
+ }
41
+
42
+ @for $level from 1 through 6 {
43
+ h#{$level},
44
+ %heading-#{$level},
45
+ .us-heading--#{$level} {
46
+ @include heading($level);
47
+ }
48
+ }
49
+
50
+ // @page Pattern Library/Typography
51
+ // @name Paragraphs
52
+ //
53
+ // @description
54
+ // Default paragraph styling with a margin bottom.
55
+ //
56
+ // @state .us-standfirst - Used for heros and introductory paragraphs.
57
+ //
58
+ // @markup
59
+ // <p class="{$modifiers}">
60
+ // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vel arcu non magna varius sagittis vel at elit.
61
+ // Vivamus et orci pretium, commodo eros vitae, tincidunt purus. Nunc consequat condimentum porttitor.
62
+ // Cras at mi sed quam hendrerit bibendum ac a lorem. Mauris a sapien vitae massa lacinia malesuada.
63
+ // </p>
64
+
65
+ p,
66
+ .trailered {
67
+ margin: 0 0 1.5em 0;
68
+ }
69
+
70
+ .us-standfirst {
71
+ @include baseline(18px);
72
+ }
73
+
74
+ // @page Pattern Library/Typography
75
+ // @name Lists
76
+ //
77
+ // @description
78
+ // Normal list styling.
79
+ //
80
+ // @markup
81
+ // <ul>
82
+ // <li>List item 1</li>
83
+ // <li>List item 2</li>
84
+ // <li>List item 3</li>
85
+ // </ul>
86
+
87
+ ul {
88
+ li {
89
+ margin-bottom: .5em;
90
+ }
91
+ }
92
+
93
+ small {
94
+ line-height: 1.15em;
95
+ }
96
+
97
+ // @page Pattern Library/Typography
98
+ // @name Blockquote
99
+ //
100
+ // @description
101
+ // Default blockquote.
102
+ //
103
+ // @markup
104
+ // <blockquote>
105
+ // <p>
106
+ // Lorem ipsum dolor sit amet, consectetur adipiscing elit.
107
+ // Aenean vel arcu non magna varius sagittis vel at elit.
108
+ // Vivamus et orci pretium, commodo eros vitae, tincidunt purus.
109
+ // </p>
110
+ // </blockquote>
111
+
112
+ blockquote {
113
+ @include italic-font;
114
+ padding: $gutter-width / 2;
115
+ color: $c-navy;
116
+ border-left: 5px solid $c-bordergrey;
117
+
118
+ > p {
119
+ padding: 0;
120
+ margin: 0;
121
+ }
122
+ }
123
+ }