Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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.4k
#しゅきしゅきお冷やCrew
nayucolony
3
300
組み合わせで簡単!WP REST APIとGitHubでつくる、よりよいメディア運営のワークフロー
nayucolony
4
8.1k
ファックス💘入門
nayucolony
1
660
Other Decks in Technology
See All in Technology
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
ブロックテーマとこれからの WordPress サイト制作 / Toyama WordPress Meetup Vol.81
torounit
0
340
なぜフロントエンド技術を追うのか?なぜカンファレンスに参加するのか?
sakito
9
2k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
9.9k
原理から解き明かす AIと人間の成長 - Progate BAR
teba_eleven
2
300
手動から自動へ、そしてその先へ
moritamasami
0
230
How native lazy objects will change Doctrine and Symfony forever
beberlei
1
390
Introduction to Bill One Development Engineer
sansan33
PRO
0
330
Noを伝える技術2025: 爆速合意形成のためのNICOフレームワーク速習 #pmconf2025
aki_iinuma
2
1.5k
useEffectってなんで非推奨みたいなこと言われてるの?
maguroalternative
9
6.3k
セキュリティAIエージェントの現在と未来 / PSS #2 Takumi Session
flatt_security
3
1.4k
“決まらない”NSM設計への処方箋 〜ビットキーにおける現実的な指標デザイン事例〜 / A Prescription for "Stuck" NSM Design: Bitkey’s Practical Case Study
bitkey
PRO
1
420
Featured
See All Featured
The Invisible Side of Design
smashingmag
302
51k
A designer walks into a library…
pauljervisheath
210
24k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
700
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Music & Morning Musume
bryan
46
7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Documentation Writing (for coders)
carmenintech
76
5.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
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Ͱ