Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color mode #984

Merged
merged 13 commits into from
Oct 27, 2023
Prev Previous commit
Next Next commit
fixed stack examples
  • Loading branch information
AnnMarieW committed Oct 24, 2023
commit 19983bbe863ecde1ea66f52352e290760961971c
18 changes: 8 additions & 10 deletions docs/components_page/components/layout/horizontal_stack.py
tcbegley marked this conversation as resolved.
Show resolved Hide resolved
tcbegley marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
import dash_bootstrap_components as dbc
from dash import html

demo_div = "bg-primary-subtle border border-primary-subtle p-2"

stack = html.Div(
[
dbc.Stack(
[
html.Div("Horizontal", className=demo_div),
html.Div("Stack", className=demo_div),
html.Div("Without", className=demo_div),
html.Div("Gaps", className=demo_div),
html.Div("Horizontal"),
html.Div("Stack"),
html.Div("Without"),
html.Div("Gaps"),
],
direction="horizontal",
),
html.Hr(),
dbc.Stack(
[
html.Div("Horizontal", className=demo_div),
html.Div("Stack", className=demo_div),
html.Div("With", className=demo_div),
html.Div("Gaps", className=demo_div),
html.Div("Horizontal"),
html.Div("Stack"),
html.Div("With"),
html.Div("Gaps"),
],
direction="horizontal",
gap=3,
Expand Down
14 changes: 6 additions & 8 deletions docs/components_page/components/layout/simple_stack.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import dash_bootstrap_components as dbc
from dash import html

demo_div = "bg-primary-subtle border border-primary-subtle p-2"

stack = html.Div(
[
dbc.Stack(
[
html.Div("This stack has no gaps", className=demo_div),
html.Div("Next item", className=demo_div),
html.Div("Last item", className=demo_div),
html.Div("This stack has no gaps"),
html.Div("Next item"),
html.Div("Last item"),
]
),
html.Hr(),
dbc.Stack(
[
html.Div("This stack has gaps", className=demo_div),
html.Div("Next item", className=demo_div),
html.Div("Last item", className=demo_div),
html.Div("This stack has gaps"),
html.Div("Next item"),
html.Div("Last item"),
],
gap=3,
),
Expand Down
15 changes: 6 additions & 9 deletions docs/components_page/components/layout/stack_spacers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,22 @@
[
dbc.Stack(
[
html.Div("Start", className=demo_div),
html.Div("Start"),
html.Div(
"Middle (ms-auto)",
className="ms-auto " + demo_div,
className="ms-auto",
),
html.Div("End", className=demo_div),
html.Div("End"),
],
direction="horizontal",
gap=3,
),
html.Hr(),
dbc.Stack(
[
html.Div("Start", className=demo_div),
html.Div(
"Middle (mx-auto)",
className="mx-auto " + demo_div,
),
html.Div("End", className=demo_div),
html.Div("Start"),
html.Div("Middle (mx-auto)", className="mx-auto"),
html.Div("End"),
],
direction="horizontal",
gap=3,
Expand Down
6 changes: 4 additions & 2 deletions docs/static/docs.css
tcbegley marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ span.hljs-meta {
}

.layout-demo .col > div,
.layout-demo [class*='col-'] > div {
padding: 0.5rem;
.layout-demo [class*='col-'] > div,
.layout-demo .vstack > div,
.layout-demo .hstack > div {
padding: 0.75rem;
background-color: var(--bs-primary-bg-subtle);
border: 1px solid var(--bs-primary-border-subtle);
}
Expand Down
Loading