aboutsummaryrefslogtreecommitdiffhomepage
path: root/web/src
diff options
context:
space:
mode:
Diffstat (limited to 'web/src')
-rw-r--r--web/src/details.html13
-rw-r--r--web/src/grid-2col.html25
2 files changed, 38 insertions, 0 deletions
diff --git a/web/src/details.html b/web/src/details.html
new file mode 100644
index 0000000..8bbec30
--- /dev/null
+++ b/web/src/details.html
@@ -0,0 +1,13 @@
+<style>
+/* example: style based on attribute */
+details > summary {
+ color: red;
+}
+details[open] > summary {
+ color: green;
+}
+</style>
+<details>
+ <summary>Some text goes here</summary>
+ ... some more text goes here.
+</details>
diff --git a/web/src/grid-2col.html b/web/src/grid-2col.html
new file mode 100644
index 0000000..e353d54
--- /dev/null
+++ b/web/src/grid-2col.html
@@ -0,0 +1,25 @@
+<style>
+.grid-2col {
+ display: grid;
+ grid-template-columns: 2fr 1fr;
+ gap: 1em
+}
+.col1 {
+ grid-column-start: 1;
+ background-color: red;
+ padding-left: 1em;
+}
+.col2 {
+ grid-column-start: 2;
+ background-color: green;
+ padding-left: 1em;
+}
+</style>
+<div class="grid-2col">
+ <div class="col1">
+ <p>Some text in the first column.</p>
+ </div>
+ <div class="col2">
+ <p>Some text in the second column.</p>
+ </div>
+</div>