Skip to content

Commit

Permalink
label alignment style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Donohue authored and Seth Donohue committed Aug 19, 2021
1 parent a5890ed commit 08fb8b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/web-components/src/toolbar/fixtures/toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
</svg>
<style>
fluent-radio-group {
margin: 0;
margin-top: 0;
margin-bottom: 0;
}
fluent-radio {
margin-top: 0;
margin-bottom: 0;
}
</style>

Expand Down Expand Up @@ -133,9 +138,9 @@ <h2>Slotted End Items w/ Min Width</h2>
</fluent-toolbar>
</fluent-design-system-provider>

<h2>Toolbar with slotted label</h2>
<h2>Toolbar with slotted span label</h2>
<fluent-toolbar id="toolbar-slotted-label">
<label slot="label">Slotted label</label>
<span slot="label">Span Label</span>
<button>One</button>
<button>Two</button>
<button>Three</button>
Expand All @@ -158,6 +163,7 @@ <h2>Toolbar with invisible label</h2>

<h2>Vertical orientation</h2>
<fluent-toolbar id="toolbar-vertical-orientation" orientation="vertical">
<span slot="label">Span Label</span>
<button>One</button>
<button>Two</button>
<button>Three</button>
Expand Down Expand Up @@ -195,6 +201,7 @@ <h2>Disabled Elements</h2>
</fluent-toolbar>

<fluent-toolbar id="toolbar-first-two-disabled" orientation="vertical">
<span slot="label">Span Label</span>
<fluent-checkbox disabled>One</fluent-checkbox>
<fluent-checkbox disabled>Two</fluent-checkbox>
<fluent-checkbox>Three</fluent-checkbox>
Expand Down
6 changes: 6 additions & 0 deletions packages/web-components/src/toolbar/toolbar.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const toolbarStyles: (
fill: currentcolor;
padding: var(--toolbar-item-gap);
box-sizing: border-box;
align-items: center;
}
:host(${focusVisible}) {
Expand Down Expand Up @@ -57,6 +58,11 @@ export const toolbarStyles: (
margin: var(--toolbar-item-gap) 0;
}
:host([orientation="vertical"]) {
display: inline-flex;
flex-direction: column;
}
.start,
.end {
display: flex;
Expand Down

0 comments on commit 08fb8b4

Please sign in to comment.