css-examples
css-examples copied to clipboard
Fix width of embedded live sample preview and form controls
Hey @mdn/mdn-community-engagement! For the current embed live sample the width is set to 90%
with a max-width
of 700px
. This might have worked with the previous MDN Web Docs layout, but is causing problems with some of the examples leading to confusion.
For example, even with the correct code, the following example on .. displays incorrectly: https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Multicol_skills#multicol_two
If we update styles.css
, set the width
to 100%
and remove the max-width
, the output is as expected.
With the above change, we would also need to set the form elements to 100%
.