-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[#529]: Update css grid examples
- Loading branch information
Showing
30 changed files
with
1,306 additions
and
830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Hello CSS Grid | ||
|
||
Vamos a empezar abriendo el Visual Studio para empezar a jugar. | ||
|
||
Y ahora creamos este Html: | ||
|
||
```diff | ||
<head> | ||
<title>Parcel Sandbox</title> | ||
<meta charset="UTF-8" /> | ||
+ <link rel="stylesheet" type="text/css" href="./src/styles.css" /> | ||
</head> | ||
<body> | ||
+ <div class="grid-container"> | ||
+ <div class="item">1</div> | ||
+ <div class="item">2</div> | ||
+ <div class="item">3</div> | ||
+ <div class="item">4</div> | ||
+ <div class="item">5</div> | ||
+ <div class="item">6</div> | ||
+ </div> | ||
</body> | ||
``` | ||
|
||
E indicamos al contenedor que es un display grid: | ||
|
||
```css | ||
.grid-container { | ||
display: grid; | ||
} | ||
``` | ||
|
||
Bueno... no es muy elegante, Que pasa? | ||
|
||
Las herramientas de desarrollo de Chrome tienen un buen soporte para CSS Grid, abrámoslo y comprobemos qué tenemos: | ||
|
||
![DevTools grid support](./content/devtoolshello.png) | ||
|
||
Por defecto tenemos una columan con 6 filas. | ||
|
||
Es hora de empezar a configurar :) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
181 changes: 0 additions & 181 deletions
181
01-layout/03-grid-css/01-grid-css-fundamentals/README.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Rows Columns | ||
|
||
Partiendo del ejemplo anterior vamos a configurarlo. | ||
|
||
```diff | ||
.grid-container { | ||
display: grid; | ||
+ grid-template-columns: 100px 100px 300px; | ||
+ grid-template-rows: 100px 100px; | ||
} | ||
``` | ||
|
||
explicar el repeat | ||
|
||
```css | ||
grid-template-columns: repeat(3, 100px 50px); | ||
``` |
Oops, something went wrong.