diff --git a/app/assets/stylesheets/govuk-component/_title-print.scss b/app/assets/stylesheets/govuk-component/_title-print.scss index 25ac74ca7..206531997 100644 --- a/app/assets/stylesheets/govuk-component/_title-print.scss +++ b/app/assets/stylesheets/govuk-component/_title-print.scss @@ -1,3 +1,14 @@ +// scss-lint:disable SelectorFormat +.pub-c-title__context { + margin: 0; +} + +.pub-c-title__text { + margin-top: 0; +} +// scss-lint:enable SelectorFormat + +// To Be Deleted: Old Styling .govuk-title { .context { margin: 0; diff --git a/app/assets/stylesheets/govuk-component/_title.scss b/app/assets/stylesheets/govuk-component/_title.scss index 4f729b03f..26163410f 100644 --- a/app/assets/stylesheets/govuk-component/_title.scss +++ b/app/assets/stylesheets/govuk-component/_title.scss @@ -1,3 +1,23 @@ +// scss-lint:disable SelectorFormat +.pub-c-title { + @include responsive-vertical-margins; +} + +.pub-c-title__context { + @include core-24; + color: $secondary-text-colour; +} + +.pub-c-title__text { + @include bold-48; +} + +.pub-c-title__text--long { + @include bold-36; +} +// scss-lint:enable SelectorFormat + +// To Be Deleted: Old Styling .govuk-title { @include responsive-vertical-margins; diff --git a/app/views/govuk_component/docs/title.yml b/app/views/govuk_component/docs/title.yml index ae5aba5d0..93eba785c 100644 --- a/app/views/govuk_component/docs/title.yml +++ b/app/views/govuk_component/docs/title.yml @@ -8,6 +8,12 @@ body: | On average the titles on government bits of content are 50 characters. The average for bits of general guidance are nearer 27 characters long. +accessibility_criteria: + The page title must: + + - be part of a correct heading structure for a page + - be semantically represented as a heading + - convey the heading level fixtures: default: title: My page title diff --git a/app/views/govuk_component/title.raw.html.erb b/app/views/govuk_component/title.raw.html.erb index d220c64fa..500c84e0b 100644 --- a/app/views/govuk_component/title.raw.html.erb +++ b/app/views/govuk_component/title.raw.html.erb @@ -1,10 +1,12 @@ <% - average_title_length ||= :average + average_title_length ||= false context ||= false %> -
<%= context %>
+<%= context %>
<% end %> -