Skip to content

Commit

Permalink
fix(tabs): ensure tabs has layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Jul 19, 2021
1 parent 11b5f90 commit 7aba515
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 12 additions & 0 deletions packages/tabs/src/tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ governing permissions and limitations under the License.

@import './spectrum-tabs.css';

:host {
display: grid;
}

:host([direction^='vertical']) {
grid-template-columns: auto 1fr;
}

#list {
justify-content: var(--swc-tabs-list-justify-content);
}

/*
* While https://github.com/adobe/spectrum-css/issues/641 goes unaddressed,
* then we'll need to place this at `top: 0;` ourselves.
Expand Down
6 changes: 2 additions & 4 deletions packages/tabs/stories/tabs.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ export const VerticalSized = (args: Properties): TemplateResult => {
<style>
sp-tabs {
height: 75vh;
flex-direction: column;
justify-content: center;
--swc-tabs-list-justify-content: center;
}
</style>
<sp-tabs
Expand All @@ -149,8 +148,7 @@ export const VerticalRight = (args: Properties): TemplateResult => {
<style>
sp-tabs {
height: 75vh;
flex-direction: column;
justify-content: center;
--swc-tabs-list-justify-content: center;
}
</style>
<sp-tabs
Expand Down

0 comments on commit 7aba515

Please sign in to comment.