Skip to content

Conversation

@nakaterm
Copy link
Contributor

@nakaterm nakaterm commented Oct 25, 2025

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

注意点

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 25, 2025

Deploying utcode-learn with  Cloudflare Pages  Cloudflare Pages

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

View logs

@nakaterm nakaterm force-pushed the rewrite-css-arrangement branch 2 times, most recently from 3f0bd0b to 86bec36 Compare November 1, 2025 12:01
@nakaterm nakaterm force-pushed the rewrite-css-arrangement branch 2 times, most recently from b40ab58 to 4b0f703 Compare November 8, 2025 13:21
@nakaterm nakaterm closed this Nov 8, 2025
@nakaterm nakaterm force-pushed the rewrite-css-arrangement branch from 4b0f703 to cceb0dd Compare November 8, 2025 13:43
@nakaterm nakaterm reopened this Nov 8, 2025
@nakaterm nakaterm marked this pull request as ready for review November 8, 2025 13:52
Copy link
Contributor

@chvmvd chvmvd left a comment

Choose a reason for hiding this comment

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

途中ですが

Copy link

Copilot AI left a 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.

@nakaterm
Copy link
Contributor Author

(メモ) 演習問題と、コードブロックのハイライトの CSS 以外を一旦修正

Copy link
Contributor

@chvmvd chvmvd left a comment

Choose a reason for hiding this comment

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

他はわかりやすく正確で非常にいいと思います!

Copy link

Copilot AI left a 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.

Copy link

Copilot AI left a 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"
Copy link

Copilot AI Dec 14, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

あ・・

@nakaterm nakaterm force-pushed the rewrite-css-arrangement branch from 7b743f7 to d87255a Compare December 14, 2025 13:44
Copy link
Contributor

@chvmvd chvmvd left a comment

Choose a reason for hiding this comment

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

すみません。操作を誤り、途中でレビューを完了してしまいました。

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chvmvd #905 にしました。

}

.plan {
font-weight: bold; /* フォントを太字にする */
Copy link
Contributor

Choose a reason for hiding this comment

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

「フォント」という対象に「太字にする」という操作をすることが何をすることを指しているかが少し曖昧なので、「文字の太さを太くする」などの方が曖昧でなくなり少し正確になるかもです。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(MTG メモ)「太字にする」にする

Copy link
Contributor

@chvmvd chvmvd left a comment

Choose a reason for hiding this comment

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

説明がわかりやすくかなり正確で非常に良いと思います!!!


現在は3枚のカードが縦に並んでいますが、これを横に並ぶようにすることを考えます。

フレックスボックスを使用すると、要素を柔軟にレイアウトすることができます。フレックスボックスを使用してレイアウトするには、`display`プロパティに`flex`を指定します。フレックスボックスでレイアウトされた要素は、デフォルトで横並びになります。
Copy link
Contributor

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>
Copy link
Contributor

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`に指定することで、プラン名とリンクを水平方向の両端に配置しています。
Copy link
Contributor

Choose a reason for hiding this comment

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

初学者だと画像を見ても違いがわからなそうですね 🤔
拡大するかガイド線を入れるかするかなどをすると良いかもしれません。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

確かにどの部分のことを言っているのか分かりにくいですね。拡大した画像にしました。
image


```css
@media (条件) {
条件が真の場合に適用されるスタイル;
Copy link
Contributor

Choose a reason for hiding this comment

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

条件が真の場合に適用されるスタイル;の意味が少し曖昧(複数行書けないと解釈ができてしまう)なので、コメントにして/* 条件が真の場合に適用されるスタイル */などにするのはどうでしょう?

Comment on lines 473 to 477
![ヘッダーの完成形のデスクトップでのイメージ](./responsive-header-desktop.png)
![ヘッダーの完成形のスマートフォンでのイメージ](./responsive-header-mobile.png)

- 画面幅が広い場合は、ナビゲーションメニューが表示されます。
- 画面幅が狭い場合は、ナビゲーションメニューの代わりにハンバーガーアイコンが表示されるようにします。
Copy link
Contributor

Choose a reason for hiding this comment

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

特にライトモードで見た場合に、2つの画像が存在していることに気づかず、1つの画像であるように思ってしまうため、

画面幅が広い場合は、ナビゲーションメニューが表示されます。
![ヘッダーの完成形のデスクトップでのイメージ](./responsive-header-desktop.png)
画面幅が狭い場合は、ナビゲーションメニューの代わりにハンバーガーアイコンが表示されるようにします。
![ヘッダーの完成形のスマートフォンでのイメージ](./responsive-header-mobile.png)

などのようにすると良いかもしれません。

もしできれば、動画だとなお良さそうです。

}

#logo {
font-weight: bold; /* フォントを太字にする */
Copy link
Contributor

Choose a reason for hiding this comment

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

前と同様

}

#hamburger {
display: none;
Copy link
Contributor

Choose a reason for hiding this comment

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

現状だと、ハンバーガーメニューが表示されなさそうな気がします 🤔

Copy link
Contributor Author

@nakaterm nakaterm Dec 22, 2025

Choose a reason for hiding this comment

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

編集する部分が分かりやすいよう整理した際に順番を変えてしまったのが原因でした。 ( feef8c3 で修正)


![親要素にjustify-content: center;を設定したカード](./justify-center-cards.png)

<ViewSource url={import.meta.url} path="_samples/justify-content" />
Copy link
Contributor

Choose a reason for hiding this comment

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

リンク先が存在していなさそうです。

Suggested change
<ViewSource url={import.meta.url} path="_samples/justify-content" />
<ViewSource url={import.meta.url} path="_samples/justify-center" />

Comment on lines 487 to 488
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./style.css" />
Copy link
Contributor

Choose a reason for hiding this comment

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

meta要素とlink要素のどちらが上でどちらが下かがものによって変わっていそうです。

<link rel="stylesheet" href="./style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

Copy link

Copilot AI left a 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>
Copy link

Copilot AI Dec 22, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

この段階で扱うべき内容ではないので削っている

Comment on lines +11 to +12
<div class="plan">Free</div>
<div class="price">無料</div>
Copy link

Copilot AI Dec 22, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

h2 を使うほうがいいのだろうが、マージンのリセットなどで説明が煩雑になるため断念。今回のユースケースでは div でも許容されそうと判断

Comment on lines +13 to +18
<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>
Copy link

Copilot AI Dec 22, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

同上

Comment on lines +21 to +24
<li><a href="">HOME</a></li>
<li><a href="">ABOUT</a></li>
<li><a href="">WORKS</a></li>
<li><a href="">CONTACT</a></li>
Copy link

Copilot AI Dec 22, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

@nakaterm nakaterm Dec 22, 2025

Choose a reason for hiding this comment

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

# (fragment) のほうがユースケースに合っているのはそうだが、他に説明すべき情報が多いため、非本質の情報として削っている

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.

3 participants