Skip to content

Commit 7d0c45d

Browse files
authored
Merge pull request #477 from alphagov/fix-comment-contrast-issue
Ensure comments in code examples are readable
2 parents 558bac1 + f167724 commit 7d0c45d

5 files changed

Lines changed: 8 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.2.1
2+
3+
- [Fix comments in code blocks being hard to read](https://github.com/alphagov/tech-docs-gem/pull/477)
4+
15
## 6.2.0
26

37
- Remove support for Ruby 3.2, by updating `required_ruby_version` to `>= 3.3.0`

example/.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.6
1+
3.3.11

example/source/code.html.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ An example of a table with a `code` element within it.
1717
An example of a code block with a long line length
1818

1919
```ruby
20+
# Example comment to check syntax highlighting for comments
2021
RSpec.describe ContentItem do
2122
subject { described_class.new(base_path) }
2223
let(:base_path) { "/search/news-and-communications" }

lib/assets/stylesheets/palette/_syntax-highlighting.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
$code-00: scale-color(govuk-colour("black", $variant: "tint-95"), $lightness:50%); /* Default Background */
55
$code-01: #f5f5f5; /* Lighter Background (Unused) */
66
$code-02: #bfc1c3; /* Selection Background */
7-
// we should be using govuk-functional-colour but it outputs a variable, but darken only takes numbers
8-
// instead, we use the colour returned by govuk-functional-colour(secondary-text)
9-
$code-03: darken( govuk-colour("black", $variant: "tint-95"), 2%);; /* Comments, Invisibles, Line Highlighting */
7+
$code-03: govuk-functional-colour(secondary-text); /* Comments, Invisibles, Line Highlighting */
108
$code-04: #e8e8e8; /* Dark Foreground (Unused) */
119
$code-05: govuk-functional-colour(text); /* Default Foreground, Caret, Delimiters, Operators */
1210
$code-06: govuk-functional-colour(body-background); /* Light Foreground (Unused) */

lib/govuk_tech_docs/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module GovukTechDocs
2-
VERSION = "6.2.0".freeze
2+
VERSION = "6.2.1".freeze
33
end

0 commit comments

Comments
 (0)