Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@
## 2024-07-10 - prefers-reduced-motion ์ง€์› ์ถ”๊ฐ€
**Learning:** ์‹œ์Šคํ…œ ๋ ˆ๋ฒจ์—์„œ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ค„์ด๊ธฐ(prefers-reduced-motion)๋ฅผ ์„ค์ •ํ•œ ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•ด ๊ณผ๋„ํ•œ ์• ๋‹ˆ๋ฉ”์ด์…˜๊ณผ ๋ถ€๋“œ๋Ÿฌ์šด ์Šคํฌ๋กค์„ ๋น„ํ™œ์„ฑํ™”ํ•˜๋Š” ๊ฒƒ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ์ด๋•Œ `0s` ๋Œ€์‹  `0.01ms`๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ `transitionend`์™€ ๊ฐ™์€ ๋ธŒ๋ผ์šฐ์ € ์ด๋ฒคํŠธ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ๋ฐœ์ƒํ•˜๋„๋ก ํ•ด์•ผ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์ฝœ๋ฐฑ์ด ๋ฉˆ์ถ”๋Š”(hanging) ๋ฌธ์ œ๋ฅผ ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
**Action:** ํ•ญ์ƒ `styles.css` ํ•˜๋‹จ์— `prefers-reduced-motion: reduce` ๋ฏธ๋””์–ด ์ฟผ๋ฆฌ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ๋ชจ๋“  ์š”์†Œ์˜ `animation-duration`๊ณผ `transition-duration`์„ `0.01ms`๋กœ ์„ค์ •ํ•˜๊ณ  `scroll-behavior: auto`๋ฅผ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.

## 2026-08-02 - ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ์‹œ๊ฐ์ (์ด‰๊ฐ์ ) ํ”ผ๋“œ๋ฐฑ ์ œ๊ณต
**Learning:** ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ์š”์†Œ(๋ฒ„ํŠผ, ์–ธ์–ด ์ „ํ™˜๊ธฐ ๋“ฑ)๋ฅผ ํด๋ฆญํ•  ๋•Œ ์ƒํƒœ ๋ณ€ํ™”(active state)๊ฐ€ ์—†์œผ๋ฉด ์‚ฌ์šฉ์ž๊ฐ€ ํด๋ฆญ์ด ์„ฑ๊ณต์ ์œผ๋กœ ์ž…๋ ฅ๋˜์—ˆ๋Š”์ง€ ์ง๊ด€์ ์œผ๋กœ ์ธ์ง€ํ•˜๊ธฐ ์–ด๋ ต์Šต๋‹ˆ๋‹ค.
**Action:** ์‚ฌ์šฉ์ž์™€ ์ƒํ˜ธ์ž‘์šฉํ•˜๋Š” ๋ฒ„ํŠผ์ด๋‚˜ ๋งํฌ ์š”์†Œ์—๋Š” `:active` ๊ฐ€์ƒ ํด๋ž˜์Šค๋ฅผ ํ™œ์šฉํ•ด `transform: scale(...)`๊ณผ ๊ฐ™์€ ๋ฏธ์„ธํ•˜๊ณ  ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ์ถ•์†Œ๋˜๋Š” ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ์ ์šฉํ•˜์—ฌ ํ™•์‹คํ•œ ์ด‰๊ฐ์ /์‹œ๊ฐ์  ํ”ผ๋“œ๋ฐฑ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CHANGELOG

## [Unreleased]
- **UX/์ ‘๊ทผ์„ฑ ๊ฐœ์„ **: ๋ฒ„ํŠผ(`.button`) ๋ฐ ์–ธ์–ด ์ „ํ™˜ ๋ฒ„ํŠผ(`.language-switch button`) ํด๋ฆญ ์‹œ ๋ฏธ์„ธํ•˜๊ฒŒ ์ถ•์†Œ๋˜๋Š” ์‹œ๊ฐ์  ํ”ผ๋“œ๋ฐฑ(`:active` ์ƒํƒœ)์„ ์ถ”๊ฐ€ํ•˜์—ฌ ์ธํ„ฐ๋ž™์…˜์˜ ์ง๊ด€์„ฑ์„ ๋†’์˜€์Šต๋‹ˆ๋‹ค.
- **๋ณด์•ˆ ๊ฐœ์„ **: ์ปดํฌ๋„ŒํŠธ ๊ฐค๋Ÿฌ๋ฆฌ์˜ ์ธ๋ผ์ธ ์Šคํฌ๋ฆฝํŠธ์™€ ์Šคํƒ€์ผ์„ ์™ธ๋ถ€ ํŒŒ์ผ๋กœ ๋ถ„๋ฆฌํ•˜๊ณ , ์—„๊ฒฉํ•œ Content-Security-Policy๋ฅผ ์ ์šฉํ•ด XSS ๋ฐฉ์–ด๋ฅผ ๊ฐ•ํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค.
- **์„ฑ๋Šฅ ํšŒ๊ท€ ๋ณต์›**: ์˜คํ”„์Šคํฌ๋ฆฐ `.section` ๋ Œ๋”๋ง์„ `content-visibility: auto`๋กœ ์ง€์—ฐํ•˜๊ณ , ์ผ๋ฐ˜ ์„น์…˜์€ 600pxยท์ฝ˜ํ…์ธ ๊ฐ€ ํฐ DIKW/projects ์„น์…˜์€ 1000px์˜ `contain-intrinsic-size` placeholder๋ฅผ ์œ ์ง€ํ•ด ์ดˆ๊ธฐ ๋ Œ๋”๋ง ๋น„์šฉ๊ณผ ์Šคํฌ๋กค๋ฐ” ์ด๋™์„ ํ•จ๊ป˜ ์ค„์˜€์Šต๋‹ˆ๋‹ค.
- **๋ณด์•ˆ ๊ฐœ์„ **: Trusted Types ๊ธฐ๋ฐ˜ CSP ๊ฐ•ํ™”: ์ž ์žฌ์ ์ธ DOM ๊ธฐ๋ฐ˜ XSS ๊ณต๊ฒฉ์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด `require-trusted-types-for 'script'` ์ง€์‹œ์–ด ์ถ”๊ฐ€
Expand Down
12 changes: 10 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ a {
font-size: 13px;
font-weight: 850;
cursor: pointer;
transition: opacity 0.2s;
transition: opacity 0.2s, transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-switch button:active {
transform: scale(0.96);
}

.language-switch button:not([aria-pressed="true"]):hover {
Expand Down Expand Up @@ -218,7 +222,11 @@ h1 {
text-decoration: none;
font-size: 15px;
font-weight: 800;
transition: opacity 0.2s;
transition: opacity 0.2s, transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.button:active {
transform: scale(0.96);
}

.button:hover {
Expand Down
13 changes: 13 additions & 0 deletions tests/test_ux_styles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Regression tests for UX-focused CSS styles."""

import re
from pathlib import Path

STYLES = Path(__file__).resolve().parents[1] / "styles.css"

def test_buttons_have_active_state_for_tactile_feedback():
"""Ensure buttons provide tactile feedback on click."""
css = STYLES.read_text(encoding="utf-8")
assert ".button:active" in css
assert ".language-switch button:active" in css
assert "transform: scale(0.96);" in css
Loading