Skip to content

Commit

Permalink
Remedy picture & source display [#45]
Browse files Browse the repository at this point in the history
  • Loading branch information
mirisuzanne committed Feb 1, 2021
1 parent 5b79a04 commit 59aee67
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## UNRELEASED

- [Remedy] New: Proper display handling for `picture` and `source` elements
- [Remedy] New: Add basic `[hidden]` remedy
to fix unintentional `display` overrides
- [Remedy] Fix: Audio without `[controls]` remains hidden by default
Expand Down
17 changes: 17 additions & 0 deletions css/remedy.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,23 @@ img, svg, video, canvas, audio, iframe, embed, object {
audio:not([controls]) { display:none; }


/* @docs
label: Responsive Images
note: |
These new elements display inline by default,
but that's not the expected behavior for either one.
This can interfere with proper layout and aspect-ratio handling.
1. Remove the unnecessary wrapping `picture`, while maintaining contents
2. Source elements have nothing to display, so we hide them entirely
category: embedded elements
*/
picture { display: contents; }
source { display: none; }


/* @docs
label: Aspect Ratios
Expand Down

0 comments on commit 59aee67

Please sign in to comment.