Last active
February 6, 2023 00:03
-
-
Save LeaVerou/bbd569440dd680792bd144f503a0405c to your computer and use it in GitHub Desktop.
CSS Grid vs Lea: 1-0
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
/** | |
* CSS Grid vs Lea: 1-0 | |
*/ | |
.slide { | |
position: absolute; | |
inset: 0; | |
z-index: 1; | |
padding: 2.5rem; | |
box-sizing: border-box; | |
height: 100vh; | |
display: grid; | |
grid-template-columns: 1fr 1fr; | |
grid-template-rows: auto 1fr; | |
overflow: auto; | |
gap: 0 .5em; | |
outline: 2px solid red; outline-offset: -2px; | |
} | |
h1 { grid-column-end: span 2 } | |
.slide > * { outline: 2px dashed green; } | |
img { | |
max-width: 100%; | |
max-height: 100%; | |
object-fit: contain; | |
} | |
body { | |
font-size: 2em; | |
} |
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
<article class="slide heading-2x1 dont-resize heading-MxN" style="--columns:2; --rows:1;/* contain: size; */" data-title="Textbook" id="textbook" data-index="12" data-visit="1"> | |
<h1>Textbook</h1> | |
<article> | |
<ul> | |
<li><em>Design of Everyday Things</em> by <br>Don Norman</li> | |
<li>Designers' bible</li> | |
<li>Required reading in many companies/jobs that produce tangible and software artifacts for use</li> | |
</ul> | |
</article> | |
<img src="https://designftw.mit.edu/lectures/introduction/img/doet.jpg" alt=""> | |
</article> |
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
// alert('Hello world!'); |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment