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

Use an inline-size container for <demo-box> #2415

Merged
merged 5 commits into from
Jan 27, 2025

Conversation

knowler
Copy link
Contributor

@knowler knowler commented Jan 24, 2025

Changes

For the docs site, this resolves the issues of the main content breaking out of its grid column on the page for the Tag component. Given that a demo’s content should be isolated from the page, it makes sense to make it an inline-size container, so that the size of the content doesn’t affect the size of the parent — important when working with nested grid layouts.

Some other changes needed to be made as a consequence of this:

  • In all examples that use a wrapper for their contents that use 100% within their styles, I’ve swapped that for 100cqi.
  • I’ve also added a wrapping element for all of the tab examples since the Tabs component itself has inline-size containment applied.
  • I needed to add a max-inline-size of 100cqi to the <astro-island> to force content to shrink in some cases (e.g. Header).

Testing

Every page that uses <LiveExample> will need to be tested/reviewed visually. Make sure to resize.

Docs

N/A

@CLAassistant
Copy link

CLAassistant commented Jan 24, 2025

CLA assistant check
All committers have signed the CLA.

@mayank99
Copy link
Contributor

Note: This PR supersedes #2381.

@knowler knowler marked this pull request as ready for review January 27, 2025 19:39
@knowler knowler requested a review from a team as a code owner January 27, 2025 19:39
@knowler knowler requested review from mayank99 and r100-stack and removed request for a team January 27, 2025 19:39
@knowler
Copy link
Contributor Author

knowler commented Jan 27, 2025

Marking this as ready to review even though the tests are failing. Seems like it might be a GH configuration thing?

Copy link
Contributor

@mayank99 mayank99 left a comment

Choose a reason for hiding this comment

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

Good fix, LGTM!

(Ignore the failing checks, it's a permissions thing)

Copy link
Member

@r100-stack r100-stack left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@knowler knowler merged commit ad6b0ce into iTwin:main Jan 27, 2025
11 of 14 checks passed
@knowler knowler deleted the knowler/tag-examples-breaking-out-of-grid branch January 27, 2025 22:09
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.

4 participants