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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Fuminori Mori
June 25, 2017
Technology
0
220
GRID RANGERS
2017-06-24開催のMOBILE CONFERENCE 2017 in Kagoshimaで行ったセッション「GRID RANGERS」のスライドです。
Fuminori Mori
June 25, 2017
Tweet
Share
More Decks by Fuminori Mori
See All by Fuminori Mori
JSを使わなくてもCSSでできるようになったこと
moonglows76
0
2.2k
FLEXBOX-MEN: Apocalypse
moonglows76
4
490
Other Decks in Technology
See All in Technology
Context Engineeringの取り組み
nutslove
0
340
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
230
セキュリティについて学ぶ会 / 2026 01 25 Takamatsu WordPress Meetup
rocketmartue
1
300
Digitization部 紹介資料
sansan33
PRO
1
6.8k
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
660
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.3k
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
640
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
180
Docker and Python
trallard
47
3.7k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
290
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
Claude Code のすすめ
schroneko
67
210k
How to Ace a Technical Interview
jacobian
281
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
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