-
Notifications
You must be signed in to change notification settings - Fork 77
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
Make logos and wordmarks centerable #718
Comments
Seems like there are a few ways we could do this... If we go with a utility class, it could look like this:
Logos are all square so they're easier to center and don't need an override of Another option is to rework the component so it can inherit |
Another wrinkle: The use case for centering a logo/wordmark is often just for mobile. We often want content centered in small windows but left/right aligned in bigger windows. A class would take effect for all breakpoints unless we get really specific like |
The wordmark component has a fixed width, which is good because it helps maintain consistency across all the different sizes (and an explicit width is also required for image replacement). However, not all wordmark images are the full width of the component. A
background-position
rule explicitly sets the image to one side or the other, which is correct when the wordmark is aligned with text. But there isn't currently a way to center a wordmark without overriding its base styling.It would be nice to have a way to center wordmarks consistently so we don't have to do a custom override each time.
As much as it makes me cringe, it might call for a presentational utility class like
mzp-u-centered
. Unless we can define some specific rules about when and where a wordmark can be centered so we base it on some more meaningful context, a utility class seems like the simplest option.The text was updated successfully, but these errors were encountered: