Skip to content

fix(reset): leave audio, object, embed and image inputs to the browser - #131

Merged
alessandrobellesia merged 1 commit into
developfrom
fix/reset-media-elements
Oct 14, 2026
Merged

alessandrobellesia merged 1 commit into
developfrom
fix/reset-media-elements

Conversation

@alessandrobellesia

@alessandrobellesia alessandrobellesia commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

What

The first rule of the reset (all: unset; display: revert) now leaves audio, object, embed and input[type='image'] alone, next to video.

Why

  • <audio controls> takes its size from the browser stylesheet, which the reset removed. Chrome laid it out 0x0 (280x0 under an author width), and Safari 17.6 shrank it to 44px wide. The New CSS Reset has excluded audio since 1.7.3, and our copy predates that version.
  • object, embed and image inputs lost the size set by their width/height attributes.

Verification

Measured in Chrome 155 and Safari 17.6 (light and dark themes): audio 280x54 / 250x31, audio without controls still hidden, attribute-sized object/embed/image input back to 400x200. Firefox not measured. dist/ changes only in the reset selector.

For consumers

Apps that added all: revert to their <audio> elements as a workaround can drop it once they are on this release.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Preserved browser-provided sizing and controls for audio elements.
    • Preserved HTML dimension hints for objects, embeds, and image inputs, along with the pointer cursor for image inputs.

The first rule of the reset unsets every property and reverts display
alone, so <audio controls> lost the size the browser stylesheet gives
it: 0x0 in Chrome (280x0 under an author width), 44px wide in Safari
17.6. The New CSS Reset has excluded audio since 1.7.3, and this copy
predates that version.

object, embed and input[type=image] lost the size set by their width
and height attributes, which the unset overrides, the reason img,
iframe, canvas and video were already excluded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The universal reset selector now excludes audio, object, embed, and input[type='image']. Comments describe retained sizing behavior, and the changelog records the updates.

Changes

Reset exclusions

Layer / File(s) Summary
Update reset exclusions
src/reset.scss, CHANGELOG.md
The reset selector excludes audio, object, embed, and input[type='image']. Comments describe sizing behavior, and the changelog records the changes.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to a707a

The reset preserves browser sizing for audio controls, objects, embeds, and image inputs. The release pipeline generates the published CSS from the updated source, with no material merge risk established.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main reset change by naming the affected elements and stating that the browser should retain control over them.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads the reset with care,
Four more tags keep their sizing there.
Audio keeps its controls in view,
Image inputs keep their cursor too.
The changelog marks the work complete,
I twitch my nose and thump my feet!

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔇 Additional comments: 3
src/reset.scss: 2

7-8: LGTM!


18-21: LGTM!

CHANGELOG.md-9-9: 1

9-9: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Complete the opening sentence.

The first bullet is a sentence fragment. Add a subject and verb so readers can parse the reported behavior clearly.

Suggested correction
-* An `<audio controls>` laid out with no size, so its controls were in the DOM and nothing showed.
+* An `<audio controls>` element had no size, so its controls remained in the DOM but were not visible.

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fd2a45c5-2c35-411f-b299-aa381de306b8
📥 Commits

Reviewing files that changed from the base of the PR and between 31933ed and a707ad1.

📒 Files selected for processing: 2
  • CHANGELOG.md
  • src/reset.scss

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@alessandrobellesia
alessandrobellesia merged commit c14e30c into develop Oct 14, 2026
11 checks passed
@alessandrobellesia
alessandrobellesia deleted the fix/reset-media-elements branch October 14, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant