Skip to content

Commit

Permalink
constrain iframes to width of container (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstaley committed Dec 7, 2021
1 parent e5b0cde commit e545db4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-numbers-lay.md
@@ -0,0 +1,5 @@
---
'@hashicorp/react-content': minor
---

Constrain the width of iframe elements to the width of their container
1 change: 1 addition & 0 deletions packages/content/style.module.css
Expand Up @@ -10,6 +10,7 @@
composes: codeInline from './styles/code-inline.module.css';
composes: headings from './styles/headings.module.css';
composes: hr from './styles/hr.module.css';
composes: iframe from './styles/iframe.module.css';
composes: img from './styles/img.module.css';
composes: olUlLists from './styles/ol-ul-lists.module.css';
composes: p from './styles/p.module.css';
Expand Down
6 changes: 6 additions & 0 deletions packages/content/styles/iframe.module.css
@@ -0,0 +1,6 @@
.iframe {
& iframe:not([class]) {
margin: 1rem auto;
max-width: 100%;
}
}

1 comment on commit e545db4

@vercel
Copy link

@vercel vercel bot commented on e545db4 Dec 7, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.