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

Block vertical centering #403

Closed
swashbuck opened this issue Mar 10, 2023 · 2 comments · Fixed by #405
Closed

Block vertical centering #403

swashbuck opened this issue Mar 10, 2023 · 2 comments · Fixed by #405

Comments

@swashbuck
Copy link
Contributor

swashbuck commented Mar 10, 2023

Subject of the issue

The _componentVerticalAlignment option doesn't work quite as I would expect. When setting a minimum height on the block, using center does not actually center the block's contents vertically.

Wondering if we need a new _blockVerticalAlignment option or if we could modify how _componentVerticalAlignment works?

Your environment

  • Framework v5.25.1
  • Vanilla theme v9.6.1

Steps to reproduce

  1. Create a block with the following properties:
    "_vanilla": {
      "_minimumHeights": {
          "_large": 600,
          "_medium": 600,
          "_small": 0
      },
      "_componentVerticalAlignment": "center"
    },
  1. Add a Text component with a small amount of text.

Expected behaviour

Text component should be centered vertically.

Actual behaviour

Text component is top-aligned.

@guywillis
Copy link
Contributor

I think the min height property needs to propagate down a few levels via min-height: inherit; on the block inner / component container elements for the vertical alignment to work with min heights

@github-actions
Copy link

🎉 This issue has been resolved in version 9.6.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants