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

Fix RTL support in metadata component #4596

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
## Unreleased

* Add a `form` attribute to the button component ([PR #4588](https://github.com/alphagov/govuk_publishing_components/pull/4588))
* Fix RTL support in metadata component ([PR #4596](https://github.com/alphagov/govuk_publishing_components/pull/4596))

## 51.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,13 @@

@include govuk-media-query($from: tablet) {
box-sizing: border-box;
float: left;
clear: left;
padding-right: govuk-spacing(1);
float: inline-start;
padding-inline-start: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @unoduetre. Just one final comment - are clear: inline-start; and padding-inline-start: 0; needed? I tested in a few browsers, and disabling them didn’t seem to have much effect. It might be we can remove both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's better to leave padding-inline-start to make sure the correct padding is set and not set through cascading. But I think clear can indeed be removed. I'll do that in a minute.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

clear has been removed.

padding-inline-end: govuk-spacing(1);
margin-top: 0;
}
}

.direction-rtl .gem-c-metadata .gem-c-metadata__term,
.gem-c-metadata.direction-rtl .gem-c-metadata__term {
float: inline-start;
clear: inline-start;

@include govuk-media-query($from: tablet) {
padding-left: govuk-spacing(1);
padding-right: 0;
}
}

.gem-c-metadata__definition {
margin: 0;

Expand All @@ -85,11 +74,6 @@
}
}

.direction-rtl .gem-c-metadata .gem-c-metadata__definition,
.gem-c-metadata.direction-rtl .gem-c-metadata__definition {
float: inline-start;
}

.gem-c-metadata__toggle-wrap {
display: none;
}
Expand Down