Skip to content

Commit

Permalink
img, svg... max-width not width!
Browse files Browse the repository at this point in the history
Why did i make it like that?
  • Loading branch information
nuxodin committed Nov 13, 2023
1 parent 9a9bfa5 commit 8899015
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion base.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ hr {
border-width:0 0 1px 0;
border-top-width:0 !important;
}
img, svg, video, canvas, audio, video, iframe {
video, audio, video, iframe {
width: 100%;
width:-moz-available;
width:-webkit-fill-available;
}
img, svg, canvas {
max-width: 100%;
max-width:-moz-available;
max-width:-webkit-fill-available;
}
img, svg, video, canvas {
object-fit:cover;
height: auto;
Expand Down
8 changes: 8 additions & 0 deletions tests/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,14 @@ <h6>Header level 6 Some more Text to test line-height Some more Text to test lin
<iframe style="margin:1rem"></iframe>
<br>


<table>
<tr>
<td>Table-Cell-Test
<td>
<img width=100 height=100 style="background:#eee" alt="">
</table>

Dialog:
<br>
<button onclick="this.nextElementSibling.toggleAttribute('open')">toggle dialog</button>
Expand Down

0 comments on commit 8899015

Please sign in to comment.