components icon indicating copy to clipboard operation
components copied to clipboard

Issue: md-toolbar: unable to alter CSS on first row (auto-generated)

Open Hugmungus opened this issue 10 years ago • 6 comments

Bug, feature request, or proposal:

When using md-toolbar in Angular, it creates the first md-toolbar row automatically. Since there is no tag designation for this in the html, you are unable to alter the CSS for it (ie, change the height)

What is the expected behavior?

You should be able to alter the CSS on every piece of the md-toolbar

What is the current behavior?

What are the steps to reproduce?

Plunker: http://plnkr.co/edit/kP6MYoVdFQlECDX7T7Hs?p=preview

What is the use-case or motivation for changing an existing behavior?

A user will have limited control over the first md-toolbar-row while using this framework

Which versions of Angular, Material, OS, browsers are affected?

Angular2: 2.0.1 Material: 2.0.0-alpha.8-2 Chrome: 53.0.2785.116 m

Is there anything else we should know?

Hugmungus avatar Sep 29 '16 20:09 Hugmungus

@Hugmungus You can use the :host >>> md-toolbar-row selector. Here's a modified plunkr: http://plnkr.co/edit/IWq5nWl4ymU3rR3xKwrH?p=preview

Here's more information about the :host and deep selector if you're interested: https://angular.io/docs/ts/latest/guide/component-styles.html#!#special-selectors

PascalTemel avatar Oct 04 '16 13:10 PascalTemel

Thanks @PascalTemel, that seems to do the trick.

Hugmungus avatar Oct 04 '16 14:10 Hugmungus

@DevVersion we should discuss this a bit

jelbourn avatar Nov 04 '16 01:11 jelbourn

@jelbourn Sounds good. I already have some API ideas, how we could fix this issue and perhaps #1718 as well.

devversion avatar Nov 05 '16 12:11 devversion

I will close that issue in favor of #1718.

devversion avatar Dec 12 '16 18:12 devversion

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.