aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/glossario/grid_areas/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/glossario/grid_areas/index.html')
-rw-r--r--files/pt-br/glossario/grid_areas/index.html78
1 files changed, 78 insertions, 0 deletions
diff --git a/files/pt-br/glossario/grid_areas/index.html b/files/pt-br/glossario/grid_areas/index.html
new file mode 100644
index 0000000000..0e9969dd3d
--- /dev/null
+++ b/files/pt-br/glossario/grid_areas/index.html
@@ -0,0 +1,78 @@
+---
+title: Grid Areas
+slug: Glossario/Grid_Areas
+translation_of: Glossary/Grid_Areas
+---
+<p>Um  <strong>grid area </strong> é um ou mais {{glossary("grid cell", "grid cells")}} que compõem uma área retangular do grid.  As Grid Areas quando se coloca um item  usando <a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Line-based_Placement_with_CSS_Grid">line-based placement</a> (posicionamento baseado em colunas e linha)ou quando define áreas usando <a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas">named grid areas</a>(substituindo o nome).</p>
+
+<p><img alt="Image showing a highlighted grid area" src="https://mdn.mozillademos.org/files/14771/1_Grid_Area.png" style="height: 253px; width: 380px;"></p>
+
+<p>Áreas do Grid devem ser de natureza regutangular; não é possível criar por exemplo uma área de grid em forma de T ou L .</p>
+
+<p>No exemplo abaixo temos um grid contêiner com dois items de grid, nomeamos esses com a propriedade {{cssxref("grid-area")}} e em seguida colocamos eles no grid usando {{cssxref("grid-template-areas")}}. Isso  cria duas áreas de grid, uma cobrindo 4 áreas do grid e a outra duas áreas do grid.</p>
+
+<div id="example_1">
+<div class="hidden">
+<pre class="brush: css">* {box-sizing: border-box;}
+
+.wrapper {
+ border: 2px solid #f76707;
+ border-radius: 5px;
+ background-color: #fff4e6;
+}
+
+.wrapper &gt; div {
+ border: 2px solid #ffa94d;
+ border-radius: 5px;
+ background-color: #ffd8a8;
+ padding: 1em;
+ color: #d9480f;
+}
+</pre>
+</div>
+
+<pre class="brush: css">.wrapper {
+ display: grid;
+ grid-template-columns: repeat(3,1fr);
+ grid-template-rows: 100px 100px;
+ grid-template-areas:
+ "a a b"
+ "a a b";
+}
+.item1 {
+ grid-area: a;
+}
+.item2 {
+ grid-area: b;
+}
+</pre>
+
+<pre class="brush: html">&lt;div class="wrapper"&gt;
+ &lt;div class="item1"&gt;Item&lt;/div&gt;
+ &lt;div class="item2"&gt;Item&lt;/div&gt;
+&lt;/div&gt;
+</pre>
+
+<p>{{ EmbedLiveSample('example_1', '300', '280') }}</p>
+</div>
+
+<h2 id="Saiba_Mais">Saiba Mais</h2>
+
+<h3 id="Property_reference">Property reference</h3>
+
+<ul>
+ <li>{{cssxref("grid-template-columns")}}</li>
+ <li>{{cssxref("grid-template-rows")}}</li>
+ <li>{{cssxref("grid-auto-rows")}}</li>
+ <li>{{cssxref("grid-auto-columns")}}</li>
+ <li>{{cssxref("grid-template-areas")}}</li>
+ <li>{{cssxref("grid-area")}}</li>
+</ul>
+
+<h3 id="Further_reading">Further reading</h3>
+
+<ul>
+ <li>CSS Grid Layout Guide: <em><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout">Basic concepts of grid layout</a></em></li>
+ <li>CSS Grid Layout Guide: <em><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas">Grid template areas</a></em></li>
+ <li><a href="https://drafts.csswg.org/css-grid/#grid-area-concept">Definition of Grid Areas in the CSS Grid Layout specification</a></li>
+</ul>