idsk_frontend_toolkit 7.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +3 -0
  3. data/.gitmodules +3 -0
  4. data/.ruby-version +1 -0
  5. data/.travis/govuk_frontend_toolkit_gem_push.enc +0 -0
  6. data/.travis/govuk_frontend_toolkit_gem_push.pub +1 -0
  7. data/.travis.yml +23 -0
  8. data/CONTRIBUTING.md +13 -0
  9. data/Gemfile +3 -0
  10. data/LICENCE +20 -0
  11. data/README.md +61 -0
  12. data/Rakefile +10 -0
  13. data/app/assets/.gitignore +5 -0
  14. data/app/assets/.ruby-version +1 -0
  15. data/app/assets/.travis/README.md +23 -0
  16. data/app/assets/.travis/govuk_frontend_toolkit_push.enc +0 -0
  17. data/app/assets/.travis/govuk_frontend_toolkit_push.pub +1 -0
  18. data/app/assets/.travis.yml +18 -0
  19. data/app/assets/CHANGELOG.md +381 -0
  20. data/app/assets/CONTRIBUTING.md +23 -0
  21. data/app/assets/Gemfile +4 -0
  22. data/app/assets/Gemfile.lock +48 -0
  23. data/app/assets/Gruntfile.js +68 -0
  24. data/app/assets/LICENCE +20 -0
  25. data/app/assets/README.md +170 -0
  26. data/app/assets/VERSION.txt +1 -0
  27. data/app/assets/create-release.sh +38 -0
  28. data/app/assets/docs/analytics.md +270 -0
  29. data/app/assets/docs/functions.md +62 -0
  30. data/app/assets/docs/javascript.md +337 -0
  31. data/app/assets/docs/mixins.md +617 -0
  32. data/app/assets/images/accordion-arrow-2x.png +0 -0
  33. data/app/assets/images/accordion-arrow.png +0 -0
  34. data/app/assets/images/arrow-sprite.png +0 -0
  35. data/app/assets/images/crests/bis_crest_13px.png +0 -0
  36. data/app/assets/images/crests/bis_crest_13px_x2.png +0 -0
  37. data/app/assets/images/crests/bis_crest_18px.png +0 -0
  38. data/app/assets/images/crests/bis_crest_18px_x2.png +0 -0
  39. data/app/assets/images/crests/bis_crest_27px.png +0 -0
  40. data/app/assets/images/crests/bis_crest_27px_x2.png +0 -0
  41. data/app/assets/images/crests/coastguard_13px.png +0 -0
  42. data/app/assets/images/crests/coastguard_13px_x2.png +0 -0
  43. data/app/assets/images/crests/coastguard_18px.png +0 -0
  44. data/app/assets/images/crests/coastguard_18px_x2.png +0 -0
  45. data/app/assets/images/crests/coastguard_27px.png +0 -0
  46. data/app/assets/images/crests/coastguard_27px_x2.png +0 -0
  47. data/app/assets/images/crests/dit_crest_13px.png +0 -0
  48. data/app/assets/images/crests/dit_crest_13px_x2.png +0 -0
  49. data/app/assets/images/crests/dit_crest_18px.png +0 -0
  50. data/app/assets/images/crests/dit_crest_18px_x2.png +0 -0
  51. data/app/assets/images/crests/dit_crest_27px.png +0 -0
  52. data/app/assets/images/crests/dit_crest_27px_x2.png +0 -0
  53. data/app/assets/images/crests/hmrc_crest_13px.png +0 -0
  54. data/app/assets/images/crests/hmrc_crest_13px_x2.png +0 -0
  55. data/app/assets/images/crests/hmrc_crest_18px.png +0 -0
  56. data/app/assets/images/crests/hmrc_crest_18px_x2.png +0 -0
  57. data/app/assets/images/crests/hmrc_crest_27px.png +0 -0
  58. data/app/assets/images/crests/hmrc_crest_27px_x2.png +0 -0
  59. data/app/assets/images/crests/ho_crest_13px.png +0 -0
  60. data/app/assets/images/crests/ho_crest_13px_x2.png +0 -0
  61. data/app/assets/images/crests/ho_crest_18px.png +0 -0
  62. data/app/assets/images/crests/ho_crest_18px_x2.png +0 -0
  63. data/app/assets/images/crests/ho_crest_27px.png +0 -0
  64. data/app/assets/images/crests/ho_crest_27px_x2.png +0 -0
  65. data/app/assets/images/crests/mod_crest_13px.png +0 -0
  66. data/app/assets/images/crests/mod_crest_13px_x2.png +0 -0
  67. data/app/assets/images/crests/mod_crest_18px.png +0 -0
  68. data/app/assets/images/crests/mod_crest_18px_x2.png +0 -0
  69. data/app/assets/images/crests/mod_crest_27px.png +0 -0
  70. data/app/assets/images/crests/mod_crest_27px_x2.png +0 -0
  71. data/app/assets/images/crests/org_crest_13px.png +0 -0
  72. data/app/assets/images/crests/org_crest_13px_x2.png +0 -0
  73. data/app/assets/images/crests/org_crest_18px.png +0 -0
  74. data/app/assets/images/crests/org_crest_18px_x2.png +0 -0
  75. data/app/assets/images/crests/org_crest_27px.png +0 -0
  76. data/app/assets/images/crests/org_crest_27px_x2.png +0 -0
  77. data/app/assets/images/crests/portcullis_13px.png +0 -0
  78. data/app/assets/images/crests/portcullis_13px_x2.png +0 -0
  79. data/app/assets/images/crests/portcullis_18px.png +0 -0
  80. data/app/assets/images/crests/portcullis_18px_x2.png +0 -0
  81. data/app/assets/images/crests/portcullis_27px.png +0 -0
  82. data/app/assets/images/crests/portcullis_27px_x2.png +0 -0
  83. data/app/assets/images/crests/so_crest_13px.png +0 -0
  84. data/app/assets/images/crests/so_crest_13px_x2.png +0 -0
  85. data/app/assets/images/crests/so_crest_18px.png +0 -0
  86. data/app/assets/images/crests/so_crest_18px_x2.png +0 -0
  87. data/app/assets/images/crests/so_crest_27px.png +0 -0
  88. data/app/assets/images/crests/so_crest_27px_x2.png +0 -0
  89. data/app/assets/images/crests/ukaea_crest_13px.png +0 -0
  90. data/app/assets/images/crests/ukaea_crest_13px_x2.png +0 -0
  91. data/app/assets/images/crests/ukaea_crest_18px.png +0 -0
  92. data/app/assets/images/crests/ukaea_crest_18px_x2.png +0 -0
  93. data/app/assets/images/crests/ukaea_crest_27px.png +0 -0
  94. data/app/assets/images/crests/ukaea_crest_27px_x2.png +0 -0
  95. data/app/assets/images/crests/ukho_13px.png +0 -0
  96. data/app/assets/images/crests/ukho_13px_x2.png +0 -0
  97. data/app/assets/images/crests/ukho_18px.png +0 -0
  98. data/app/assets/images/crests/ukho_18px_x2.png +0 -0
  99. data/app/assets/images/crests/ukho_27px.png +0 -0
  100. data/app/assets/images/crests/ukho_27px_x2.png +0 -0
  101. data/app/assets/images/crests/wales_crest_13px.png +0 -0
  102. data/app/assets/images/crests/wales_crest_13px_x2.png +0 -0
  103. data/app/assets/images/crests/wales_crest_18px.png +0 -0
  104. data/app/assets/images/crests/wales_crest_18px_x2.png +0 -0
  105. data/app/assets/images/crests/wales_crest_27px.png +0 -0
  106. data/app/assets/images/crests/wales_crest_27px_x2.png +0 -0
  107. data/app/assets/images/icon-arrow-left.png +0 -0
  108. data/app/assets/images/icon-calendar-2x.png +0 -0
  109. data/app/assets/images/icon-calendar.png +0 -0
  110. data/app/assets/images/icon-file-download-2x.png +0 -0
  111. data/app/assets/images/icon-file-download.png +0 -0
  112. data/app/assets/images/icon-important-2x.png +0 -0
  113. data/app/assets/images/icon-important.png +0 -0
  114. data/app/assets/images/icon-information-2x.png +0 -0
  115. data/app/assets/images/icon-information.png +0 -0
  116. data/app/assets/images/icon-locator-2x.png +0 -0
  117. data/app/assets/images/icon-locator.png +0 -0
  118. data/app/assets/images/icon-pointer-2x.png +0 -0
  119. data/app/assets/images/icon-pointer-black-2x.png +0 -0
  120. data/app/assets/images/icon-pointer-black.png +0 -0
  121. data/app/assets/images/icon-pointer-indexed.png +0 -0
  122. data/app/assets/images/icon-pointer.png +0 -0
  123. data/app/assets/images/icon-search-2x.png +0 -0
  124. data/app/assets/images/icon-search.png +0 -0
  125. data/app/assets/images/icon-steps/icon-step-1-2x.png +0 -0
  126. data/app/assets/images/icon-steps/icon-step-1.png +0 -0
  127. data/app/assets/images/icon-steps/icon-step-10-2x.png +0 -0
  128. data/app/assets/images/icon-steps/icon-step-10.png +0 -0
  129. data/app/assets/images/icon-steps/icon-step-11-2x.png +0 -0
  130. data/app/assets/images/icon-steps/icon-step-11.png +0 -0
  131. data/app/assets/images/icon-steps/icon-step-12-2x.png +0 -0
  132. data/app/assets/images/icon-steps/icon-step-12.png +0 -0
  133. data/app/assets/images/icon-steps/icon-step-13-2x.png +0 -0
  134. data/app/assets/images/icon-steps/icon-step-13.png +0 -0
  135. data/app/assets/images/icon-steps/icon-step-14-2x.png +0 -0
  136. data/app/assets/images/icon-steps/icon-step-14.png +0 -0
  137. data/app/assets/images/icon-steps/icon-step-2-2x.png +0 -0
  138. data/app/assets/images/icon-steps/icon-step-2.png +0 -0
  139. data/app/assets/images/icon-steps/icon-step-3-2x.png +0 -0
  140. data/app/assets/images/icon-steps/icon-step-3.png +0 -0
  141. data/app/assets/images/icon-steps/icon-step-4-2x.png +0 -0
  142. data/app/assets/images/icon-steps/icon-step-4.png +0 -0
  143. data/app/assets/images/icon-steps/icon-step-5-2x.png +0 -0
  144. data/app/assets/images/icon-steps/icon-step-5.png +0 -0
  145. data/app/assets/images/icon-steps/icon-step-6-2x.png +0 -0
  146. data/app/assets/images/icon-steps/icon-step-6.png +0 -0
  147. data/app/assets/images/icon-steps/icon-step-7-2x.png +0 -0
  148. data/app/assets/images/icon-steps/icon-step-7.png +0 -0
  149. data/app/assets/images/icon-steps/icon-step-8-2x.png +0 -0
  150. data/app/assets/images/icon-steps/icon-step-8.png +0 -0
  151. data/app/assets/images/icon-steps/icon-step-9-2x.png +0 -0
  152. data/app/assets/images/icon-steps/icon-step-9.png +0 -0
  153. data/app/assets/images/player-icon-forward.png +0 -0
  154. data/app/assets/images/player-icon-pause.png +0 -0
  155. data/app/assets/images/player-icon-play.png +0 -0
  156. data/app/assets/images/player-icon-rewind.png +0 -0
  157. data/app/assets/images/player-icon-volume.png +0 -0
  158. data/app/assets/images/separator-2x.png +0 -0
  159. data/app/assets/images/separator.png +0 -0
  160. data/app/assets/javascripts/govuk/analytics/analytics.js +143 -0
  161. data/app/assets/javascripts/govuk/analytics/download-link-tracker.js +41 -0
  162. data/app/assets/javascripts/govuk/analytics/error-tracking.js +51 -0
  163. data/app/assets/javascripts/govuk/analytics/external-link-tracker.js +56 -0
  164. data/app/assets/javascripts/govuk/analytics/google-analytics-universal-tracker.js +166 -0
  165. data/app/assets/javascripts/govuk/analytics/govuk-tracker.js +134 -0
  166. data/app/assets/javascripts/govuk/analytics/mailto-link-tracker.js +38 -0
  167. data/app/assets/javascripts/govuk/analytics/print-intent.js +39 -0
  168. data/app/assets/javascripts/govuk/details.polyfill.js +240 -0
  169. data/app/assets/javascripts/govuk/modules/auto-track-event.js +30 -0
  170. data/app/assets/javascripts/govuk/modules.js +61 -0
  171. data/app/assets/javascripts/govuk/primary-links.js +57 -0
  172. data/app/assets/javascripts/govuk/selection-buttons.js +116 -0
  173. data/app/assets/javascripts/govuk/shim-links-with-button-role.js +34 -0
  174. data/app/assets/javascripts/govuk/show-hide-content.js +172 -0
  175. data/app/assets/javascripts/govuk/stick-at-top-when-scrolling.js +128 -0
  176. data/app/assets/javascripts/govuk/stop-scrolling-at-footer.js +139 -0
  177. data/app/assets/javascripts/govuk_toolkit.js +1 -0
  178. data/app/assets/javascripts/stageprompt.js +69 -0
  179. data/app/assets/javascripts/vendor/jquery/jquery.player.min.js +25 -0
  180. data/app/assets/javascripts/vendor/polyfills/bind.js +40 -0
  181. data/app/assets/package.json +25 -0
  182. data/app/assets/spec/manifest.js +41 -0
  183. data/app/assets/spec/stylesheets/_colour_contrast_spec.scss +12 -0
  184. data/app/assets/spec/support/LocalTestRunner.html +21 -0
  185. data/app/assets/spec/support/console-runner.js +102 -0
  186. data/app/assets/spec/support/load.js +47 -0
  187. data/app/assets/spec/support/run_jasmine_test.js +62 -0
  188. data/app/assets/spec/unit/analytics/analytics.spec.js +315 -0
  189. data/app/assets/spec/unit/analytics/download-link-tracker.spec.js +72 -0
  190. data/app/assets/spec/unit/analytics/error-tracking.spec.js +65 -0
  191. data/app/assets/spec/unit/analytics/external-link-tracker.spec.js +109 -0
  192. data/app/assets/spec/unit/analytics/google-analytics-universal-tracker.spec.js +180 -0
  193. data/app/assets/spec/unit/analytics/govuk-tracker.spec.js +171 -0
  194. data/app/assets/spec/unit/analytics/mailto-link-tracker.spec.js +62 -0
  195. data/app/assets/spec/unit/details.polyfill.spec.js +91 -0
  196. data/app/assets/spec/unit/modules/auto-track-event.spec.js +54 -0
  197. data/app/assets/spec/unit/modules.spec.js +93 -0
  198. data/app/assets/spec/unit/primary-links.spec.js +55 -0
  199. data/app/assets/spec/unit/selection-button.spec.js +761 -0
  200. data/app/assets/spec/unit/shim-links-with-button-role.spec.js +41 -0
  201. data/app/assets/spec/unit/show-hide-content.spec.js +306 -0
  202. data/app/assets/spec/unit/stick-at-top-when-scrolling.spec.js +137 -0
  203. data/app/assets/stylesheets/.gitkeep +0 -0
  204. data/app/assets/stylesheets/_colours.scss +2 -0
  205. data/app/assets/stylesheets/_conditionals.scss +81 -0
  206. data/app/assets/stylesheets/_css3.scss +90 -0
  207. data/app/assets/stylesheets/_device-pixels.scss +10 -0
  208. data/app/assets/stylesheets/_font_stack.scss +25 -0
  209. data/app/assets/stylesheets/_grid_layout.scss +136 -0
  210. data/app/assets/stylesheets/_helpers.scss +16 -0
  211. data/app/assets/stylesheets/_measurements.scss +14 -0
  212. data/app/assets/stylesheets/_shims.scss +55 -0
  213. data/app/assets/stylesheets/_typography.scss +249 -0
  214. data/app/assets/stylesheets/_url-helpers.scss +16 -0
  215. data/app/assets/stylesheets/colours/_organisation.scss +104 -0
  216. data/app/assets/stylesheets/colours/_palette.scss +77 -0
  217. data/app/assets/stylesheets/design-patterns/_alpha-beta.scss +67 -0
  218. data/app/assets/stylesheets/design-patterns/_breadcrumbs.scss +53 -0
  219. data/app/assets/stylesheets/design-patterns/_buttons.scss +145 -0
  220. data/app/assets/stylesheets/design-patterns/_media-player.scss +264 -0
  221. data/app/assets/trigger.sh +24 -0
  222. data/idsk_frontend_toolkit.gemspec +49 -0
  223. data/lib/idsk_frontend_toolkit/engine.rb +4 -0
  224. data/lib/idsk_frontend_toolkit/version.rb +5 -0
  225. data/lib/idsk_frontend_toolkit.rb +4 -0
  226. data/publish.sh +30 -0
  227. metadata +314 -0
