From 5c4dc049f48c113c223ffdfdab144980d40a09bc Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Mon, 13 Jun 2016 20:46:04 +0200 Subject: [PATCH] fix(toolbar): disable view encapsulation. (#678) * Disables the view encapsulation for the toolbar component. To be consistent with other components and simplify custom styling. Fixes #676. --- src/components/toolbar/toolbar.scss | 2 +- src/components/toolbar/toolbar.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/toolbar/toolbar.scss b/src/components/toolbar/toolbar.scss index 3bcb814c1a2..28bda539d58 100644 --- a/src/components/toolbar/toolbar.scss +++ b/src/components/toolbar/toolbar.scss @@ -11,7 +11,7 @@ $md-toolbar-padding: 16px !default; color: md-color($palette, default-contrast); } -:host { +md-toolbar { display: flex; box-sizing: border-box; diff --git a/src/components/toolbar/toolbar.ts b/src/components/toolbar/toolbar.ts index a0353b30fb3..35d710f6df6 100644 --- a/src/components/toolbar/toolbar.ts +++ b/src/components/toolbar/toolbar.ts @@ -1,7 +1,8 @@ import { Component, ChangeDetectionStrategy, - Input + Input, + ViewEncapsulation } from '@angular/core'; import {Renderer} from '@angular/core'; import {ElementRef} from '@angular/core'; @@ -12,6 +13,7 @@ import {ElementRef} from '@angular/core'; templateUrl: 'toolbar.html', styleUrls: ['toolbar.css'], changeDetection: ChangeDetectionStrategy.OnPush, + encapsulation: ViewEncapsulation.None }) export class MdToolbar {