govuk_tech_docs 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of govuk_tech_docs might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fc8ffc6ed311d6d660cb4a74861e65dac415ca396e47def8b9e6564cc58a6ed
4
- data.tar.gz: 6d69b38114fe3853c7f3f3c379a87cdd50778563e885ba807503f0cb1af2025c
3
+ metadata.gz: 382dfb39d87e905ae4d6c36c5034d159446b5959e69d66108adabddd8aa979a3
4
+ data.tar.gz: b5ca8f8782e02ed3c6397fcbd07c2cf506315f0bde5a5bd257ca394ed9f196e0
5
5
  SHA512:
6
- metadata.gz: 4e6127e6a526eb2d7683d29b5872101e6556c4df2d13ef45aaa5db26ac3ec4f06618bfec24a5966d6585d0f12806161600a4ab6bf9d79a8cf7736d27c287c795
7
- data.tar.gz: bc119e8201e69cef00b2f6a97dc42f272f593c06ce8f1d82c055c38ff88650f2705d923d73dcdd1f980fcc3b08cbc5c277e143a2bc783a467498701fb6ba722d
6
+ metadata.gz: 5e25407531d21cba8580cf15b0d2cc1093a596dfe241d1893d6635a3790c818d2b035b478d4deb6d3a87b2e8b98a91f56937d0a56fbd6f10c11e62118c37d3b5
7
+ data.tar.gz: 5a53a4c55a8bb130189d974bc21f8eb4e003c6a1f59da998a35258b35a4d1b3f8b192bdf233dcbb2f70510f25a5b3d330bf1d3da5c27ff976eb4919d493a4512
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.7
4
+
5
+ A small release to fix an issue where code blocks font size was too large on some browsers.
6
+
7
+ See [pull request #131: Improve code font sizing ](https://github.com/alphagov/tech-docs-gem/pull/131) for details.
8
+
9
+
3
10
  ## 2.0.6
4
11
 
5
12
  This release contains accessibility fixes:
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: Code examples
3
+ ---
4
+
5
+ # Code examples
6
+
7
+ A paragraph with a `code` element within it.
8
+
9
+ <a href="#"><code>code element within a link</code></a>
10
+
11
+ An example of a code block with a long line length
12
+
13
+ ```ruby
14
+ RSpec.describe ContentItem do
15
+ subject { described_class.new(base_path) }
16
+ let(:base_path) { "/search/news-and-communications" }
17
+ let(:finder_content_item) { news_and_communications }
18
+ let(:news_and_communications) {
19
+ JSON.parse(File.read(Rails.root.join("features", "fixtures", "news_and_communications.json")))
20
+ }
21
+
22
+ RSpec.describe "as_hash" do
23
+ it "returns a content item as a hash" do
24
+ expect(subject.as_hash).to eql(finder_content_item)
25
+ end
26
+ end
27
+ end
28
+ ```
29
+
30
+ An example of a code block with a short length
31
+
32
+ ```ruby
33
+ RSpec.describe ContentItem do
34
+ end
35
+ ```
@@ -19,5 +19,3 @@ If you want slightly more control, you can always use <strong>HTML</strong>.
19
19
  For more detail and troubleshooting, take a look at the `README.md` file in the root of this project.
20
20
 
21
21
  <%= warning_text "Look out! A warning!" %>
22
-
23
- <a href="#"><code>code element within a link</code></a>
@@ -111,6 +111,15 @@
111
111
  border-left: govuk-spacing(2) solid govuk-colour("mid-grey");
112
112
  }
113
113
 
114
+ // http://code.iamkate.com/html-and-css/fixing-browsers-broken-monospace-font-handling/
115
+ pre,
116
+ code {
117
+ // Restores the normal text size in Mozilla Firefox, Google Chrome, and Safari; this unusual style rule should also be used anywhere where you would otherwise set the font-family property to ‘monospace’.
118
+ font-family: monospace, monospace;
119
+ // Restores the normal text size in Internet Explorer and Opera.
120
+ font-size: 1em;
121
+ }
122
+
114
123
  pre {
115
124
  background: $code-00;
116
125
  padding: 15px;
@@ -1,3 +1,3 @@
1
1
  module GovukTechDocs
2
- VERSION = "2.0.6".freeze
2
+ VERSION = "2.0.7".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_tech_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Government Digital Service
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-18 00:00:00.000000000 Z
11
+ date: 2019-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -356,6 +356,7 @@ files:
356
356
  - example/source/api-path.html.md
357
357
  - example/source/api-reference.html.md
358
358
  - example/source/child-of-expired-page.html.md
359
+ - example/source/code.html.md
359
360
  - example/source/core-layout-without-sidebar.html.md.erb
360
361
  - example/source/core-layout.html.md.erb
361
362
  - example/source/expired-page-with-owner.html.md