-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dierk Koenig
committed
Jan 9, 2024
1 parent
513661b
commit b2d71f3
Showing
3 changed files
with
123 additions
and
3 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
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,22 @@ | ||
|
||
<%@ page contentType="text/html;charset=UTF-8" %> | ||
<html> | ||
<head> | ||
<title></title> | ||
<style> | ||
body { | ||
width: 100vw; | ||
height: 100vh; | ||
} | ||
</style> | ||
</head> | ||
<body id="body"> | ||
<script> | ||
const style = getComputedStyle(document.getElementById("body")); | ||
let result = ""; | ||
result += "height=" + style.height; | ||
result += "&width=" + style.width; | ||
window.location.href = "/spoof/show?" + result; | ||
</script> | ||
</body> | ||
</html> |
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,91 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Try Container</title> | ||
<style> | ||
|
||
body { | ||
margin: 1em; | ||
} | ||
|
||
main { | ||
|
||
} | ||
|
||
.myContainer { | ||
container-type: inline-size; /* only looks at the width */ | ||
container-name: myContainer; | ||
display: flex; | ||
flex-wrap: wrap; | ||
min-height: 3em; | ||
margin: 1em; | ||
overflow: hidden; | ||
box-shadow: 0 0 5px rebeccapurple; | ||
background-color: lightgray; | ||
} | ||
|
||
.contained { | ||
width: 200px; | ||
min-height: 3em; | ||
margin: 1em; | ||
--my-color: blue; | ||
background-color: var(--my-color); | ||
} | ||
|
||
@container myContainer (width < 600px) { /* name is optional */ | ||
.contained { | ||
--my-color: red; | ||
} | ||
/* we cannot change myContainer's properties here */ | ||
} | ||
@container myContainer (width < 101vw) { | ||
.contained { | ||
height: clamp( 3em, 9rem - 6cqw, 9em ); | ||
} | ||
} | ||
.outer { | ||
display: grid; | ||
grid-template-columns: 2fr 1fr; | ||
} | ||
|
||
</style> | ||
|
||
</head> | ||
<body> | ||
|
||
<main> | ||
<p>Find two style classes: one for all the grey containers, a second one for the colored boxes.</p> | ||
|
||
<div class="contained"> | ||
</div> | ||
|
||
|
||
<div class="myContainer"> | ||
<div class="contained"> | ||
</div> | ||
<div class="contained"> | ||
</div> | ||
<div class="contained"> | ||
</div> | ||
</div> | ||
|
||
<div class="outer"> | ||
<div class="myContainer"> | ||
<div class="contained"> | ||
</div> | ||
<div class="contained"> | ||
</div> | ||
<div class="contained"> | ||
</div> | ||
</div> | ||
<div class="myContainer"> | ||
<div class="contained"> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</main> | ||
|
||
</body> | ||
</html> |