-
Notifications
You must be signed in to change notification settings - Fork 509
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
Live samples have a reduced height and get scrollbars #6445
Comments
PR #5337 added I suggest we update the mdn/content at once and not worry about it again. |
I don't care much if example iframes are 32px taller than they need to be.
We could fix it in content, yes, but it seems like it would be much less work, and much safer, to fix in the platform. |
Agreed. But the future contributors may wonder why do they have to set 32px less in the macro in order to get the exact height. We document it or not it'll remain a strange fact about the platform.
Yes, it is a considerable amount of work to update the content. At the moment there are ~2481 EmbedLiveSample macros in mdn/content. It can be automated. But the reviews will take time because the reviewer will have scan the outputs using the PR companion. |
I wonder if Yari can compute the correct height (at least in 99% of the cases) when building the page. This wasn't possible in the wiki-era. It would simplify writers' work and prevent such problems. We could then deprecate the parameter (or set it mostly to "" if there are edge cases. cc/ @mdn/core-dev to know if this would be the correct answer to this problem, or not. Maybe it doesn't need to be an |
@teoli2003 We used to set different classes, which set different heights, on the interactive examples. This was done using a |
I can't find an existing issue about this, apologies if there is one.
I think this might be the result of an earlier change to add a border to live samples: #3260 . This stole some usable height from the iframe, and as a result all examples whose content was close to occupying the max height (which is a lot of them) got scrollbars, which is ugly and makes it harder to scroll the page. In many cases the output is also cut off. For example, here's the output for the example at https://developer.mozilla.org/en-US/docs/web/css/@font-face#examples:
We could fix this one at a time in content (and I'm about to fix this one) but it would be much better to have a platform fix.
The text was updated successfully, but these errors were encountered: