本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #3079

viewport

できること

このスキルは、モバイル向けのレイアウトに必要なviewportのmetaタグがページにあるかを確認します。レスポンシブなウェブサイトを作る開発者向けです。

使う場面

  • ✓ページがスマートフォンで極端に小さく表示され、読むために拡大が必要なとき。
  • ✓新しいテンプレートにviewportのmetaタグがないとき。
  • ✓ページのheadのマークアップを出力する共有コンポーネントを確認しているとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/viewport/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/viewport/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のサイトはスマートフォンで小さなデスクトップのページのように見えます。直すにはどのタグが必要ですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、headセクションにviewportのタグがあるかを確認し、なければ追加します。また、ズームを妨げる設定がないことも確かめます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Set the responsive viewport meta tag

Without the viewport meta tag, mobile browsers render pages at desktop width (typically 980px) then shrink them, making text unreadable without zooming.

Quick Reference

  • Add <meta name="viewport" content="width=device-width, initial-scale=1.0">
  • Never use maximum-scale=1 or user-scalable=no (breaks accessibility)
  • Essential for mobile-responsive layouts

Check

Verify that this HTML document includes a proper viewport meta tag for responsive design that controls how the page is displayed on mobile devices.

Fix

Add the viewport meta tag: <meta name="viewport" content="width=device-width, initial-scale=1.0"> in the head section.

Explain

Explain how the viewport meta tag enables responsive design and why it's essential for mobile-first web development.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Set the responsive viewport meta tag. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/html/viewport

よくある質問

viewportのタグは何をしますか?

モバイルのブラウザーに、デスクトップの広い幅で描画して縮小するのではなく、端末の幅を使うよう伝えます。

どの設定を避けるべきですか?

このスキルによると、maximum-scale=1やuser-scalable=noは、アクセシビリティを損なうため使うべきではありません。

レスポンシブデザインに必要ですか?

はい。このスキルは、モバイル対応のレイアウトに不可欠だとしています。

詳細

作者による元の説明

Use when reviewing templates, rendered HTML, or shared components related to Set the responsive viewport meta tag. Validate the final browser-facing markup, not just the source framework abstraction.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#3079
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル