Skip to content

Commit

Permalink
Center-align button text [fix mozilla#826] (mozilla#916)
Browse files Browse the repository at this point in the history
## Description

Explicitly sets `text-align: center;` for `.mzp-c-button` to compensate
for button-styled links inheriting their alignment from their parent.
This only really manifests when a button-style link is set to the full
width of its container, but that does happen sometimes.

- [ ] I have documented this change in the design system.
- [x] I have recorded this change in `CHANGELOG.md`.

### Issue
mozilla#826
  • Loading branch information
reemhamz authored Jan 9, 2024
2 parents a170781 + fd36c6c commit 9943124
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
## Bug Fixes
* **css:** Fix incorrect value for `text-body-lg` in Firefox theme.
* **js:** Fix typo at `lang-switcher.js` comment
* **css:** Center-align button text (#826)

## Migration Tips
* Rename instances of `mzp-c-call-out` to `mzp-c-callout` (note the removed dash).
Expand Down
1 change: 1 addition & 0 deletions assets/sass/protocol/components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ a.mzp-c-button {
font-weight: bold;
line-height: $body-line-height;
padding: 6px $spacing-lg;
text-align: center;
text-decoration: none !important; /* stylelint-disable-line declaration-no-important */

&::-moz-focus-inner {
Expand Down

0 comments on commit 9943124

Please sign in to comment.