Skip to content

Don't make the toolbar stands out of its parent #126

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

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions packages/components/src/toolbar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
StartEnd,
StartEndOptions,
applyMixins,
composedParent,
getDirection,
toolbarTemplate as template
} from '@microsoft/fast-foundation';
Expand All @@ -26,8 +25,6 @@ import {
limit
} from '@microsoft/fast-web-utilities';
import { isFocusable } from 'tabbable';
import { Swatch } from '../color/swatch.js';
import { fillColor, neutralFillLayerRecipe } from '../design-tokens.js';
import { toolbarStyles as styles } from './toolbar.styles.js';

/**
Expand Down Expand Up @@ -394,23 +391,7 @@ applyMixins(FoundationToolbar, StartEnd, DelegatesARIAToolbar);
* @public
* @tagname jp-toolbar
*/
export class Toolbar extends FoundationToolbar {
connectedCallback() {
super.connectedCallback();

const parent = composedParent(this);

if (parent) {
fillColor.setValueFor(
this,
(target: HTMLElement): Swatch =>
neutralFillLayerRecipe
.getValueFor(target)
.evaluate(target, fillColor.getValueFor(parent))
);
}
}
}
export class Toolbar extends FoundationToolbar {}

/**
* A function that returns a {@link @microsoft/fast-foundation#Toolbar} registration for configuring the component with a DesignSystem.
Expand Down
Loading