<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[212636] trunk/Websites/webkit.org</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/212636">212636</a></dd>
<dt>Author</dt> <dd>rego@igalia.com</dd>
<dt>Date</dt> <dd>2017-02-20 07:30:24 -0800 (Mon, 20 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, add CSS Grid Layout examples for a blog post.

* demos/css-grid/index.html: Added.
* demos/css-grid/responsive-grid.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebsiteswebkitorgChangeLog">trunk/Websites/webkit.org/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/Websites/webkit.org/demos/css-grid/</li>
<li><a href="#trunkWebsiteswebkitorgdemoscssgridindexhtml">trunk/Websites/webkit.org/demos/css-grid/index.html</a></li>
<li><a href="#trunkWebsiteswebkitorgdemoscssgridresponsivegridhtml">trunk/Websites/webkit.org/demos/css-grid/responsive-grid.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebsiteswebkitorgChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Websites/webkit.org/ChangeLog (212635 => 212636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/ChangeLog        2017-02-20 13:46:44 UTC (rev 212635)
+++ trunk/Websites/webkit.org/ChangeLog        2017-02-20 15:30:24 UTC (rev 212636)
</span><span class="lines">@@ -1,3 +1,10 @@
</span><ins>+2017-02-20  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
+
+        Unreviewed, add CSS Grid Layout examples for a blog post.
+
+        * demos/css-grid/index.html: Added.
+        * demos/css-grid/responsive-grid.html: Added.
+
</ins><span class="cx"> 2017-02-06  Jon Davis  &lt;jond@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a survey to learn how people use WebKit Nightly builds
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgdemoscssgridindexhtml"></a>
<div class="addfile"><h4>Added: trunk/Websites/webkit.org/demos/css-grid/index.html (0 => 212636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/demos/css-grid/index.html                                (rev 0)
+++ trunk/Websites/webkit.org/demos/css-grid/index.html        2017-02-20 15:30:24 UTC (rev 212636)
</span><span class="lines">@@ -0,0 +1,182 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;title&gt;CSS Grid Layout Examples&lt;/title&gt;
+&lt;style&gt;
+    .grid {
+        display: inline-grid;
+        border: 0.1em solid;
+        border-radius: 0.2em;
+        font-size: 2em;
+    }
+
+    .grid &gt; div {
+        margin: 0.05em;
+        border-width: 0.1em;
+        border-style: solid;
+        border-radius: 0.2em;
+        padding: 0.5em;
+        font-family: monospace;
+    }
+
+    .item-1 {
+        background-color: rgba(242, 46, 138, 0.8);
+        border-color: rgb(242, 46, 138);
+    }
+
+    .item-2 {
+        background-color: rgba(98, 205, 217, 0.8);
+        border-color: rgb(98, 205, 217);
+    }
+
+    .item-3 {
+        background-color: rgba(117, 191, 6 , 0.8);
+        border-color: rgb(117, 191, 6);
+    }
+
+    .item-4 {
+        background-color: rgba(242, 226, 5, 0.8);
+        border-color: rgb(242, 226, 5);
+    }
+
+    .item-5 {
+        background-color: rgba(242, 54, 12, 0.8);
+        border-color: rgb(242, 54, 12);
+    }
+
+    .item-6 {
+        background-color: rgba(166, 0, 62, 0.8);
+        border-color: rgb(166, 0, 62);
+    }
+
+    .bold {
+        font-weight: bold;
+    }
+
+    .small {
+        font-size: 50%;
+    }
+
+    .medium {
+        font-size: 75%;
+    }
+
+    .big {
+        font-size: 150%;
+    }
+
+
+    iframe {
+        width: 800px;
+        height: 600px;
+        animation: resize 8s infinite alternate;
+    }
+
+    @keyframes resize {
+        to { width: 400px; }
+    }
+&lt;/style&gt;
+
+&lt;h1&gt;CSS Grid Layout Examples&lt;/h1&gt;
+
+&lt;h2&gt;Grid Definition&lt;/h2&gt;
+
+&lt;pre&gt;
+    display: grid;
+    grid-template-rows: 100px 100px;
+    grid-template-columns: 400px 200px 100px;
+&lt;/pre&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template-rows: 100px 100px; grid-template-columns: 400px 200px 100px;&quot;&gt;
+    &lt;div class=&quot;item-1 big&quot;&gt;A&lt;/div&gt;
+    &lt;div class=&quot;item-2 big&quot;&gt;B&lt;/div&gt;
+    &lt;div class=&quot;item-3 big&quot;&gt;C&lt;/div&gt;
+    &lt;div class=&quot;item-4 big&quot;&gt;D&lt;/div&gt;
+    &lt;div class=&quot;item-5 big&quot;&gt;E&lt;/div&gt;
+    &lt;div class=&quot;item-6 big&quot;&gt;F&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h2&gt;Grid Areas&lt;/h2&gt;
+
+&lt;pre&gt;
+    display: grid;
+    grid-template-areas: &quot;header  header&quot;
+                         &quot;sidebar main  &quot;
+                         &quot;sidebar footer&quot;;
+&lt;/pre&gt;
+
+&lt;div class=&quot;grid&quot; style='grid-template-areas: &quot;header  header&quot;
+                                              &quot;sidebar main  &quot;
+                                              &quot;sidebar footer&quot;;'&gt;
+    &lt;div class=&quot;item-1&quot; style=&quot;grid-area: header;&quot;&gt;header&lt;/div&gt;
+    &lt;div class=&quot;item-2&quot; style=&quot;grid-area: sidebar;&quot;&gt;sidebar&lt;/div&gt;
+    &lt;div class=&quot;item-3&quot; style=&quot;grid-area: main;&quot;&gt;main&lt;/div&gt;
+    &lt;div class=&quot;item-4&quot; style=&quot;grid-area: footer;&quot;&gt;footer&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h2&gt;Item Placement&lt;/h2&gt;
+
+&lt;pre&gt;
+    display: grid;
+    grid: repeat(4, 100px) / repeat(4, 150px);
+&lt;/pre&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid: repeat(4, 100px) / repeat(4, 150px);&quot;&gt;
+    &lt;div class=&quot;item-1 small&quot; style=&quot;grid-row: 3; grid-column: 2;&quot;&gt;grid-row: 3;&lt;br&gt;&lt;br&gt;grid-column: 2;&lt;/div&gt;
+    &lt;div class=&quot;item-2 medium&quot; style=&quot;grid-row: 2 / 5; grid-column: 3 / span 2;&quot;&gt;grid-row: 2 / 5;&lt;br&gt;&lt;br&gt;grid-column:&lt;br&gt;3 / span 2;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h2&gt;Alignment&lt;/h2&gt;
+
+&lt;h3&gt;Grid Tracks Alignment&lt;/h3&gt;
+
+&lt;pre&gt;
+    display: grid;
+    grid: 100px 100px / 150px 150px 150px;
+    height: 500px;
+    width: 650px;
+    align-content: center;
+    justify-content: space-evenly;
+&lt;/pre&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid: 100px 100px / 150px 150px 150px; height: 500px; width: 650px; align-content: center; justify-content: space-evenly;&quot;&gt;
+    &lt;div class=&quot;item-1 small&quot; style=&quot;grid-row: 1; grid-column: 1  / 3;&quot;&gt;grid-row: 1;&lt;br&gt;&lt;br&gt;grid-column: 1 / 3;&lt;/div&gt;
+    &lt;div class=&quot;item-2 small&quot; style=&quot;grid-row: 1 / 3; grid-column: 3;&quot;&gt;grid-row: 1 / 3;&lt;br&gt;&lt;br&gt;grid-column: 3;&lt;/div&gt;
+    &lt;div class=&quot;item-3 small&quot; style=&quot;grid-row: 2; grid-column: 1;&quot;&gt;grid-row: 2;&lt;br&gt;&lt;br&gt;grid-column: 1;&lt;/div&gt;
+    &lt;div class=&quot;item-4 small&quot; style=&quot;grid-row: 2; grid-column: 2;&quot;&gt;grid-row: 2;&lt;br&gt;&lt;br&gt;grid-column: 2;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h3&gt;Grid Items Alignment&lt;/h3&gt;
+
+&lt;pre&gt;
+    display: grid;
+    grid: 200px 200px / 400px 400px;
+&lt;/pre&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid: 200px 200px / 400px 400px;&quot;&gt;
+    &lt;div class=&quot;item-1 medium&quot; style=&quot;align-self: stretch; justify-self: stretch;&quot;&gt;align-self: stretch;&lt;br&gt;&lt;br&gt;justify-self: stretch;&lt;/div&gt;
+    &lt;div class=&quot;item-2 medium&quot; style=&quot;align-self: end; justify-self: start;&quot;&gt;align-self: end;&lt;br&gt;&lt;br&gt;justify-self: start;&lt;/div&gt;
+    &lt;div class=&quot;item-3 medium&quot; style=&quot;grid-column: span 2; align-self: center; justify-self: center;&quot;&gt;grid-column: span 2;&lt;br&gt;&lt;br&gt;align-self: center;&lt;br&gt;&lt;br&gt;justify-self: center;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h2&gt;Responsive Design&lt;/h2&gt;
+
+&lt;pre&gt;
+    display: grid;
+    grid-gap: 10px 20px;
+    grid-template-rows: 100px 1fr auto;
+    grid-template-columns: 1fr 200px;
+    grid-template-areas: &quot;title   title&quot;
+                         &quot;content aside&quot;
+                         &quot;footer  aside&quot;;
+
+    @media (max-width: 600px) {
+        grid-gap: 0;
+        grid-template-rows: auto 1fr auto auto;
+        grid-template-columns: 1fr;
+        grid-template-areas: &quot;title  &quot;
+                             &quot;content&quot;
+                             &quot;aside  &quot;
+                             &quot;footer &quot;;
+    }
+&lt;/pre&gt;
+
+&lt;iframe src=&quot;responsive-grid.html&quot;&gt;&lt;/iframe&gt;
</ins></span></pre></div>
<a id="trunkWebsiteswebkitorgdemoscssgridresponsivegridhtml"></a>
<div class="addfile"><h4>Added: trunk/Websites/webkit.org/demos/css-grid/responsive-grid.html (0 => 212636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/demos/css-grid/responsive-grid.html                                (rev 0)
+++ trunk/Websites/webkit.org/demos/css-grid/responsive-grid.html        2017-02-20 15:30:24 UTC (rev 212636)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;title&gt;CSS Grid Layout Examples&lt;/title&gt;
+&lt;style&gt;
+    .grid {
+        display: inline-grid;
+        border: 0.1em solid;
+        border-radius: 0.2em;
+        font-size: 2em;
+    }
+
+    .grid &gt; div {
+        margin: 0.05em;
+        border-width: 0.1em;
+        border-style: solid;
+        border-radius: 0.2em;
+        padding: 0.5em;
+        font-family: monospace;
+    }
+
+    .item-1 {
+        background-color: rgba(242, 46, 138, 0.8);
+        border-color: rgb(242, 46, 138);
+    }
+
+    .item-2 {
+        background-color: rgba(98, 205, 217, 0.8);
+        border-color: rgb(98, 205, 217);
+    }
+
+    .item-3 {
+        background-color: rgba(117, 191, 6 , 0.8);
+        border-color: rgb(117, 191, 6);
+    }
+
+    .item-4 {
+        background-color: rgba(242, 226, 5, 0.8);
+        border-color: rgb(242, 226, 5);
+    }
+
+    html, body {
+        height: 100%;
+        padding: 0;
+        margin: 0;
+    }
+
+    .responsive {
+        display: grid;
+        height: 100%;
+        box-sizing: border-box;
+        grid-gap: 10px 20px;
+        grid-template-rows: 100px 1fr auto;
+        grid-template-columns: 1fr 200px;
+        grid-template-areas: &quot;title   title&quot;
+                             &quot;content aside&quot;
+                             &quot;footer  aside&quot;;
+    }
+
+    .title {
+        grid-area: title;
+    }
+
+    .content {
+        grid-area: content;
+    }
+
+    .aside {
+        grid-area: aside;
+    }
+
+    .footer {
+        grid-area: footer;
+    }
+
+    @media (max-width: 600px) {
+        .responsive {
+            grid-gap: 0;
+            grid-template-rows: auto 1fr auto auto;
+            grid-template-columns: 1fr;
+            grid-template-areas: &quot;title  &quot;
+                                 &quot;content&quot;
+                                 &quot;aside  &quot;
+                                 &quot;footer &quot;;
+        }
+    }
+&lt;/style&gt;
+
+&lt;div class=&quot;grid responsive&quot;&gt;
+    &lt;div class=&quot;item-1 title&quot;&gt;Title&lt;/div&gt;
+    &lt;div class=&quot;item-2 content&quot;&gt;Content&lt;/div&gt;
+    &lt;div class=&quot;item-3 aside&quot;&gt;Aside&lt;/div&gt;
+    &lt;div class=&quot;item-4 footer&quot;&gt;Footer&lt;/div&gt;
+&lt;/div&gt;
</ins></span></pre>
</div>
</div>

</body>
</html>