diff options
author | Peter Bengtsson <mail@peterbe.com> | 2021-07-15 13:41:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 13:41:58 -0400 |
commit | d79f316e1c617b165487da0198765d992cce2fff (patch) | |
tree | ec105b9d0e2e6246e2e7b85f5b7f8efd7b08c110 /files/pl/web/css | |
parent | 3d809d2737f9b0fe0ef0f3d26c8c785d9d95cd09 (diff) | |
download | translated-content-d79f316e1c617b165487da0198765d992cce2fff.tar.gz translated-content-d79f316e1c617b165487da0198765d992cce2fff.tar.bz2 translated-content-d79f316e1c617b165487da0198765d992cce2fff.zip |
delete pages that were never translated from en-US (pl, part 2) (#1551)
Diffstat (limited to 'files/pl/web/css')
-rw-r--r-- | files/pl/web/css/css_grid_layout/realizing_common_layouts_using_css_grid_layout/index.html | 595 |
1 files changed, 0 insertions, 595 deletions
diff --git a/files/pl/web/css/css_grid_layout/realizing_common_layouts_using_css_grid_layout/index.html b/files/pl/web/css/css_grid_layout/realizing_common_layouts_using_css_grid_layout/index.html deleted file mode 100644 index 5013e75f11..0000000000 --- a/files/pl/web/css/css_grid_layout/realizing_common_layouts_using_css_grid_layout/index.html +++ /dev/null @@ -1,595 +0,0 @@ ---- -title: Projektowanie typowych układów za pomocą układu siatki CSS -slug: Web/CSS/CSS_Grid_Layout/Realizing_common_layouts_using_CSS_Grid_Layout -translation_of: Web/CSS/CSS_Grid_Layout/Realizing_common_layouts_using_CSS_Grid_Layout -original_slug: >- - Web/CSS/CSS_Grid_Layout/Realizacja_typowych_ukladow_za_pomoca_ukladu_siatki_CSS ---- -<p>Na zakończenie tego zestawu poradników do Układów Siatki CSS (ang. CSS Grid Layout), przejdę przez kilka różnych układów, demonstrujących niektóre z technik, których można użyć podczas projektowania z użyciem tej technologii. Przyjrzymy się przykładowi, korzystającemu z wartości <a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas">grid-template-areas</a>, typowemu 12-kolumnowemu systemowi elastycznej siatki, a także wykazowi produktów stworzonemu za pomocą automatycznego rozmieszczania. Jak wynika z wyżej przedstawionych przykładów, często istnieje więcej niż jeden sposób, aby osiągnąć pożądany efekt z układem siatki. Wybierz tę metodę, która jest najbardziej pomocna w rozwiązaniu problemów przed którymi stoisz i dla projektów, które realizujesz.</p> - -<h2 id="Responsywny_układ_strony_korzystający_z_1_do_3_kolumn_o_zmiennej_pozycji_elementów_przy_użyciu_grid-template-areas">Responsywny układ strony korzystający z 1 do 3 kolumn o zmiennej pozycji elementów przy użyciu <code>grid-template-areas</code></h2> - -<p>Znacząca część stron internetowych jest odmianą tego typu układu; zawierającego treść, panele boczne, nagłówek oraz stopkę. Podczas projektowania responsywnej witryny, możesz zechcieć wyświetlić stronę w układzie pojedynczej kolumny dla małych ekranów, dla wyświetlacza o wartości granicznej dodać panel boczny, a dla najszerszych ekranów wprowadzić układ w trzech kolumnach.</p> - -<p><img alt="Image of the three different layouts created by redefining our grid at two breakpoints." src="https://mdn.mozillademos.org/files/14749/11-responsive-areas.png"></p> - -<p>Zamierzam stworzyć taki układ korzystając z <em>nazwanych pól szablonu, </em>o których możecie dowiedzieć się więcej z kursu <em><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas">Grid template areas</a></em>.</p> - -<p>Mój szkielet składa się z pojemnika zawierającego elementy z przeznaczeniem na: nagłówek i stopkę, główną zawartość strony, menu, panel boczny oraz blok przeznaczony na reklamę.</p> - -<div id="layout_1"> -<div class="hidden"> -<pre class="brush: css">* {box-sizing: border-box;} - - .wrapper { - max-width: 1024px; - margin: 0 auto; - font: 1.2em Helvetica, arial, sans-serif; - } - - .wrapper > * { - border: 2px solid #f08c00; - background-color: #ffec99; - border-radius: 5px; - padding: 10px; - } - - nav ul { - list-style: none; - margin: 0; - padding: 0; - } -</pre> -</div> - -<pre class="brush: html"><div class="wrapper"> - <header class="main-head">The header</header> - <nav class="main-nav"> - <ul> - <li><a href="">Nav 1</a></li> - <li><a href="">Nav 2</a></li> - <li><a href="">Nav 3</a></li> - </ul> - </nav> - <article class="content"> - <h1>Main article area</h1> - <p>In this layout, we display the areas in source order for any screen less that 500 pixels wide. We go to a two column layout, and then to a three column layout by redefining the grid, and the placement of items on the grid.</p> - </article> - <aside class="side">Sidebar</aside> - <div class="ad">Advertising</div> - <footer class="main-footer">The footer</footer> -</div> -</pre> - -<p>Używamy cechy {{cssxref("grid-template-areas")}} by stworzyć układ strony. Nie korzystamy jeszcze z <em>zapytań o środki dostępu</em> (ang. media-queries). Musimy teraz nadać odpowiednie nazwy polom. Żeby to zrobić skorzystamy z właściwości {{cssxref("grid-area")}}.</p> - -<pre class="brush: css">.main-head { - grid-area: header; -} -.content { - grid-area: content; -} -.main-nav { - grid-area: nav; -} -.side { - grid-area: sidebar; -} -.ad { - grid-area: ad; -} -.main-footer { - grid-area: footer; -} -</pre> - -<p>Sama w sobie, operacja ta nie tworzy żadnego układu, aczkolwiek pozwala nam na to, dzięki nadanym nazwom. Nadal nie korzystając z <em>zapytań o urządzenie dostępu</em>, nadam teraz stronie układ tworzony z myślą o wyświetlaczach mobilnych. W tym wypadku zachowam pierwotną kolejność elementów, taką jak w układzie szkieletu, starając się uniknąć najmniejszego rozdźwięku pomiędzy szablonem znaczników, a ukladem siatki, zgodnie z poradami zawartymi w <em><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_Layout_and_Accessibility">Grid layout and accessibility</a></em>. Nie definuję kolumn, ani rzędów, jednak taka stylizacja tworzy nam układ jednokolumnowy, co się zaś tyczy rzędów, zostaną stworzone samoistnie dla każdego elementu wskazanej siatki.</p> - -<pre class="brush: css">.wrapper { - display: grid; - grid-gap: 20px; - grid-template-areas: - "header" - "nav" - "content" - "sidebar" - "ad" - "footer"; -} -</pre> - -<p>Zdefiniowany mobilny układ strony (jedna kolumna) będzie się teraz wyświetlał jednakowo na każdym urządzeniu, nieleżnie od jego rozmiarów. Żeby to zmienić możemy posłużyć się <em>zapytaniem o środek dostępu</em> i przedefiniować nasz układ na wypadek, gdyby pojawiło się wystarczająco dużo miejsca na ekranie, żeby zmieścić kolejną kolumnę.</p> - -<pre class="brush: css">@media (min-width: 500px) { - .wrapper { - grid-template-columns: 1fr 3fr; - grid-template-areas: - "header header" - "nav nav" - "sidebar content" - "ad footer"; - } - nav ul { - display: flex; - justify-content: space-between; - } -} -</pre> - -<p>Możesz zaobserwować, jak będzie wyglądał nowy układ przyglądając się wartości cechy {{cssxref("grid-template-areas")}}. Element <code>header</code> (nagłówek) rozciąga się na dwie kolumny, tak, jak i element <code>nav </code>(menu). Wtrzecim rzędzie sąsiaduje element <code>sidebar</code> (panel boczny) oraz element <code>content </code>(zawartość strony). W czwartym rzędzie umieściłem element <code>ad</code> (blok reklamowy) zamiast panelu bocznego, a na samym końcu element <code>footer</code> (stopkę) rozciągnietą na cały piąty rząd. Użyłem elastycznego bloku (<em>flexbox</em>) dla menu, tak by wyświetliło się w oddalonym rzędzie.</p> - -<p>Mogę teraz dodać ostatnią wartość graniczną, wyznaczającą przejście do układu w trzech kolumnach.</p> - -<pre class="brush: css">@media (min-width: 700px) { - .wrapper { - grid-template-columns: 1fr 4fr 1fr; - grid-template-areas: - "header header header" - "nav content sidebar" - "nav content ad" - "footer footer footer" - } - nav ul { - flex-direction: column; - } -} -</pre> - -<p>The three-column layout has two <code>1fr</code> unit side columns and a middle column that has <code>4fr</code> as the track size. This means that the available space in the container is split into 6 and assigned in proportion to our three tracks – one part each to the side columns and 4 parts to the center.</p> - -<p>In this layout I am displaying the <code>nav</code> in the left column, alongside the <code>content</code>. In the right column we have the <code>sidebar</code> and underneath it the advertisements (<code>ad</code>). The <code>footer</code> now spans right across the bottom of the layout. I then use a flexbox to display the navigation as a column.</p> - -<p>{{ EmbedLiveSample('layout_1', '800', '500') }}</p> -</div> - -<p>This is a simple example but demonstrates how we can use a grid layout to rearrange our layout for different breakpoints. In particular I am changing the location of that <code>ad</code> block, as appropriate in my different column setups. I find this named areas method very helpful at a prototyping stage, it is easy to play around with the location of elements. You could always begin to use grid in this way for prototyping, even if you can’t rely on it fully in production due to the browsers that visit your site.</p> - -<h2 id="A_flexible_12-column_layout">A flexible 12-column layout</h2> - -<p>If you have been working with one of the many frameworks or grid systems you may be accustomed to laying out your site on a 12- or 16-column flexible grid. We can create this type of system using CSS Grid Layout. As a simple example, I am creating a 12-column flexible grid that has 12 <code>1fr</code>-unit column tracks, they all have a start line named <code>col-start</code>. This means that we will have twelve grid lines named <code>col-start</code>.</p> - -<div id="layout_2"> -<div class="hidden"> -<pre class="brush: css">.wrapper { - max-width: 1024px; - margin: 0 auto; - font: 1.2em Helvetica, arial, sans-serif; -} -.wrapper > * { - border: 2px solid #f08c00; - background-color: #ffec99; - border-radius: 5px; - padding: 10px; -} -</pre> -</div> - -<pre class="brush: css">.wrapper { - display: grid; - grid-template-columns: repeat(12, [col-start] 1fr); - grid-gap: 20px; -} -</pre> - -<p>To demonstrate how this grid system works I have four child elements inside my wrapper.</p> - -<pre class="brush: html"><div class="wrapper"> - <div class="item1">Start column line 1, span 3 column tracks.</div> - <div class="item2">Start column line 6, span 4 column tracks. 2 row tracks.</div> - <div class="item3">Start row 2 column line 2, span 2 column tracks.</div> - <div class="item4">Start at column line 3, span to the end of the grid (-1).</div> -</div> -</pre> - -<p>I can then place these on the grid using the named lines, and also the span keyword.</p> - -<pre class="brush: css">.item1 { - grid-column: col-start / span 3; -} -.item2 { - grid-column: col-start 6 / span 4 ; - grid-row: 1 / 3; -} -.item3 { - grid-column: col-start 2 / span 2; - grid-row: 2; -} -.item4 { - grid-column: col-start 3 / -1; - grid-row: 3; -} -</pre> - -<p>{{ EmbedLiveSample('layout_2', '800', '400') }}</p> -</div> - -<p>As described in the <a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Layout_using_Named_Grid_Lines">guide to named lines</a>, we are using the named line to place our item. As we have 12 lines all with the same name we use the name, and then the index of the line. You could also use the line index itself if you prefer and avoid using named lines at all.</p> - -<p>Rather than setting the end line number, I have chosen to say how many tracks this element should span, using the <code>span</code> keyword. I like this approach as when working with a multiple-column layout system we usually think of blocks in terms of the number of tracks of the grid they span, and adjust that for different breakpoints. To see how the blocks align themselves to the tracks, use the <a href="/en-US/docs/Tools/Page_Inspector/How_to/Examine_grid_layouts">Firefox Grid Inspector</a>. It clearly demonstrates how our items are placed.</p> - -<p><img alt="Showing the items placed on the grid with grid tracks highlighted." src="https://mdn.mozillademos.org/files/14753/11-grid-inspector-12col.png"></p> - -<p>There are some key differences with how a grid layout works over the grid systems you may have used previously. As you can see, we do not need to add any markup to create a row, grid systems need to do this to stop elements popping up into the row above. With CSS Grid Layout, we can place things into rows, with no danger of them rising up into the row above if it is left empty. Due to this <em>strict</em> column and row placement we can also easily leave white space in our layout. We also don’t need special classes to pull or push things, to indent them into the grid. All we need to do is specify the start and end line for the item.</p> - -<h3 id="Building_a_layout_using_the_12-column_system">Building a layout using the 12-column system</h3> - -<p>To see how this layout method works in practice, we can create the same layout that we created with {{cssxref("grid-template-areas")}}, this time using the 12-column grid system. I am starting with the same markup as used for the grid template areas example.</p> - -<div id="layout_3"> -<div class="hidden"> -<pre class="brush: css">* {box-sizing: border-box;} - - .wrapper { - max-width: 1024px; - margin: 0 auto; - font: 1.2em Helvetica, arial, sans-serif; - } - - .wrapper > * { - border: 2px solid #f08c00; - background-color: #ffec99; - border-radius: 5px; - padding: 10px; - } - - nav ul { - list-style: none; - margin: 0; - padding: 0; - } -</pre> -</div> - -<pre class="brush: html"><div class="wrapper"> - <header class="main-head">The header</header> - <nav class="main-nav"> - <ul> - <li><a href="">Nav 1</a></li> - <li><a href="">Nav 2</a></li> - <li><a href="">Nav 3</a></li> - </ul> - </nav> - <article class="content"><h1>Main article area</h1> - <p>In this layout, we display the areas in source order for any screen less that 500 pixels wide. We go to a two column layout, and then to a three column layout by redefining the grid, and the placement of items on the grid.</p></article> - <aside class="side">Sidebar</aside> - <div class="ad">Advertising</div> - <footer class="main-footer">The footer</footer> - </div> -</pre> - -<p>I can then set up our grid, as for the example 12-column layout above.</p> - -<pre class="brush: css">.wrapper { - display: grid; - grid-template-columns: repeat(12, [col-start] 1fr); - grid-gap: 20px; -} -</pre> - -<p>We are once again going to make this a responsive layout, this time however using named lines. Every breakpoint will use a 12-column grid, however the number of tracks that items will span changes depending on the size of the screen.</p> - -<p>We start mobile first, and all we want for the narrowest screens is for the items to remain in source order, and all span right across the grid.</p> - -<pre class="brush: css">.wrapper > * { - grid-column: col-start / span 12; -} -</pre> - -<p>At the next breakpoint we want to move to a two-column layout. Our header and navigation still span the full grid, so we do not need to specify any positioning for them. The sidebar is starting on the first column line named col-start, spanning 3 lines. It goes after row line 3, as the header and navigation are in the first two row tracks.</p> - -<p>The ad panel is below the sidebar, so starts at grid row line 4. Then we have the content and footer starting at col-start 4 and spanning 9 tracks taking them to the end of the grid.</p> - -<pre class="brush: css">@media (min-width: 500px) { - - .side { - grid-column: col-start / span 3; - grid-row: 3; - } - .ad { - grid-column: col-start / span 3; - grid-row: 4; - } - .content, .main-footer { - grid-column: col-start 4 / span 9; - } - nav ul { - display: flex; - justify-content: space-between; - } -} -</pre> - -<p>Finally we go to the three-column version of this layout. The header continues to span right across the grid, but now the navigation moves down to become the first sidebar, with the content and then the sidebar next to it. The footer now also spans across the full layout.</p> - -<pre class="brush: css">@media (min-width: 700px) { - .main-nav { - grid-column: col-start / span 2; - grid-row: 2 / 4; - } - .content { - grid-column: col-start 3 / span 8; - grid-row: 2 / 4; - } - .side { - grid-column: col-start 11 / span 2; - grid-row: 2; - } - .ad { - grid-column: col-start 11 / span 2; - grid-row: 3; - } - .main-footer { - grid-column: col-start / span 12; - } - nav ul { - flex-direction: column; - } -} -</pre> - -<p>{{ EmbedLiveSample('layout_3', '800', '450') }}</p> -</div> - -<p>Once again the <a href="/en-US/docs/Tools/Page_Inspector/How_to/Examine_grid_layouts">Grid Inspector</a> is useful to help us see how our layout has taken shape.</p> - -<p><img alt="Showing the layout with grid tracks highlighted by the grid inspector." src="https://mdn.mozillademos.org/files/14755/11-grid-inspector-12col-layout.png" style="height: 614px; width: 2050px;"></p> - -<p>Something to note as we create this layout is that we haven’t needed to explicitly position every element on the grid at each breakpoint. We have been able to inherit the placement set up for earlier breakpoints – an advantage of working “mobile first”. We are also able to take advantage of grid auto-placement. By keeping elements in a logical order, auto-placement does quite a lot of work for us in placing items onto the grid. In the final example in this guide we will create a layout that entirely relies on auto-placement.</p> - -<h2 id="A_product_listing_with_auto-placement">A product listing with auto-placement</h2> - -<p>Many layouts are essentially sets of “cards” – product listings, image galleries, and so on. A grid can make it very easy to create these listings in a way that is responsive without needing to add <a href="/en-US/docs/Web/CSS/Media_Queries">media queries</a> to make it so. In this next example I’m combining CSS Grid and Flexbox Layouts to make a simple product listing layout.</p> - -<p>The markup for my listing is an unordered list of items. Each item contains a heading, some text of varying height, and a call to action link.</p> - -<div id="layout_4"> -<pre class="brush: html"><ul class="listing"> - <li> - <h2>Item One</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Two</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li class="wide"> - <h2>Item Three</h2> - <div class="body"><p>The content of this listing item goes here.</p> - <p>This one has more text than the other items.</p> - <p>Quite a lot more</p> - <p>Perhaps we could do something different with it?</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Four</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Five</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> -</ul> -</pre> - -<div class="hidden"> -<pre class="brush: css">* {box-sizing: border-box;} - img {max-width: 100%; display: block;} - body { - font: 1.2em Helvetica, arial, sans-serif; - } - a:link, a:visited { - text-decoration: none; - color: #f08c00; - } - - h2 { - background-color: #f08c00; - color: #fff; - text-align: center; - margin: 0; - padding: 20px; - } -</pre> -</div> - -<p>We are going to create a grid with a flexible number of flexible columns. I want them never to become smaller than 200 pixels, and then to share any available remaining space equally – so we always get equal width column tracks. We achieve this with the <code>minmax()</code> function in our repeat notation for track sizing.</p> - -<pre class="brush: css">.listing { - list-style: none; - margin: 2em; - display: grid; - grid-gap: 20px; - grid-template-columns: repeat(auto-fill,minmax(200px, 1fr)); -} -</pre> - -<p>As soon as I add this CSS, the items start to lay out as a grid. If I make the window smaller or wider the number of column tracks changes – without me needing to add breakpoints using media queries and redefine the grid.</p> - -<p>I can then tidy up the internals of the boxes using a little touch of flexbox. I set the list item to <code>display: flex</code> and the <code>flex-direction</code> to <code>column</code>. I can then use an auto margin on the <code>.cta</code> to push this bar down to the bottom of the box.</p> - -<pre class="brush: css">.listing li { - border: 1px solid #ffe066; - border-radius: 5px; - display: flex; - flex-direction: column; -} -.listing .cta { - margin-top: auto; - border-top: 1px solid #ffe066; - padding: 10px; - text-align: center; -} -.listing .body { - padding: 10px; -} -</pre> - -<p>This is really one of the key reasons I would use flexbox rather than grid, if I am just aligning or distributing something in a single dimension, that’s a flexbox use case. </p> - -<p>{{ EmbedLiveSample('layout_4', '800', '900') }}</p> -</div> - -<p>This is all looking fairly complete now, however we sometimes have these cards which contain far more content than the others. It might be nice to cause those to span two tracks, and then they won’t be so tall. I have a class of <code>wide</code> on my larger item, and I add a rule {{cssxref("grid-column-end")}} with a value of <code>span 2</code>. Now when grid encounters this item, it will assign it two tracks. At some breakpoints, this means that we'll get a gap in the grid – where there isn’t space to lay out a two-track item.</p> - -<p><img alt="The layout has gaps as there is not space to layout a two track item." src="https://mdn.mozillademos.org/files/14751/11-grid-auto-flow-sparse.png" style="height: 812px; width: 800px;"></p> - -<p>I can cause a grid to backfill those gaps by setting {{cssxref("grid-auto-flow")}}<code>: dense </code> on the grid container. Take care when doing this however as it does take items away from their logical source order. You should only do this if your items do not have a set order – and be aware of the <a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_Layout_and_Accessibility#Visual_not_logical_re-ordering">issues</a> of the tab order following the source and not your reordered display.</p> - -<div id="layout_5"> -<div class="hidden"> -<pre class="brush: html"><ul class="listing"> - <li> - <h2>Item One</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Two</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li class="wide"> - <h2>Item Three</h2> - <div class="body"><p>The content of this listing item goes here.</p> - <p>This one has more text than the other items.</p> - <p>Quite a lot more</p> - <p>Perhaps we could do something different with it?</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Four</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Five</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> -</ul> -</pre> - -<pre class="brush: css">* {box-sizing: border-box;} - img {max-width: 100%; display: block;} - body { - font: 1.2em Helvetica, arial, sans-serif; - } - a:link, a:visited { - text-decoration: none; - color: #f08c00; - } - - h2 { - background-color: #f08c00; - color: #fff; - text-align: center; - margin: 0; - padding: 20px; - } - -.listing li { - border: 1px solid #ffe066; - border-radius: 5px; - display: flex; - flex-direction: column; -} -.listing .cta { - margin-top: auto; - border-top: 1px solid #ffe066; - padding: 10px; - text-align: center; -} -.listing .body { - padding: 10px; -} -</pre> -</div> - -<pre class="brush: css">.listing { - list-style: none; - margin: 2em; - display: grid; - grid-gap: 20px; - grid-auto-flow: dense; - grid-template-columns: repeat(auto-fill,minmax(200px, 1fr)); -} -.listing .wide { - grid-column-end: span 2; -} -</pre> - -<p>{{ EmbedLiveSample('layout_5', '800', '900') }}</p> - -<p>This technique of using auto-placement with some rules applied to certain items is very useful, and can help you to deal with content that is being output by a CMS for example, where you have repeated items and can perhaps add a class to certain ones as they are rendered into the HTML.</p> -</div> - -<h2 id="Further_exploration">Further exploration</h2> - -<p>The best way to learn to use grid layout is to continue to build examples like the ones we have covered here. Pick something that you normally build using your framework of choice, or using floats, and see if you can build it using grid. Don’t forget to find examples that are impossible to build with current methods. That might mean taking inspiration from magazines or other non-web sources. Grid Layout opens up possibilities that we have not had before, we don’t need to be tied to the same old layouts to use it.</p> - -<ul> - <li>For inspiration see the <a href="http://labs.jensimmons.com/"><em>Layout Labs</em> from Jen Simmons</a>, she has been creating layouts based on a range of sources.</li> - <li>For additional common layout patterns see <em><a href="http://gridbyexample.com">Grid by Example</a></em>, where there are many smaller examples of grid layout and also some larger UI patterns and full page layouts.</li> -</ul> - -<section class="Quick_links" id="Quick_Links"> -<ol> - <li><a href="/en-US/docs/Web/CSS"><strong>CSS</strong></a></li> - <li><a href="/en-US/docs/Web/CSS/Reference"><strong>CSS Reference</strong></a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout">CSS Grid Layout</a></li> - <li data-default-state="open"><a href="#"><strong>Guides</strong></a> - <ol> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout">Basics concepts of grid layout</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Relationship_of_Grid_Layout">Relationship to other layout methods</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Line-based_Placement_with_CSS_Grid">Line-based placement</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas">Grid template areas</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Layout_using_Named_Grid_Lines">Layout using named grid lines</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Auto-placement_in_CSS_Grid_Layout">Auto-placement in grid layout</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Box_Alignment_in_CSS_Grid_Layout">Box alignment in grid layout</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid,_Logical_Values_and_Writing_Modes">Grids, logical values and writing modes</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_Layout_and_Accessibility">CSS Grid Layout and Accessibility</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_and_Progressive_Enhancement">CSS Grid Layout and Progressive Enhancement</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Realizing_common_layouts_using_CSS_Grid_Layout">Realizing common layouts using grids</a></li> - </ol> - </li> - <li data-default-state="open"><a href="#"><strong>Properties</strong></a> - <ol> - <li><a href="/en-US/docs/Web/CSS/grid">grid</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-area">grid-area</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-auto-columns">grid-auto-columns</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-auto-flow">grid-auto-flow</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-auto-rows">grid-auto-rows</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-column">grid-column</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-column-end">grid-column-end</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-column-gap">grid-column-gap</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-column-start">grid-column-start</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-gap">grid-gap</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-row">grid-row</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-row-end">grid-row-end</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-row-gap">grid-row-gap</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-row-start">grid-row-start</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-template">grid-template</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-template-areas">grid-template-areas</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-template-columns">grid-template-columns</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-template-rows">grid-template-rows</a></li> - </ol> - </li> - <li data-default-state="open"><a href="#"><strong>Glossary</strong></a> - <ol> - <li><a href="/en-US/docs/Glossary/Grid">Grid</a></li> - <li><a href="/en-US/docs/Glossary/Grid_lines">Grid lines</a></li> - <li><a href="/en-US/docs/Glossary/Grid_tracks">Grid tracks</a></li> - <li><a href="/en-US/docs/Glossary/Grid_cell">Grid cell</a></li> - <li><a href="/en-US/docs/Glossary/Grid_areas">Grid areas</a></li> - <li><a href="/en-US/docs/Glossary/Gutters">Gutters</a></li> - <li><a href="/en-US/docs/Glossary/Grid_Axis">Grid Axis</a></li> - <li><a href="/en-US/docs/Glossary/Grid_rows">Grid row</a></li> - <li><a href="/en-US/docs/Glossary/Grid_column">Grid column</a></li> - </ol> - </li> -</ol> -</section> |