cfpb / capital-framework

The Consumer Financial Protection Bureau's user interface framework
https://cfpb.github.io/capital-framework/
Creative Commons Zero v1.0 Universal
54 stars 29 forks source link

cf-notifications: Set a max-width #895

Closed anselmbradford closed 5 years ago

anselmbradford commented 5 years ago

This incorporates the max-width added to a version of the notification via mixing in m-full-width-text https://github.com/cfpb/cfgov-refresh/blob/master/cfgov/regulations3k/jinja2/regulations3k/notification.html#L22

Changes

Testing

  1. Follow the local testing instructions to view the changes in the docs.

Screenshots

Before:

cf-notifications-before

After:

notification-after

anselmbradford commented 5 years ago

Edit: cf-layout uses 41.875rem. Should we move this magic number into a variable?

Hmmm we probably should in cf-core, and use 41.875, not 41.8.

anselmbradford commented 5 years ago

After chatting with @Scotchester we've decided to close this in favor of having the parent container dictate the width of the notification. This PR was largely in service of the regs3k notification, but I addressed this another way in https://github.com/cfpb/cfgov-refresh/pull/4891