feat: iframe/youtube/codepen apply 16:9 sizing in preview panel#150
Merged
Merged
Conversation
…depen Add a general iframe component (title/source props) rendered at 100% container width with a 16:9 aspect ratio. Apply the same responsive sizing to custom youtube and codepen components, overriding SeeMark's fixed-dimension defaults. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0ff881f to
c93fdb2
Compare
jamliaoo
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
設計師希望 iframe 類型內容,在 preview panel 內顯示時,可以維持寬高 16:9(aka Tailwind
aspect-video)的比例,且寬不超過整個 preview 區域。討論:
https://docs.google.com/document/d/1o80SD1jfOYbKEKcX0WodZ-PL8xgvA8Xii2GAVOXJzYc/edit?tab=t.0#heading=h.65w61zh43oa0
https://coseeing.slack.com/archives/C0AABUFUQ01/p1780557641609349?thread_ts=1779198395.123149&cid=C0AABUFUQ01
Before
寬高固定,因此 preview 區域太小時會破版
After