summaryrefslogtreecommitdiffstats
path: root/layout/docs/css-gap-decorations/examples/grid-lateral-002.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /layout/docs/css-gap-decorations/examples/grid-lateral-002.html
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/docs/css-gap-decorations/examples/grid-lateral-002.html')
-rw-r--r--layout/docs/css-gap-decorations/examples/grid-lateral-002.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/layout/docs/css-gap-decorations/examples/grid-lateral-002.html b/layout/docs/css-gap-decorations/examples/grid-lateral-002.html
new file mode 100644
index 0000000000..66ea9c2a38
--- /dev/null
+++ b/layout/docs/css-gap-decorations/examples/grid-lateral-002.html
@@ -0,0 +1,66 @@
+<!doctype html>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<title>Examples of column-rule-lateral-inset-start</title>
+<style>
+html,body {
+ color:black; background-color:white; font:20px/1 monospace;
+}
+
+.grid {
+ position: relative;
+ display: inline-grid;
+ grid-template-columns: auto auto;
+ gap: 4px 16px;
+
+ column-rule: solid blue;
+
+ margin-right: 8ch;
+ background: lightgrey;
+ padding: 10px;
+}
+
+x {
+ inline-size: 50px;
+ block-size: 1.5em;
+ background: grey;
+}
+
+.test1 {
+ column-rule-lateral-inset-start: 0;
+}
+.test2 {
+ column-rule-lateral-inset-start: 3px;
+}
+
+.grid::after {
+ position: absolute;
+ white-space: pre;
+ bottom: -2em;
+ content: attr(test);
+ font-size: 10px;
+}
+pre {
+ font-size: 10px;
+}
+</style>
+
+<pre>
+Examples of aligning a rule at the start of the gap with a lateral offset:
+</pre>
+<div class="grid test1"><x>1</x><x>2</x></div>
+<div class="grid test2"><x>1</x><x>2</x></div>
+
+
+<script>
+window.onload = function() {
+ [...document.querySelectorAll('.grid')].forEach(function(elm) {
+ const cs = window.getComputedStyle(elm);
+ elm.setAttribute("test",
+ "column-rule-lateral-inset-start: " + cs.columnRuleLateralInsetStart
+ );
+ });
+}
+</script>