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
370
君の名は。
2016.12.2 DIST.13 「トクするCSS」 @中野ICTCO
nayu
December 02, 2016
Tweet
Share
More Decks by nayu
See All by nayu
デザイナー女子と 付き合うことについての 心理学的考察
nayucolony
1
2.2k
#しゅきしゅきお冷やCrew
nayucolony
3
270
組み合わせで簡単!WP REST APIとGitHubでつくる、よりよいメディア運営のワークフロー
nayucolony
4
7.5k
ファックス💘入門
nayucolony
1
630
Other Decks in Technology
See All in Technology
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
970
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
180
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
170
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
5
600
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
130
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
AGIについてChatGPTに聞いてみた
blueb
0
130
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Automating Front-end Workflow
addyosmani
1366
200k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Building Your Own Lightsaber
phodgson
103
6.1k
Embracing the Ebb and Flow
colly
84
4.5k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Statistics for Hackers
jakevdp
796
220k
GitHub's CSS Performance
jonrohan
1030
460k
Building Applications with DynamoDB
mza
90
6.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
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Ͱ