From 5260f36a1b693abca54be5c8ae319bcf5b3fc0b9 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 13 Feb 2024 11:17:03 +0000 Subject: [PATCH] add more examples to examples page --- examples/index.html | 56 +++++++++++++++++++++++++++++++++++++++++---- examples/tabs.css | 20 ++++++++++++---- 2 files changed, 68 insertions(+), 8 deletions(-) diff --git a/examples/index.html b/examples/index.html index 5fd314d..1201944 100644 --- a/examples/index.html +++ b/examples/index.html @@ -6,11 +6,58 @@ +

Tab Container Examples

+ +

Horizontal

+ + +
+ + + +
+
+ Panel 1 +
+ + +
+ +

Vertical

+ + +
+ + + +
+
+ Panel 1 +
+ + +
+ +

Panel with extra buttons

+ -
- - - +
+ + +
+ + + +
+
Panel 1 @@ -21,6 +68,7 @@ +

This comes after the panels

diff --git a/examples/tabs.css b/examples/tabs.css index 5289590..6e95f33 100644 --- a/examples/tabs.css +++ b/examples/tabs.css @@ -1,8 +1,20 @@ -/* Borrowed from https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-1/tabs.html */ +/* Borrowed (and modified) from https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-1/tabs.html */ -[role="tablist"] { - margin: 0 0 -.1em; - overflow: visible; +tab-container { + width: 100%; + margin: 2rem 0; +} + +tab-container>[role="tablist"][aria-orientation="vertical"] { + display: flex; + flex-direction: column; +} +tab-container:has([aria-orientation="vertical"]) { + display: flex; + flex-direction: row; +} +tab-container:has([aria-orientation="vertical"]) [role="tabpanel"] { + flex: 1; } [role="tab"] {