Last active
September 7, 2021 23:58
-
-
Save pyrocat101/3ed675efff6d39e637a2ba9b8d5566df to your computer and use it in GitHub Desktop.
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
/** | |
* Grid | |
*/ | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
#container { | |
padding: 16px; | |
width: 100%; | |
display: grid; | |
grid-template-columns: repeat(auto-fit, 240px); | |
grid-gap: 16px; | |
} | |
@media only screen and (max-width: 1280px) { | |
#container { | |
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); | |
} | |
} | |
.item { | |
height: 100px; | |
border-radius: 8px; | |
} |
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 id="container"> | |
<div class="item" style="background: #F3B3A6"></div> | |
<div class="item" style="background: #B98B82"></div> | |
<div class="item" style="background: #E4959E"></div> | |
<div class="item" style="background: #37515F"></div> | |
<div class="item" style="background: #1F0812"></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
// alert('Hello world!'); |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment