-
Notifications
You must be signed in to change notification settings - Fork 3
「CSS による配置」を改訂 #891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
「CSS による配置」を改訂 #891
Conversation
Deploying utcode-learn with
|
| Latest commit: |
dd65319
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cda16bda.utcode-learn.pages.dev |
| Branch Preview URL: | https://rewrite-css-arrangement.utcode-learn.pages.dev |
3f0bd0b to
86bec36
Compare
b40ab58 to
4b0f703
Compare
4b0f703 to
cceb0dd
Compare
chvmvd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
途中ですが
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request revises the CSS layout documentation (「CSS による配置」を改訂) by simplifying and reorganizing the content. The PR introduces a new, more streamlined tutorial focused on building pricing plan cards while teaching CSS layout fundamentals.
Key Changes:
- Creates new simplified CSS layout guide with step-by-step card building examples
- Removes the advanced "CSS arrangement" content (box model, positioning, grid)
- Adds multiple progressive code samples demonstrating width, border, padding, margin, flexbox, and responsive design
Reviewed Changes
Copilot reviewed 50 out of 80 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/2-browser-apps/05-css-layout/index.mdx | New tutorial teaching CSS layout through building pricing cards, covering width/height, borders, padding, margin, flexbox, and media queries |
| docs/2-browser-apps/05-css-layout/_samples/* | Multiple sample code directories added to demonstrate each concept progressively |
| docs/2-browser-apps/05-css-layout/final-image.png | Screenshot showing the completed pricing card layout |
| docs/2-browser-apps/05-css-arrangement/index.mdx | Previous advanced CSS content removed (box model, position, grid) |
| docs/2-browser-apps/05-css-arrangement/_samples/* | All previous sample code removed |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
docs/2-browser-apps/05-css-layout/_samples/media-query/index.html
Outdated
Show resolved
Hide resolved
docs/2-browser-apps/05-css-layout/_samples/media-query/index.html
Outdated
Show resolved
Hide resolved
|
(メモ) 演習問題と、コードブロックのハイライトの CSS 以外を一旦修正 |
chvmvd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他はわかりやすく正確で非常にいいと思います!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 50 out of 80 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
17f985c to
2554e79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 62 out of 100 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div id="logo">MySite</div> | ||
| <button id="hamburger"> | ||
| <img | ||
| src="https://raw.githubusercontent.com/ut-code/utcode-learn/main/docs/2-browser-apps/05-css-arrangement/hamburger.svg" |
Copilot
AI
Dec 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image source path in the hamburger button references an incorrect directory. The path points to '05-css-arrangement/hamburger.svg' but based on the file structure, it should point to '05-css-layout/hamburger.svg' since the hamburger.svg file is being added to the 05-css-layout directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あ・・
7b743f7 to
d87255a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すみません。操作を誤り、途中でレビューを完了してしまいました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 「CSS」の節の演習問題3はここでの内容と被っているので合わせて削除してもよいかもしれません cf.
## 演習問題3(発展)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
|
|
||
| .plan { | ||
| font-weight: bold; /* フォントを太字にする */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「フォント」という対象に「太字にする」という操作をすることが何をすることを指しているかが少し曖昧なので、「文字の太さを太くする」などの方が曖昧でなくなり少し正確になるかもです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(MTG メモ)「太字にする」にする
chvmvd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
説明がわかりやすくかなり正確で非常に良いと思います!!!
|
|
||
| 現在は3枚のカードが縦に並んでいますが、これを横に並ぶようにすることを考えます。 | ||
|
|
||
| フレックスボックスを使用すると、要素を柔軟にレイアウトすることができます。フレックスボックスを使用してレイアウトするには、`display`プロパティに`flex`を指定します。フレックスボックスでレイアウトされた要素は、デフォルトで横並びになります。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この後に具体例での説明で「次の例では、カードの親要素のdisplayプロパティにflexを指定し、カードが横並びになるようにしています。」との記載はありますが、ここでも「影響を与えたい要素の親要素」などの文言があるとより親切かもです。
| ```html | ||
| <div class="card-header"> | ||
| <div class="plan">Free</div> | ||
| <a href="" class="info">詳細</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
infoよりもdetailの方がより自然な気もします。
| // highlight-end | ||
| ``` | ||
|
|
||
| 次の例では、`justify-content`プロパティを`space-between`に指定することで、プラン名とリンクを水平方向の両端に配置しています。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
初学者だと画像を見ても違いがわからなそうですね 🤔
拡大するかガイド線を入れるかするかなどをすると良いかもしれません。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| ```css | ||
| @media (条件) { | ||
| 条件が真の場合に適用されるスタイル; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
条件が真の場合に適用されるスタイル;の意味が少し曖昧(複数行書けないと解釈ができてしまう)なので、コメントにして/* 条件が真の場合に適用されるスタイル */などにするのはどうでしょう?
|  | ||
|  | ||
|
|
||
| - 画面幅が広い場合は、ナビゲーションメニューが表示されます。 | ||
| - 画面幅が狭い場合は、ナビゲーションメニューの代わりにハンバーガーアイコンが表示されるようにします。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
特にライトモードで見た場合に、2つの画像が存在していることに気づかず、1つの画像であるように思ってしまうため、
画面幅が広い場合は、ナビゲーションメニューが表示されます。

画面幅が狭い場合は、ナビゲーションメニューの代わりにハンバーガーアイコンが表示されるようにします。
などのようにすると良いかもしれません。
もしできれば、動画だとなお良さそうです。
| } | ||
|
|
||
| #logo { | ||
| font-weight: bold; /* フォントを太字にする */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前と同様
| } | ||
|
|
||
| #hamburger { | ||
| display: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
現状だと、ハンバーガーメニューが表示されなさそうな気がします 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
編集する部分が分かりやすいよう整理した際に順番を変えてしまったのが原因でした。 ( feef8c3 で修正)
|
|
||
|  | ||
|
|
||
| <ViewSource url={import.meta.url} path="_samples/justify-content" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
リンク先が存在していなさそうです。
| <ViewSource url={import.meta.url} path="_samples/justify-content" /> | |
| <ViewSource url={import.meta.url} path="_samples/justify-center" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <link rel="stylesheet" href="./style.css" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta要素とlink要素のどちらが上でどちらが下かがものによって変わっていそうです。
utcode-learn/docs/2-browser-apps/05-css-layout/_samples/media-query/index.html
Lines 6 to 7 in d87255a
| <link rel="stylesheet" href="./style.css" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 62 out of 99 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div class="card"> | ||
| <div class="plan">Free</div> | ||
| <div class="price">無料</div> | ||
| <button type="button" class="button">今すぐ始める</button> |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The button elements lack accessible labels. While they have visible text "今すぐ始める", screen readers need context about which plan the button applies to. Consider adding aria-label attributes like aria-label="Free プランで今すぐ始める" to distinguish between the three buttons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この段階で扱うべき内容ではないので削っている
| <div class="plan">Free</div> | ||
| <div class="price">無料</div> |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using generic div elements for semantic content reduces accessibility. The plan name and price should use semantic HTML elements. Consider using heading elements (h2 or h3) for the plan names and appropriate elements for pricing information to improve document structure and screen reader navigation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h2 を使うほうがいいのだろうが、マージンのリセットなどで説明が煩雑になるため断念。今回のユースケースでは div でも許容されそうと判断
| <button id="hamburger"> | ||
| <img | ||
| src="https://raw.githubusercontent.com/ut-code/utcode-learn/main/docs/2-browser-apps/05-css-layout/hamburger.svg" | ||
| alt="メニュー" | ||
| /> | ||
| </button> |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hamburger button's img element has alt text "メニュー" which is good, but the button itself should also have an accessible name. Since the image already provides the accessible name through alt text, this is acceptable. However, consider adding aria-label="メニューを開く" or aria-expanded="false" to make the button's purpose and state clearer for screen reader users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
| <li><a href="">HOME</a></li> | ||
| <li><a href="">ABOUT</a></li> | ||
| <li><a href="">WORKS</a></li> | ||
| <li><a href="">CONTACT</a></li> |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The navigation links have empty href attributes (href=""). This creates non-functional links that may confuse users and accessibility tools. For example pages, consider using href="#" or providing placeholder URLs like href="#home", href="#about", etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# (fragment) のほうがユースケースに合っているのはそうだが、他に説明すべき情報が多いため、非本質の情報として削っている

「CSS による配置」で扱う内容を抜本的に見直し、例題のテーマも実用的なものに変更した
注意点