@@ -0,0 +1,617 @@
1
+ ## Mixin-sets
2
+
3
+ * [`_grid_layout.scss`](#grid-layout)
4
+ * [`_conditionals.scss`](#conditionals)
5
+ * [`_colours.scss`](#colours)
6
+ * [`_css3.scss`](#css3)
7
+ * [`_typography.scss`](#typography)
8
+ * [`design-patterns/_buttons.scss`](#buttons)
9
+ * [`design-patterns/_alpha-beta.scss`](#alpha-beta)
10
+ * [`design-patterns/_breadcrumbs.scss`](#breadcrumbs)
11
+
12
+ ### <a id="grid-layout"></a>Grid layout
13
+
14
+ Grid helpers to enable easy cross browser grids. The grids use absolute widths
15
+ in older versions of IE or percentage based widths in modern browsers.
16
+
17
+ - `%site-width-container` creates a 960px wide elastic container for you site content block
18
+ - `%grid-row` container for a row of columns
19
+ - `@mixin grid-column($width, $full-width: tablet)` a mixin to create grid columns of fraction width
20
+
21
+ These three grid helpers are designed to be used together and aren't guaranteed
22
+ to work or behave in a predictable way if used in isolation.
23
+
24
+ There is also an `%outdent-to-full-width` selector which can be extended to
25
+ outdent and element and cause it to take up the edge gutters and butt up to the
26
+ edge of smaller screens.
27
+
28
+ #### Usage:
29
+
30
+ ```
31
+ #page-container {
32
+ @extend %site-width-container;
33
+ }
34
+ .grid-row {
35
+ @extend %grid-row;
36
+
37
+ .column-third {
38
+ @include grid-column( 1/3 );
39
+ }
40
+ .column-two-thirds {
41
+ @include grid-column( 2/3 );
42
+ }
43
+ }
44
+ .hero-image {
45
+ @extend %outdent-to-full-width;
46
+ }
47
+
48
+
49
+ <div id="page-container">
50
+ <div class="grid-row">
51
+ <div class="column-two-thirds">
52
+ Main content
53
+ </div>
54
+ <div class="column-third">
55
+ Sidebar
56
+ </div>
57
+ </div>
58
+
59
+ <div class="hero-image">
60
+ <img ...>
61
+ </div>
62
+ </div>
63
+ ```
64
+
65
+ ### <a id="conditionals"></a>Conditionals
66
+
67
+ Media query and IE helpers. These make producing responsive layouts and
68
+ attaching IE specific styles to elements really easy.
69
+
70
+ To use the IE conditionals you will need to add extra stylesheets for each IE,
71
+ there's an example of how to do this in the [GOV.UK template](https://github.com/alphagov/govuk_template/blob/master/source/views/layouts/govuk_template.html.erb#L9-L12).
72
+
73
+ <!--[if gt IE 8]><!--><link href="<%= asset_path "govuk-template.css" %>" media="screen" rel="stylesheet" type="text/css" /><!--<![endif]-->
74
+ <!--[if IE 6]><link href="<%= asset_path "govuk-template-ie6.css" %>" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
75
+ <!--[if IE 7]><link href="<%= asset_path "govuk-template-ie7.css" %>" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
76
+ <!--[if IE 8]><link href="<%= asset_path "govuk-template-ie8.css" %>" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
77
+
78
+ The conditional logic ensures that only one stylesheet is downloaded.
79
+
80
+ <!--[if gt IE 8]><!--> // [1]
81
+ <link href="<%= asset_path "govuk-template.css" %>" media="screen" rel="stylesheet" type="text/css" />
82
+ <!--<![endif]--> // [1]
83
+
84
+ [1] Note the comment syntax to hide this stylesheet from IE 6-8.
85
+
86
+ At the top of each stylesheet, you will need:
87
+
88
+ $is-ie: true;
89
+ $ie-version: 6; // [1]
90
+ @import "application.scss"; // [2]
91
+
92
+ [1] This example is for ie6.css, use 6, 7 or 8 as required here
93
+ [2] Here `application.scss` is the name of your main stylesheet
94
+
95
+ There are examples for [an IE 6 stylesheet](https://github.com/alphagov/govuk_elements/blob/master/public/sass/main-ie6.scss), [an IE 7 stylesheet](https://github.com/alphagov/govuk_elements/blob/master/public/sass/main-ie7.scss) and [an IE 8 stylesheet](https://github.com/alphagov/govuk_elements/blob/master/public/sass/main-ie8.scss).
96
+
97
+ #### media
98
+
99
+ ##### Description
100
+
101
+ `@mixin media($size: false, $max-width: false, $min-width: false)`
102
+
103
+ ##### Parameters
104
+
105
+ ***note: the parameters are mutually exclusive and the first one found will be
106
+ used.***
107
+
108
+ `$size`
109
+
110
+ `size` can be one of `desktop`, `tablet`, `mobile`. `desktop` and `tablet`
111
+ should be used to add styles to a mobile first stylesheet. `mobile` should be
112
+ used to add styles to a desktop first stylesheet.
113
+
114
+ It is recommended that you primarily use `desktop` for new stylesheets to
115
+ enhance mobile first when serving to mobile devices.
116
+
117
+ `$min-width`
118
+ `$max-width`
119
+
120
+ These should be set to an absolute pixel value. They will get added directly to
121
+ their respective @media queries.
122
+
123
+ `$ignore-for-ie`
124
+
125
+ Styles that would normally be wrapped in @media queries by this mixin will be instead
126
+ added to the main block if the `$is-ie` variable is true.
127
+
128
+ Setting `$ignore-for-ie` to `true` means those styles will not be added.
129
+
130
+ ##### Usage
131
+
132
+ div.columns {
133
+ border: 1px solid;
134
+
135
+ @include media(desktop){
136
+ width: 30%;
137
+ float: left;
138
+ }
139
+ @include media($min-width: 500px){
140
+ width: 25%;
141
+ }
142
+ @include media($max-width: 400px){
143
+ width: 25%;
144
+ }
145
+ }
146
+
147
+ #### ie-lte
148
+
149
+ Conditially send CSS to IE browsers less than or equal to the named version.
150
+
151
+ ##### Description
152
+
153
+ `@include ie-lte($version)`
154
+
155
+ ##### Parameters
156
+
157
+ `$version`
158
+
159
+ `version` is an integer value. Possible values are `6`, `7`, `8`.
160
+
161
+ ##### Usage
162
+
163
+ div.columns {
164
+ border: 1px solid;
165
+
166
+ @include ie-lte(7){
167
+ border: 0;
168
+ }
169
+ }
170
+
171
+
172
+ #### ie
173
+
174
+ Send CSS to a named IE version.
175
+
176
+ ##### Description
177
+
178
+ `@include ie($version)`
179
+
180
+ ##### Parameters
181
+
182
+ `$version`
183
+
184
+ `version` is an integer value. Possible values are `6`, `7`, `8`.
185
+
186
+ ##### Usage
187
+
188
+ div.columns {
189
+ border: 1px solid;
190
+
191
+ @include ie(6){
192
+ border: 0;
193
+ }
194
+ }
195
+
196
+ ### <a id="colours"></a>Colours
197
+
198
+ A collection of colour variables.
199
+
200
+ #### Departmental colours
201
+
202
+ * `$treasury` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #af292e" />
203
+ * `$cabinet-office` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #005abb" />
204
+ * `$department-for-education` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #003a69" />
205
+ * `$department-for-transport` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #006c56" />
206
+ * `$home-office` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #9325b2" />
207
+ * `$department-of-health` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #00ad93" />
208
+ * `$ministry-of-justice` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #231f20" />
209
+ * `$ministry-of-defence` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #4d2942" />
210
+ * `$foreign-and-commonwealth-office` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #003e74" />
211
+ * `$department-for-communities-and-local-government` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #00857e" />
212
+ * `$department-for-energy-and-climate-change` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #009ddb" />
213
+ * `$department-for-culture-media-and-sport` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #d40072" />
214
+ * `$department-for-environment-food-and-rural-affairs` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #00a33b" />
215
+ * `$department-for-work-and-pensions` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #00beb7" />
216
+ * `$department-for-business-innovation-and-skills` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #003479" />
217
+ * `$department-for-international-development` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #002878" />
218
+ * `$government-equalities-office` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #9325b2" />
219
+ * `$attorney-generals-office` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #9f1888" />
220
+ * `$scotland-office` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #002663" />
221
+ * `$wales-office` <span style="display:inline-block; width: 60px; height: 10px; float: right; background-color: #a33038" />
222
+
223
+ #### Standard palette, colours
224
+
225
+ * `$purple` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #2e358b" />
226
+ * `$purple-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #9799c4" />
227
+ * `$purple-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #d5d6e7" />
228
+ * `$mauve` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #6f72af" />
229
+ * `$mauve-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #b7b9d7" />
230
+ * `$mauve-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #e2e2ef" />
231
+ * `$fuschia` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #912b88" />
232
+ * `$fuschia-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #c994c3" />
233
+ * `$fuschia-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #e9d4e6" />
234
+ * `$pink` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #d53880" />
235
+ * `$pink-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #eb9bbe" />
236
+ * `$pink-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #f6d7e5" />
237
+ * `$baby-pink` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #f499be" />
238
+ * `$baby-pink-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #faccdf" />
239
+ * `$baby-pink-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #fdebf2" />
240
+ * `$red` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #b10e1e" />
241
+ * `$red-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #d9888c" />
242
+ * `$red-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #efcfd1" />
243
+ * `$mellow-red` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #df3034" />
244
+ * `$mellow-red-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #ef9998" />
245
+ * `$mellow-red-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #f9d6d6" />
246
+ * `$orange` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #f47738" />
247
+ * `$orange-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #fabb96" />
248
+ * `$orange-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #fde4d4" />
249
+ * `$brown` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #b58840" />
250
+ * `$brown-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #dac39c" />
251
+ * `$brown-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #f0e7d7" />
252
+ * `$yellow` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #ffbf47" />
253
+ * `$yellow-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #ffdf94" />
254
+ * `$yellow-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #fff2d3" />
255
+ * `$grass-green` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #85994b" />
256
+ * `$grass-green-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #c2cca3" />
257
+ * `$grass-green-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #e7ebda" />
258
+ * `$green` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #006435" />
259
+ * `$green-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #7fb299" />
260
+ * `$green-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #cce0d6" />
261
+ * `$turquoise` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #28a197" />
262
+ * `$turquoise-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #95d0cb" />
263
+ * `$turquoise-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #d5ecea" />
264
+ * `$light-blue` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #2b8cc4" />
265
+ * `$light-blue-50` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #96c6e2" />
266
+ * `$light-blue-25` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #d5e8f3" />
267
+
268
+ #### Standard palette, greys
269
+
270
+ * `$black` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #0b0c0c" />
271
+ * `$grey-1` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #6f777b" />
272
+ * `$grey-2` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #bfc1c3" />
273
+ * `$grey-3` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #dee0e2" />
274
+ * `$grey-4` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #f8f8f8" />
275
+ * `$white` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #fff" />
276
+
277
+ #### Semantic colour names
278
+
279
+ * `$link-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #2e3191" />
280
+ * `$link-active-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #2e8aca" />
281
+ * `$link-hover-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #2e8aca" />
282
+ * `$link-visited-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #2e3191" />
283
+ * `$text-colour: $black` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #0b0c0c" />
284
+ * `$secondary-text-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #6f777b" />
285
+ * `$border-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #bfc1c3" />
286
+ * `$panel-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #dee0e2" />
287
+ * `$canvas-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #f8f8f8" />
288
+ * `$highlight-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #f8f8f8" />
289
+ * `$page-colour` <span style="display: inline-block; width: 60px; height: 10px; float: right; background-color: #fff" />
290
+
291
+ #### Usage:
292
+
293
+ .column {
294
+ background: $green;
295
+ }
296
+
297
+ ### <a id="typography"></a>Typography
298
+
299
+ A collection of font-mixins. There are two different types of font mixins.
300
+
301
+ 1. Heading and Copy styles which are the font with added paddings to ensure a
302
+ consistent baseline vertical grid.
303
+ 2. Core styles which are base font styles with no extra padding.
304
+
305
+ #### Changing font
306
+
307
+ Typography mixins use a “New Transport” font stack by default.
308
+
309
+ If you are using the toolkit on projects that aren’t GOVUK branded you can
310
+ override the font using two variables: `$toolkit-font-stack` and
311
+ `$toolkit-font-stack-tabular`. These must be declared before they are used, eg by
312
+ the core typography mixins.
313
+
314
+ #### Heading and Copy styles
315
+
316
+ The following heading and copy styles exist:
317
+
318
+ * `heading-80`
319
+ * `heading-48`
320
+ * `heading-36`
321
+ * `heading-27`
322
+ * `heading-24`
323
+ * `copy-19`
324
+ * `copy-16`
325
+ * `copy-14`
326
+
327
+ ##### Usage
328
+
329
+ h2 {
330
+ @include heading-27;
331
+ }
332
+
333
+ #### Core styles
334
+
335
+ The following core styles exist:
336
+
337
+ * `core-80`
338
+ * `core-48`
339
+ * `core-36`
340
+ * `core-27`
341
+ * `core-24`
342
+ * `core-19`
343
+ * `core-16`
344
+ * `core-14`
345
+
346
+ ##### Description
347
+
348
+ `@include core-[size]($line-height, $line-height-640)`
349
+
350
+ ##### Parameters
351
+
352
+ `$line-height` and `$line-height-640` are both optional. When used it is
353
+ recomended to pass a fraction in for readability.
354
+
355
+ ##### Usage
356
+
357
+ h1 {
358
+ @include core-48;
359
+ }
360
+ h2 {
361
+ @include core-24($line-height: (50/24), $line-height-640: (18/16));
362
+ }
363
+
364
+ #### Tabular numbers
365
+
366
+ Tabular numbers have numerals of a standard fixed width. As all numbers have the same width, sets of numbers may be more easily compared. We recommend using them where different numbers are likely to be compared, or where different numbers should line up with each other, eg in tables.
367
+
368
+ `$tabular-numbers` is an optional variable that may be passed to the heading, copy and core styles to use (or explicitly not use) tabular numbers. When no variable is passed, the default is non-tabular.
369
+
370
+ ##### Usage
371
+
372
+ h1 {
373
+ @include core-48;
374
+ }
375
+ h2 {
376
+ @include core-24($tabular-numbers: true);
377
+ }
378
+
379
+ [See an example of tabular numbers in a table](http://govuk-elements.herokuapp.com/data/#data-table-numeric)
380
+
381
+ ### <a id="css3"></a>css3
382
+
383
+ CSS3 helpers to abstract vendor prefixes.
384
+
385
+ #### border-radius
386
+
387
+ ##### Description
388
+
389
+ `@mixin border-radius($radius)`
390
+
391
+ ##### Parameters
392
+
393
+ `$radius` a pixel value.
394
+
395
+ ##### Usage
396
+
397
+ .column {
398
+ @include border-radius(5px);
399
+ }
400
+
401
+ #### box-shadow
402
+
403
+ ##### Description
404
+
405
+ `@mixin box-shadow($shadow)`
406
+
407
+ ##### Parameters
408
+
409
+ `$shadow` a value set to pass into [`box-shadow`](https://developer.mozilla.org/en-US/docs/CSS/box-shadow).
410
+
411
+ ##### Usage
412
+
413
+ .column {
414
+ @include box-shadow(0 0 5px black);
415
+ }
416
+
417
+ #### translate
418
+
419
+ ##### Description
420
+
421
+ `@mixin translate($x, $y)`
422
+
423
+ ##### Parameters
424
+
425
+ `$x` and `$y` are css values.
426
+
427
+ ##### Usage
428
+
429
+ .column {
430
+ @include translate(2px, 3px);
431
+ }
432
+
433
+ #### gradient
434
+
435
+ This can currently only handle linear top to bottom gradients.
436
+
437
+ ##### Description
438
+
439
+ `@mixin gradient($from, $to)`
440
+
441
+ ##### Parameters
442
+
443
+ `$from` and `$to` are colour values.
444
+
445
+ ##### Usage
446
+
447
+ .column {
448
+ @include gradient(#000, #fff);
449
+ }
450
+
451
+ #### transition
452
+
453
+ ##### Description
454
+
455
+ `@mixin transition($property, $duration, $function, $delay:0s)`
456
+
457
+ ##### Parameters
458
+
459
+ Match up with the respective properties from [`transition`](https://developer.mozilla.org/en-US/docs/CSS/transition).
460
+
461
+ ##### Usage
462
+
463
+ .column {
464
+ @include transition(left, 3s, ease);
465
+ }
466
+
467
+ #### box-sizing
468
+
469
+ ##### Description
470
+
471
+ `@mixin box-sizing($type)`
472
+
473
+ ##### Parameters
474
+
475
+ `$type` is one of `border-box`, `content-box` and `padding-box`.
476
+
477
+ ##### Usage
478
+
479
+ .column {
480
+ @include box-sizing(border-box);
481
+ }
482
+
483
+ #### calc
484
+
485
+ ##### Description
486
+
487
+ `@mixin calc($property, $calc)`
488
+
489
+ ##### Parameters
490
+
491
+ `$property` the property to apply the calc to.
492
+ `$calc` the calculation to.
493
+
494
+ ##### Usage
495
+
496
+ .column {
497
+ @include calc(width, "300% - 20px");
498
+ }
499
+
500
+ ### <a id="buttons"></a>Buttons
501
+
502
+ A mixin for creating buttons in the GOV.UK style.
503
+
504
+ ##### Description
505
+
506
+ `@mixin button($colour)`
507
+
508
+ ##### Parameters
509
+
510
+ `$colour` the background colour of the button (default is `$green`).
511
+
512
+ ##### Usage
513
+
514
+ .button{
515
+ @include button;
516
+ }
517
+ .button-secondary{
518
+ @include button($grey-3);
519
+ }
520
+ .button-warning{
521
+ @include button($red);
522
+ }
523
+
524
+ ##### Notes
525
+
526
+ The button text colour is set by the mixin to either light or dark, depending on the button background colour.
527
+
528
+ If you're applying these styles to non form elements, adding a class of 'disabled' to the element will emulate the disabled button style.
529
+
530
+
531
+ ### <a id="alpha-beta"></a> Phase banner
532
+
533
+ A mixin to create a GOV.UK Phase banner, with alpha/beta tag inside.
534
+
535
+ #### Description
536
+
537
+ `@mixin phase-banner()`
538
+
539
+ ##### Phase banner - Alpha
540
+
541
+ .phase-banner {
542
+ @include phase-banner();
543
+ }
544
+
545
+ <div class="phase-banner">
546
+ <p>
547
+ <strong class="phase-tag">ALPHA</strong>
548
+ <span>This is a new service – your <a href="#">feedback</a> will help us to improve it.</span>
549
+ </p>
550
+ </div>
551
+
552
+ ##### Phase banner - Beta
553
+
554
+ .phase-banner {
555
+ @include phase-banner();
556
+ }
557
+
558
+ <div class="phase-banner">
559
+ <p>
560
+ <strong class="phase-tag">BETA</strong>
561
+ <span>This is a new service – your <a href="#">feedback</a> will help us to improve it.</span>
562
+ </p>
563
+ </div>
564
+
565
+ ### <a id="phase-tags"></a> Phase tags
566
+
567
+ A mixin to create an alpha/beta tag.
568
+
569
+ #### Description
570
+
571
+ `@mixin phase-tag()`
572
+
573
+ ##### Phase tag - Alpha
574
+
575
+ .alpha-tag{
576
+ @include phase-tag();
577
+ }
578
+ <h2>
579
+ Apply using the new service <span class="alpha-tag">ALPHA</span>
580
+ </h2>
581
+
582
+ ##### Phase tag - Beta
583
+
584
+ .beta-tag{
585
+ @include phase-tag();
586
+ }
587
+ <h2>
588
+ Apply using the new service <span class="beta-tag">BETA</span>
589
+ </h2>
590
+
591
+ ### <a id="breadcrumbs"></a> Breadcrumbs
592
+
593
+ A mixin for creating breadcrumb navigation, showing page hierarchy in the GOV.UK style.
594
+
595
+ #### Description
596
+
597
+ `@mixin breadcrumbs`
598
+
599
+ #### Usage
600
+
601
+ .breadcrumbs {
602
+ @include breadcrumbs;
603
+ }
604
+
605
+ <div class="breadcrumbs">
606
+ <ol role="breadcrumbs">
607
+ <li>
608
+ <a href="/">Home</a>
609
+ </li>
610
+ <li>
611
+ <a href="/section-name">Section name</a>
612
+ </li>
613
+ <li>
614
+ Page name
615
+ </li>
616
+ </ol>
617
+ </div>
Binary file