diff --git a/CHANGELOG.md b/CHANGELOG.md index 66194ecee7..5e78de91eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ useful summary for people upgrading their application, not a replication of the commit log. +## Unreleased + +* Improve metadata positioning in document list for rtl layouts (PR #429) + ## 9.5.2 * Attempt to improve Google snippet display (PR #424) diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss b/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss index afd2d6fa90..dd2460adfa 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss @@ -29,9 +29,14 @@ .gem-c-document-list__attribute { @include core-14; - float: left; + display: inline-block; list-style: none; padding-right: $gutter-two-thirds; + + .direction-rtl & { + padding-right: 0; + padding-left: $gutter-two-thirds; + } } .gem-c-document-list--bottom-margin { diff --git a/app/views/govuk_publishing_components/components/docs/document_list.yml b/app/views/govuk_publishing_components/components/docs/document_list.yml index 689d2060f0..6afe8d0e8b 100644 --- a/app/views/govuk_publishing_components/components/docs/document_list.yml +++ b/app/views/govuk_publishing_components/components/docs/document_list.yml @@ -116,3 +116,21 @@ examples: path: '/government/organisations/advisory-committee-on-the-microbiological-safety-of-food' context: 'moving to GOV.UK' description: "Works with 4 agencies and public bodies" + right_to_left: + data: + items: + - link: + text: 'School behaviour and attendance: parental responsibility measures' + path: '/government/publications/parental-responsibility-measures-for-behaviour-and-attendance' + description: "Statutory guidance for schools, local authorities and the police on dealing with poor attendance and behaviour in school" + metadata: + public_updated_at: 2017-01-05 14:50:33 + document_type: 'Statutory guidance' + - link: + text: 'School exclusion' + path: '/government/publications/school-exclusion' + metadata: + public_updated_at: 2017-07-19 15:01:48 + document_type: 'Statutory guidance' + context: + right_to_left: true