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
GRID RANGERS
Search
Fuminori Mori
June 25, 2017
Technology
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GRID RANGERS
2017-06-24開催のMOBILE CONFERENCE 2017 in Kagoshimaで行ったセッション「GRID RANGERS」のスライドです。
Fuminori Mori
June 25, 2017
More Decks by Fuminori Mori
See All by Fuminori Mori
JSを使わなくてもCSSでできるようになったこと
moonglows76
0
2.2k
FLEXBOX-MEN: Apocalypse
moonglows76
4
500
Other Decks in Technology
See All in Technology
5分でわかる Amazon Connect_20260608
hwangbyeonghun
0
170
打造你的 AI 工作流:Agent Skill + MCP 實戰工作坊
appleboy
0
360
作る力から、見極める力へ — AI時代に広がるエンジニアの価値と役割
rince
0
390
開発組織のAI活用レベルを可視化する「エンジニア版AI番付」の取り組み
fuzzy31u
0
100
AWS Blocks を触ってみた/first-tach-aws-blocks
fossamagna
2
110
水を運ぶ人としてのリーダーシップ
izumii19
4
1.2k
『AIに負けない』より『AIと遊ぶ』」〜ワクワクが最強のテスト・QA学習戦略_公開用
odan611
1
340
Text-to-SQLをAgentCoreで実現し、生成されるSQLの精度を定量的に評価する
yakumo
2
380
AIDLC_ヤフーショッピングの取り組み
lycorptech_jp
PRO
0
430
RAGの精度向上とエージェント活用
kintotechdev
2
120
デジタル・デザイン:次の50年を描く「進化する青写真」
y150saya
0
770
AI駆動開発におけるQAエンジニアの役割事例 〜AI駆動開発の現場から〜
kobayashiyorimitsu
0
240
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Tell your own story through comics
letsgokoyo
1
980
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
340
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
360
Building Applications with DynamoDB
mza
96
7.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
270
Ethics towards AI in product and experience design
skipperchong
2
320
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
350
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
230
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Transcript
GRID RANGERS display: grid Ͱ ࣗ༝ͳϨΠΞτΛखʹೖΕΑ͏ʂ @Mobile Conference 2017 in
Kagoshima ίʔσΟϯάσβΠϯɹ ࢙ݑ 1 © Coding Design, 2017
࣍ • ࣗݾհ • GRID RANGERS • ศརϙΠϯτ • CSS
Grid Layout • ཕϙΠϯτ • ·ͱΊ 2 © Coding Design, 2017
ࣗݾհ 3 © Coding Design, 2017
ࣗݾհ(1/3) • ໊લ ɹ࢙ݑ ʢΓɹ;ΈͷΓʣ • ੜ݄ ত516݄9 • ग़ɾݱॅॴ
ࣛࣇౡݝࣛࣇౡࢢ • ༰࢟ ؙϝΨω 4 © Coding Design, 2017
ࣗݾհ(2/3) • WebαΠτ੍࡞ • Webؔ࿈ٕज़ߨࢣ • ௩ֶԂλϥσβΠϯઐֶߍ • Webؔ࿈ॻ੶ࣥච •
HTML5&CSS3ϙέοτϦϑΝϨϯε ʢٕज़ධࣾץʣ • ΠϕϯτӡӦ • ͯ͛Webʢຖ݄݄͋ͨΓʣ 5 © Coding Design, 2017
ࣗݾհ(3/3) • ΧϨʔLOVE!! ⭐ΧϨʔ ঊ #ঊ • ϏʔϧLOVE!! ⭐ࢁ؍ޫϗςϧ #ελτΤʔϧࠇ
• νϣίϨʔτLOVE!! ⭐ύςΟεϦʔϠφΪϜϥ #Ḉຎνϣίνοϓε 6 © Coding Design, 2017
WebͷϨΠΞτ ·͍͠ 7 © Coding Design, 2017
ࡢFLEXBOX͕߈ུ͠ ͨͣͳͷʹ… 8 © Coding Design, 2017
͍͋ͭ·ͩੜ͖͍ͯͨʂ 9 © Coding Design, 2017
10 © Coding Design, 2017
WebͷϨΠΞτͻͱےೄͰ͍͔ͳ͍ʂ ͦ͏ɺ͍͋ͭେո्… Webzilla!! 11 © Coding Design, 2017
GRID RANGERS ʙdisplay: grid Ͱ ͞Βʹࣗ༝ͳϨΠΞτΛ खʹೖΕΑ͏ʂʙ 12 © Coding
Design, 2017
ॿ͚ͯʂ GRID RANGERSʂ 13 © Coding Design, 2017
14 © Coding Design, 2017
ݺΜ͔͍ͩʂ 15 © Coding Design, 2017
Grid LayoutΛͬͯ 16 © Coding Design, 2017
Ұॹʹ߈ུ͠Α͏ 17 © Coding Design, 2017
ͥͬ 18 © Coding Design, 2017
GRID RANGERS ศརϙΠϯτ 19 © Coding Design, 2017
GRID RANGERS > ศརϙΠϯτ Grid LayoutͷศརϙΠϯτ Λݟ͍ͯ͜͏ʂ 20 © Coding
Design, 2017
GRID RANGERS > ศརϙΠϯτ • HTML͕γϯϓϧ • CSS͕γϯϓϧ • ϖʔδશମͷϨΠΞτΛมߋ͍͢͠
• ϒϩοΫΛ͖ͭ͠ΊΔϨΠΞτ͕Ͱ͖Δ 21 © Coding Design, 2017
GRID RANGERS > ศརϙΠϯτ Ͱ͍ํΛݟͯΈΑ͏ʂ 22 © Coding Design, 2017
αϯϓϧΛݟ͍ͨਓ͍·͙͢ԼͷURLʹΞΫηεʂ https:/ /goo.gl/DKX8Z5 23 © Coding Design, 2017
GRID RANGERS CSS Grid Layout 24 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout άϦου(֨ࢠ)ͷઃఆ 25 © Coding
Design, 2017
GRID RANGERS > CSS Grid Layout άϦου(֨ࢠ)ͷઃఆ CSS Grid Layoutཁૉͱࢠཁૉ͕ඞཁͩʂ
<div class="container"> <div class="header">header</div> <div class="main">main</div> <div class="footer">footer</div> </div> 26 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout άϦου(֨ࢠ)ͷઃఆ display: grid; ͰཁૉʹCSS
Grid LayoutΛઃఆ͢Δʂ .container { display: grid; } ͦͯ͠ɺάϦουͷॎ෯ɾԣ෯ͷઃఆͩʂ 27 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout άϦου(֨ࢠ)ͷઃఆ grid-template-columnsͰάϦουͷԣ෯ɺ grid-template-rowsͰάϦουͷॎ෯ΛઃఆͰ͖Δͧʂ .container
{ display: grid; grid-template-columns: 200px 1fr; grid-template-rows: 100px 1fr 200px; } 28 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout άϦου(֨ࢠ)ͷઃఆ fr ৽͍͠୯Ґͩʂ༨ͬͨྖҬΛࢦఆ͢Δͷʹ͑Δͧʂ 1fr
1frͱ͢Ε2ׂɺ1fr 2frͱ͢Ε1/3, 2/3ʹׂͰ͖Δͧʂ .container { display: grid; grid-template-columns: 200px 1fr; grid-template-rows: 100px 1fr 200px; } 29 © Coding Design, 2017
grid-template-columns - CSS | MDN 30 © Coding Design, 2017
FirefoxNightlyΛ͏ͱάϦου͕ݟ͑ͯศརͩͧʂ 31 © Coding Design, 2017
Powerful New Additions to the CSS Grid Inspector in Firefox
Nightly 32 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout ࢠཁૉͷஔ 33 © Coding
Design, 2017
GRID RANGERS > CSS Grid Layout ࢠཁૉͷஔ grid-column ͰԣҐஔɺgrid-row ͰॎҐஔΛ੍ޚͰ͖ΔΘʂ
Ұ൪ͷάϦουͷ۠Γઢ͔Β1,2,3…ͱࢦఆ͢ΔΑʂ .main { grid-column: 2 / 3; /* ࠨ͔Β2൪ͷઢ͔Β3൪ͷઢͷؒ */ grid-row: 2 / 3; /* ্͔Β2൪ͷઢ͔Β3൪ͷઢͷؒ */ } 34 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout ࢠཁૉͷஔ ൣғ͕άϦου1ͭͷͱ͖2ͭΊͷΛলུͰ͖ΔΘΑʂ .main {
grid-column: 2; /* grid-column: 2 / 3; ͱಉ͡ */ grid-row: 2; /* grid-row: 2 / 3; ͱಉ͡ */ } 35 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout ࢠཁૉͷஔ spanΛ͏ͱάϦουͷϚε͕Կݸ͔ΛࢦఆͰ͖ΔΘʂ .main {
grid-column: 2 / span 2; /* grid-column: 2 / 4; ͱಉ͡ */ grid-row: 2 / span 2; /* grid-row: 2 / 4; ͱಉ͡ */ } 36 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout ΤϦΞͷ໋໊ 37 © Coding
Design, 2017
GRID RANGERS > CSS Grid Layout ΤϦΞͷ໋໊ grid-template-areas ͰάϦουʹ໊લΛ͚ͭΒΕͬͪΑʂ .container
{ display: grid; grid-template-columns: 200px 1fr; grid-template-rows: 100px 1fr 200px; grid-template-areas: "header header" "side main" "footer footer"; } 38 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout ΤϦΞͷ໋໊ ࢠཁૉʹ grid-area ͰࢠཁૉͷҐஔΛ໊લͰࢦఆͰ͖ͬͲʂ
.main { grid-area: main; } 39 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout άϦουؒͷ༨ന 40 © Coding
Design, 2017
GRID RANGERS > CSS Grid Layout ࢠཁૉؒͷ༨ന ཁૉʹ grid-column-gap Ͱԣͷ༨നɺ
ɹɹɹɹ grid-row-gap Ͱॎͷ༨നΛઃఆͰ͖Δʂ .container { /* লུ */ grid-column-gap: 20px; grid-row-gap: 30px; } 41 © Coding Design, 2017
GRID RANGERS > CSS Grid Layout ࣗಈஔ 42 © Coding
Design, 2017
GRID RANGERS > CSS Grid Layout ࣗಈஔ grid-auto-flow ͰࢠཁૉΛࣗಈͰஔͰ͖Δʂ
row, column, dense Λ͍Μͤʂ .container { grid-auto-flow: row dense; } 43 © Coding Design, 2017
GRID RANGERS ཕϙΠϯτ 44 © Coding Design, 2017
GRID RANGERS ཕϙΠϯτ ࣮·ͩة͏͍ͱ͜Ζ͕͋ΔCSS Grid Layoutʂ গ͚ͩ͠ൈਮͯ͠Έͨʂ 45 © Coding
Design, 2017
GRID RANGERS > ཕϙΠϯτ ϒϥβαϙʔτ • Can I use -
CSS Grid Layout http:/ /caniuse.com/#feat=css-grid 46 © Coding Design, 2017
47 © Coding Design, 2017
GRID RANGERS > ཕϙΠϯτ ϒϥβαϙʔτ • IE10Ҏ্αϙʔτɻͨͩ͠ɺݹ͍༷ɻ 48 © Coding
Design, 2017
ͨͩ͠ɺݹ͍༷ɻ ※৽͍༷͠ʹରԠதͷΑ͏Ͱ͢ɻ ࢀߟɿ Should I try to use the IE
implementation of CSS Grid Layout? 49 © Coding Design, 2017
50 © Coding Design, 2017
GRID RANGERS > ཕϙΠϯτ ϒϥβαϙʔτ [ݱঢ়] IE10, IE11, EdgeԼهͷΈରԠ •
άϦουͷॎ෯ɾԣ෯ͷઃఆ • ʹΑΔࢠཁૉͷஔ 51 © Coding Design, 2017
GRID RANGERS > ཕϙΠϯτ IEରࡦ • [ରࡦ1] ϓϩύςΟʹ -ms- Λ͚ͭΔ(Autoprefixer!)
• [ରࡦ2] ࣮͕ҟͳΔϓϩύςΟΛखಈͰௐ 52 © Coding Design, 2017
GRID RANGERS > ཕϙΠϯτ > IEରࡦ [ରࡦ1] ϓϩύςΟʹ -ms- Λ͚ͭΔ
(Autoprefixer!) ௐલ .container { display: grid; grid-template-columns: 200px 1fr; grid-template-rows: 100px 1fr 200px; } 53 © Coding Design, 2017
54 © Coding Design, 2017
GRID RANGERS > ཕϙΠϯτ > IEରࡦ [ରࡦ1] ϓϩύςΟʹ -ms- Λ͚ͭΔ(Autoprefixer!)
ௐޙ .container { display: grid; grid-template-columns: 200px 1fr; grid-template-rows: 100px 1fr 200px; -ms-grid-columns: 200px 1fr; -ms-grid-rows: 100px 1fr 200px; } 55 © Coding Design, 2017
56 © Coding Design, 2017
GRID RANGERS > ཕϙΠϯτ > IEରࡦ [ରࡦ2] ࣮͕ҟͳΔϓϩύςΟΛख ಈͰௐ ௐલ
.header { grid-column-start: 1; grid-column-end: 3; grid-row: 1; } 57 © Coding Design, 2017
GRID RANGERS > ཕϙΠϯτ > IEରࡦ [ରࡦ2] ࣮͕ҟͳΔϓϩύςΟΛख ಈͰௐ ௐޙ
.header { -ms-grid-column-start: 1; -ms-grid-column-span: 2; /* IEରࡦ ͍ͭ͘ԣʹͭͳ͛Δ͔ */ -ms-grid-row: 1; } 58 © Coding Design, 2017
59 © Coding Design, 2017
60 © Coding Design, 2017
·ͱΊ 61 © Coding Design, 2017
CSS Grid Layout ϨΠΞτ͢Δͷʹ ͢͝ʔ͘ศརʂ 62 © Coding Design, 2017
ͨͩ͠ɺ ରϒϥβʹҙʂ 63 © Coding Design, 2017
IE10, IE11, Edgeͷ ࣮ͷҧ͍ͷରࡦ͕ ࠷େͷϙΠϯτʂ 64 © Coding Design, 2017
͋͞࠷ޙͷରܾͩʂ WebzillaΛಈ͔ͯ͠ GRID RANGERSͰғ͏ʂ 65 © Coding Design, 2017
66 © Coding Design, 2017
͓ͬͱɺΈΜͳྑ͠ʹ ͳͬͨΈ͍ͨͩʂ WebͷϨΠΞτ͕ ͘͢͠ͳͬͨΜͩʂ 67 © Coding Design, 2017
͋Γ͕ͱ͏!܅ͷ׆༂Ͱ ੈքٹΘΕͨΑʂ 68 © Coding Design, 2017
͜Ε͔ΒCSS Grid LayoutΛͬͯੈքΛ ٹͬͯͶʂ 69 © Coding Design, 2017
͝ਗ਼ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠οοʂ 70 © Coding Design, 2017