Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
君の名は。
Search
nayu
December 02, 2016
Technology
2
380
君の名は。
2016.12.2 DIST.13 「トクするCSS」 @中野ICTCO
nayu
December 02, 2016
Tweet
Share
More Decks by nayu
See All by nayu
デザイナー女子と 付き合うことについての 心理学的考察
nayucolony
1
2.3k
#しゅきしゅきお冷やCrew
nayucolony
3
300
組み合わせで簡単!WP REST APIとGitHubでつくる、よりよいメディア運営のワークフロー
nayucolony
4
8k
ファックス💘入門
nayucolony
1
660
Other Decks in Technology
See All in Technology
スタートアップにおけるこれからの「データ整備」
shomaekawa
2
350
ユーザーの声とAI検証で進める、プロダクトディスカバリー
sansantech
PRO
1
120
AWS Top Engineer、浮いてませんか? / As an AWS Top Engineer, Are You Out of Place?
yuj1osm
2
210
綺麗なデータマートをつくろう_データ整備を前向きに考える会 / Let's create clean data mart
brainpadpr
3
370
「使い方教えて」「事例教えて」じゃもう遅い! Microsoft 365 Copilot を触り倒そう!
taichinakamura
0
310
社内報はAIにやらせよう / Let AI handle the company newsletter
saka2jp
8
1.3k
Reflections of AI: A Trilogy in Four Parts (GOTO; Copenhagen 2025)
ondfisk
0
110
速習AGENTS.md:5分で精度を上げる "3ブロック" テンプレ
ismk
0
320
成長自己責任時代のあるきかた/How to navigate the era of personal responsibility for growth
kwappa
4
300
カンファレンスに託児サポートがあるということ / Having Childcare Support at Conferences
nobu09
1
520
AIツールでどこまでデザインを忠実に実装できるのか
oikon48
6
3.2k
KMP の Swift export
kokihirokawa
0
350
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
470k
How to train your dragon (web standard)
notwaldorf
96
6.3k
Why Our Code Smells
bkeepers
PRO
339
57k
What's in a price? How to price your products and services
michaelherold
246
12k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Context Engineering - Making Every Token Count
addyosmani
5
220
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
It's Worth the Effort
3n
187
28k
Become a Pro
speakerdeck
PRO
29
5.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
For a Future-Friendly Web
brad_frost
180
9.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Transcript
ɻ ܅ ͷ ໊ ɻ DIST.13 @nayucolony
φϢ @nayucolony גࣜձࣾτΡʔΞʔϧ ϑϩϯτΤϯυΤϯδχΞ
ཪλΠτϧ ʮ܅ͷ໊ɻʯʹֶͿCSSઃܭ ࡞தͰʮ໊લ͕Θ͔Βͳͯ͘࠶ձͰ͖ͨʯ ‑ CSSʹ໊͓͍ͯલʹґଘ͗͢͠ͳ͍ɺ ݁ͼ͖ͭʹॏ͖Λஔ͍ͨղܾΛߟ͑Δɻ
༰ ࣗͳΓͷϚʔΫΞοϓͷखॱΛհ
ઃܭख๏ RSCSSΛ༻͍ͨ ίϯϙʔωϯτͰߟ͑ΔϚʔΫΞοϓ
RSCSSͷ̏ཁૉ
RSCSSͷ̏ཁૉ ػೳͰ۠ͬͯߟ͑Δ Component
RSCSSͷ̏ཁૉ ػೳͰ۠ͬͯߟ͑Δ Component Componentͷߏཁૉ Element
RSCSSͷ̏ཁૉ ػೳͰ۠ͬͯߟ͑Δ Component Componentͷߏཁૉ Element ݟͨҧ͍Λද͢ Variant
RSCSS̏ཁૉͷنଇ 1. ʮComponentʯ=>ӳ୯ޠ̎ͭΛ - Ͱܨ͙ (ex) .two-words 2. ʮElementʯ=>̍୯ޠͰද͢ (ex)
.element , elementparts 3. ʮVariantʯ=> ʮ - ʯΛ಄ʹ͚ͭΔ (ex) .-small , -reverse
ͦͷଞϧʔϧ • ͑Δͷ͔ͳΒͣࢠηϨΫλʮʼʯΛ͏ • ཁૉηϨΫλΛ༻ͤͣશͯʹclassΛ͚Δ
ηϚϯςΟΫεແࢹ͠·͢ ʢclassͰӡ༻͢Δ͜ͱʹͯ͠΄͍͠ʣ ʢઆ໌͕࣌ؒΓͳ͍ʣ ʢࢲ͕ͦͦΑ͘Θ͔ͬͯͳ͍ʣ
None
ηΫγϣϯ͝ͱʹΘ͚Δ
ࠓճϔομʔ͔ΒΓ·͢ɻ ʢ͙͢ऴΘΓͦ͏ͳͷ͔ΒΔʣ
ػೳ͝ͱʹݟΔ ϔομʔ
ػೳ͝ͱʹݟΔ ϔομʔ
ͦΕͧΕΛߟ͑Δ ϔομʔ
ϩΰ ୯ޠ̎ͭΛ - Ͱͭͳ͙ ୯ޠ̍ͭ
ϩΰ ࢠηϨΫλΛ͏
φϏήʔγϣϯ
φϏήʔγϣϯ
$44 φϏήʔγϣϯ
ϨΠΞτ࡞ۀ
.logo .navi Componentʹ Elementͱͯ͠ͷclassΛ༩
.logo .navi
DONE
DONE
هࣄComponent
None
None
DONE DONE
DONE DONE
هࣄϦετComponent
هࣄΧʔυComponentͷ ू߹ମ
هࣄΧʔυComponent
None
None
.item .item .item .item Componentʹ Elementͱͯ͠ͷclassΛ༩
.item .item .item .item Componentʹ Elementͱͯ͠ͷclassΛ༩
DONE DONE DONE
DONE DONE DONE
ϑολʔ
ϑολʔ
άϩʔόϧφϏComponent
ϔομʔͷφϏήʔγϣϯͷݟͨҧ͍ άϩʔόϧφϏComponent
Variant
VariantԼʹ্ॻ͖ελΠϧΛهड़
.navi
.navi
DONE DONE DONE DONE
None
.header .main .aside .footer
.header .main .aside .footer
DONE
·ͱΊ • RSCSS໊͕͍̍ͭ̍ͭલͰ͔͚ͯεοΩϦ • ػೳ୯ҐͰߟ͑Δͱίϯϙʔωϯτ͔Γ͍͢ • ʮίϯϙʔωϯτΛ࡞Δʯͱ ʮίϯϙʔωϯτΛஔ͢ΔʯͱͰ͚ͯߟ͑Δ
͔͑ͨͬͨ͜ͱ • ໋໊نଇ͕શͯͰͳ͍ • ཁૉಉ࢜ͷϜεϏΛߟ͑Δ͜ͱେࣄ • ͍ࢹͰCSSઃܭΛʹ͚͍͖ͯ·͠ΐ͏
ࡢQiitaॻ͖·ͨ͠ɻ ͬͱΓ͍ͨਓ༻ ࠙͘͠ձtwitterͰ