diff options
Diffstat (limited to 'layout/docs/css-gap-decorations/examples/grid-lateral-004.html')
-rw-r--r-- | layout/docs/css-gap-decorations/examples/grid-lateral-004.html | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/layout/docs/css-gap-decorations/examples/grid-lateral-004.html b/layout/docs/css-gap-decorations/examples/grid-lateral-004.html new file mode 100644 index 0000000000..7c9a249085 --- /dev/null +++ b/layout/docs/css-gap-decorations/examples/grid-lateral-004.html @@ -0,0 +1,63 @@ +<!doctype html> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<title>Example of default rule alignment and size</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; +} + +.grid::after { + position: absolute; + white-space: pre; + bottom: -8em; + content: attr(test); + font-size: 10px; +} +pre { + font-size: 10px; +} +</style> + +<pre> +Example showing the default rule alignment and size: +</pre> +<div class="grid test1"><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 + "\n" + + "column-rule-lateral-inset-end: " + cs.columnRuleLateralInsetEnd + "\n" + + "column-rule-width: " + cs.columnRuleWidth + "\n\n" + + "column-rule-longitudinal-inset-start: " + cs.columnRuleLongitudinalInsetStart + "\n" + + "column-rule-longitudinal-inset-end: " + cs.columnRuleLongitudinalInsetEnd + "\n" + + "column-rule-length: " + cs.columnRuleLength + ); + }); +} +</script> |