govuk_publishing_components 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 352553e5596a58b518185ed1ad337f813156a940
4
- data.tar.gz: 0c0b962d0a236b621ee2598ceb9042a6bca820e6
3
+ metadata.gz: 2dbabca1a1eeb881b9e7ba94ee077902d90c24fc
4
+ data.tar.gz: 6a2756fa3cc6fd228a5a055a36120fb644c6dc19
5
5
  SHA512:
6
- metadata.gz: 1b83195891096c6b8d365371917f69bedfef7c194cd42ef37609204cf815daa5e1e8e672a938df517de088ea5bcb4723b572700c9a227a0e6ba1281dcbffb516
7
- data.tar.gz: 6aff531bc8f354d6c56a9564fc4e1efca576f1389a3bb9bd1f37efb81eb479af8f40d366864c7fa06910613e55c730a8058a240cba115ed2ac7ab269711b3a64
6
+ metadata.gz: bd46aa23b8bffd47696c46871e2a800ff254cec274665590d28f60b20a9b8ce16895d9aabfecfd6f61891340c2357099c520aa898987bf6f56be1192f214b5df
7
+ data.tar.gz: 22608ecd27cf1fcb9feccf699c1a543f0318419d2bfaf80fe5dd284a9c12402caea415eb3a83096444fcd842b2260cd37f26d01b82dc46d33cec13d8a71d8e16
@@ -64,22 +64,34 @@ $border-color: #ccc;
64
64
 
65
65
  .code-block {
66
66
  margin: 30px 0;
67
- padding: $gutter;
68
67
  @extend %outdent-to-full-width;
69
- overflow: scroll;
70
68
  max-height: 300px;
71
69
 
72
70
  // Match Prism styles to avoid a flash as it renders
73
71
  background: $prism-background;
74
72
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
73
+ font-size: 16px;
74
+ line-height: 1.5;
75
75
 
76
76
  &[contenteditable]:hover {
77
77
  cursor: text;
78
78
  }
79
79
 
80
+ &[contenteditable]:focus {
81
+ outline: 3px solid $focus-colour;
82
+ }
83
+
84
+ pre[class*=language-] {
85
+ padding: $gutter;
86
+ }
87
+
80
88
  code {
81
89
  display: block;
82
90
  }
91
+
92
+ .token.operator {
93
+ background: none;
94
+ }
83
95
  }
84
96
 
85
97
  .component-guide-preview {
@@ -1,3 +1,3 @@
1
1
  <div class="component-call code-block" contenteditable>
2
- <code class="language-ruby">&lt;%= render 'components/<%= component_doc.id %>'<% if fixture.data? %>, <%= fixture.pretty_data %><% end %> %&gt;</code>
2
+ <pre class="language-ruby"><code>&lt;%= render 'components/<%= component_doc.id %>'<% if fixture.data? %>, <%= fixture.pretty_data %><% end %> %&gt;</code></pre>
3
3
  </div>
@@ -24,5 +24,8 @@
24
24
  <%= render 'govuk_component/breadcrumbs', breadcrumbs: @guide_breadcrumbs %>
25
25
  <%= yield %>
26
26
  </main>
27
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/themes/prism.min.css" integrity="sha256-vtR0hSWRc3Tb26iuN2oZHt3KRUomwTufNIf5/4oeCyg=" crossorigin="anonymous" />
28
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/prism.min.js" integrity="sha256-Zb9yKJ/cfs+jG/zIOFL0QEuXr2CDKF7FR5YBJY3No+c=" crossorigin="anonymous"></script>
29
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/components/prism-ruby.min.js" integrity="sha256-e0SYaLys07GcwuYiWJ0aewa3AOR3hHFY1mNTppYPb34=" crossorigin="anonymous"></script>
27
30
  </body>
28
31
  </html>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '0.3.1'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-28 00:00:00.000000000 Z
11
+ date: 2017-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails