Created
June 8, 2021 11:03
-
-
Save Kcko/48a5a0ace2d77715ea40bb1c50684508 to your computer and use it in GitHub Desktop.
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
/* https://jsbin.com/bofitujaho/2/edit?html,css,output */ | |
* { | |
box-sizing: border-box; | |
} | |
div { | |
display: flex; | |
flex-wrap: wrap; | |
width: 100%; | |
border: 0px solid black; | |
gap: 20px; | |
border: 3px solid black; | |
} | |
span | |
{ | |
background: red; | |
width: calc(25% - 15px); | |
/* | |
((pocet sloupcu - 1 ) * gap) / poctem sloupcu | |
*/ | |
} |
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
/* https://coryrylan.com/blog/css-gap-space-with-flexbox */ | |
.emulated-flex-gap { | |
--gap: 12px; | |
display: inline-flex; | |
flex-wrap: wrap; | |
margin: calc(-1 * var(--gap)) 0 0 calc(-1 * var(--gap)); | |
width: calc(100% + var(--gap)); | |
} | |
.emulated-flex-gap > * { | |
margin: var(--gap) 0 0 var(--gap); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment