Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve metadata positioning in doc list for right to left layouts #429

Merged
merged 1 commit into from
Jul 17, 2018

Conversation

vanitabarrett
Copy link
Contributor

@vanitabarrett vanitabarrett commented Jul 17, 2018

Move the metadata to the right when on a right to left layout. Otherwise it's difficult to see how the metadata is related to the document list item heading

Before

screen shot 2018-07-17 at 13 33 52

After

screen shot 2018-07-17 at 13 39 13

Component guide: https://govuk-publishing-compon-pr-429.herokuapp.com/component-guide/document_list

@benthorner benthorner temporarily deployed to govuk-publishing-compon-pr-429 July 17, 2018 09:38 Inactive
@vanitabarrett vanitabarrett force-pushed the improve-doc-list-metadata-rtl branch from 9b93d7b to 47b54f8 Compare July 17, 2018 09:39
@benthorner benthorner temporarily deployed to govuk-publishing-compon-pr-429 July 17, 2018 09:39 Inactive
Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An indenting issue and a few alternative suggestions.


.direction-rtl & {
float: right;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this also need to have the padding-right changed to padding-left? The indenting of the date doesn't look quite right...

screen shot 2018-07-17 at 12 29 19

path: '/government/publications/school-exclusion'
metadata:
public_updated_at: 2017-07-19 15:01:48
document_type: 'Statutory guidance'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to test a rtl example with some gem-c-document-list__item-context elements included.

@@ -32,6 +32,10 @@
float: left;
list-style: none;
padding-right: $gutter-two-thirds;

.direction-rtl & {
float: right;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of floating this right you could simply take the float left off the original element style and replace it with display inline-block - it's then influenced by the text direction but uses less CSS (of course, I haven't tested this cross browser but I think it should work).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good, I wonder why we used float to start with.. I'll have a go 👍

@vanitabarrett vanitabarrett force-pushed the improve-doc-list-metadata-rtl branch from 47b54f8 to 3bffb27 Compare July 17, 2018 12:32
@benthorner benthorner temporarily deployed to govuk-publishing-compon-pr-429 July 17, 2018 12:32 Inactive
@vanitabarrett vanitabarrett force-pushed the improve-doc-list-metadata-rtl branch from 3bffb27 to 40b73bc Compare July 17, 2018 12:33
@benthorner benthorner temporarily deployed to govuk-publishing-compon-pr-429 July 17, 2018 12:33 Inactive
Float the metadata to the right when on a right to left layout. Otherwise it's difficult to see how the metadata is related to the document list item heading
@vanitabarrett vanitabarrett merged commit cb3d18e into master Jul 17, 2018
@vanitabarrett vanitabarrett deleted the improve-doc-list-metadata-rtl branch July 17, 2018 12:49
@vanitabarrett vanitabarrett mentioned this pull request Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants