From 75e6b37ae6ac4fc07a5c8663ea2ed98dfe9e63b7 Mon Sep 17 00:00:00 2001 From: David Bau Date: Wed, 20 Apr 2022 07:17:06 -0400 Subject: [PATCH] Flip INLINE to vertical and define WRAP --- baukit/show.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/baukit/show.py b/baukit/show.py index fa4991e..3386176 100644 --- a/baukit/show.py +++ b/baukit/show.py @@ -215,15 +215,26 @@ V = Tag( ChildTag(H)) H.update(ChildTag(V)) +# Tables TD = Tag('td', ChildTag(H)) TR = Tag('tr', ChildTag(TD)) TABLE = Tag('table', ChildTag(TR)) +# Remove defaults PLAIN = Tag() + +# The INLINE style allows the content to provide the size, instead of +# expanding to fill the available space. INLINE = Tag( - style(display='inline-flex', flexFlow='row wrap', gap='3px', - alignItems='center'), - ChildTag(V)) + style(display='inline-flex', flex=None, flexFlow='column', gap='3px'), + ChildTag(H)) + +# WRAP provides wrapping lines of INLINE boxes, akin to layout of text +WRAP = Tag( + style(display='flex', flex='1', flexFlow='row wrap', gap='3px', + alignItems='start'), + ChildTag(INLINE)) + tag_stack = [V] tag_modifications = []