This file contains hidden or 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
.grid { | |
display: grid; | |
grid-template-columns: 100px 200px 300px; | |
} |
This file contains hidden or 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
.page { | |
grid-template-areas: | |
'header header header header header header' | |
'menu main main main right right' | |
'menu footer footer footer footer footer'; | |
} | |
.header { grid-area: header; } | |
.menu { grid-area: menu; } | |
.main { grid-area: main; } |
This file contains hidden or 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
<div class="page"> | |
<div class="item header">Header</div> | |
<div class="item menu">Menu</div> | |
<div class="item main">Main</div> | |
<div class="item right">Right</div> | |
<div class="item footer">Footer</div> | |
</div> |
This file contains hidden or 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
.item.item-1 { | |
grid-row-start: 1; | |
grid-row-end: 3; | |
} |
This file contains hidden or 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
.grid { | |
display: grid; | |
grid-template-columns: auto auto auto; | |
} |
This file contains hidden or 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
.grid { | |
display: grid; | |
} |
This file contains hidden or 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
<div class="grid"> | |
<div class="item item-1">Item 1</div> | |
<div class="item item-2">Item 2</div> | |
<div class="item item-3">Item 3</div> | |
<div class="item item-4">Item 4</div> | |
<div class="item item-5">Item 5</div> | |
<div class="item item-6">Item 6</div> | |
</div> |
This file contains hidden or 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
const calcHyp = (leg) => Math.sqrt(leg ** 2 * 2) |
This file contains hidden or 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
const formatNumber = (str) => Array.from(str).map((val, i, arr) => ((arr.length - i) % 6 - 1) % 3 === 0 && i !== arr.length - 1 ? `${val}.` : val).join('') |
This file contains hidden or 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
[ | |
parseInt(42.25, 0), // 42.25 = item e 0 = índice | |
parseInt(42.5, 1), // 42.5 = item e 1 = índice | |
parseInt(42.75, 2) // 42.75 = item e 2 = índice | |
] |