Skip to content

Commit

Permalink
added detail to the floating image default elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Kloos committed Jan 9, 2024
1 parent a5d9244 commit da6f814
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ <h5>Heading 5</h5>
>
Aspect Ratio 4:3
</text></svg
>This is paragraph text. If you want the image to float place it inside a <code>&lt;p&gt;</code>,
<code>&lt;li&gt;</code>, <code>&lt;dd&gt;</code>, or a <code>&lt;td&gt;</code>.
>This is paragraph text. If you want the image to float place it inside a <code>&lt;detail&gt;</code>,
<code>&lt;p&gt;</code>, <code>&lt;li&gt;</code>, <code>&lt;dd&gt;</code>, or a <code>&lt;td&gt;</code>.
</p>
<p>
This is more paragraph text. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid amet
Expand Down
4 changes: 2 additions & 2 deletions src/system-selectors.css
Original file line number Diff line number Diff line change
Expand Up @@ -390,14 +390,14 @@
max-inline-size: 100%;
block-size: auto;
}
:is(p, li, td, dd) > :is(img, picture, svg) {
:is(p, li, td, dd, detail) > :is(img, picture, svg) {
float: inline-end;
margin-inline-start: var(--system-spacing-column-gap);
margin-block-end: var(--system-spacing-element-block);
max-inline-size: 36cqw;
}
@container --content (width < 42ch) {
:is(p, li, dd, td) > :is(img, picture, svg) {
:is(p, li, dd, td, detail) > :is(img, picture, svg) {
width: 100%;
max-inline-size: unset;
}
Expand Down

0 comments on commit da6f814

Please sign in to comment.