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

Add text-align override classes #2339

Merged
merged 2 commits into from
Sep 20, 2021
Merged

Add text-align override classes #2339

merged 2 commits into from
Sep 20, 2021

Conversation

hannalaakso
Copy link
Member

@hannalaakso hannalaakso commented Sep 7, 2021

This PR:

  • Adds text align override classes that set the CSS text-align property to left, right or center.
  • Adds examples to the review app

The review app example used for govuk-!-text-align-left is a bit odd, feel free to suggest a better one (this would also be useful for when we add an example to the Design System guidance).

Related: alphagov/govuk-design-system#1863

Fixes #1824

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2339 September 7, 2021 16:53 Inactive
@hannalaakso hannalaakso force-pushed the add-alignment-classes branch from 3dfe3ba to 0547ab2 Compare September 7, 2021 16:57
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2339 September 7, 2021 16:58 Inactive
@lfdebrux
Copy link
Member

Hmm, I see what you're saying about the examples being odd, maybe it would be more useful to show examples using them to align text in a table?

Copy link
Contributor

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

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

Changes make sense to me – thanks @hannalaakso! Agree with Laurence that it'd be useful to have examples that show how the classes work with tables – especially as that's the original use case that was identified.

Personally not sure how important it is to have the panel example – I'd be happy with just text overridden, even though the 'natural' alignment would be left anyway. You can still use dev tools to check that the alignment is coming explicitly from the override.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2339 September 16, 2021 17:30 Inactive
Copy link
Member

@lfdebrux lfdebrux left a comment

Choose a reason for hiding this comment

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

Looks great! I appreciate the table examples :)

@hannalaakso hannalaakso merged commit d46debe into main Sep 20, 2021
@hannalaakso hannalaakso deleted the add-alignment-classes branch September 20, 2021 09:34
calvin-lau-sig7 added a commit to alphagov/govuk-design-system that referenced this pull request Sep 27, 2021
Add guidance for newly-added text override classes in Frontend: alphagov/govuk-frontend#2339
calvin-lau-sig7 added a commit to alphagov/govuk-design-system that referenced this pull request Sep 27, 2021
Add guidance for newly-added text override classes in Frontend: alphagov/govuk-frontend#2339

Put override classes into grey code boxes

Correct 'centre' in class name
@EoinShaughnessy EoinShaughnessy changed the title Add text align override classes Add text align override classes Sep 28, 2021
@EoinShaughnessy EoinShaughnessy changed the title Add text align override classes Add text-align override classes Sep 28, 2021
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.

Create override classes for text alignment
4 participants