diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md index 5009fbee2b7f..25b69346a9e7 100644 --- a/CODING_STANDARDS.md +++ b/CODING_STANDARDS.md @@ -43,8 +43,8 @@ if (!$attrs['tabindex']) { For example, rather than doing this: ```html Basic button -FAB -pony +FAB +pony ``` do this: @@ -192,13 +192,13 @@ code organization.** This will allow users to much more easily override styles. For example, rather than doing this: ```scss -md-calendar { +.mat-calendar { display: block; - .md-month { + .mat-month { display: inline-block; - .md-date.md-selected { + .mat-date.mat-selected { font-weight: bold; } } @@ -207,15 +207,15 @@ md-calendar { do this: ```scss -md-calendar { +.mat-calendar { display: block; } -.md-calendar-month { +.mat-calendar-month { display: inline-block; } -.md-calendar-date.md-selected { +.mat-calendar-date.mat-selected { font-weight: bold; } ``` @@ -260,11 +260,11 @@ This is a low-effort task that makes a big difference for low-vision users. Exam When it is not super obvious, include a brief description of what a class represents. For example: ```scss // The calendar icon button used to open the calendar pane. -.md-datepicker-button { ... } +.mat-datepicker-button { ... } // Floating pane that contains the calendar at the bottom of the input. -.md-datepicker-calendar-pane { ... } +.mat-datepicker-calendar-pane { ... } // Portion of the floating panel that sits, invisibly, on top of the input. -.md-datepicker-input-mask { } +.mat-datepicker-input-mask { } ``` diff --git a/e2e/components/menu/menu-page.ts b/e2e/components/menu/menu-page.ts index ffda502eba4f..0d5dc6f82142 100644 --- a/e2e/components/menu/menu-page.ts +++ b/e2e/components/menu/menu-page.ts @@ -3,7 +3,7 @@ import {browser, by, element, ElementFinder} from 'protractor'; export class MenuPage { constructor() { browser.get('/menu'); } - menu(): ElementFinder { return element(by.css('.md-menu-panel')); } + menu(): ElementFinder { return element(by.css('.mat-menu-panel')); } start(): ElementFinder { return element(by.id('start')); } @@ -23,11 +23,11 @@ export class MenuPage { combinedTrigger(): ElementFinder { return element(by.id('combined-t')); } - beforeMenu(): ElementFinder { return element(by.css('.md-menu-panel.before')); } + beforeMenu(): ElementFinder { return element(by.css('.mat-menu-panel.before')); } - aboveMenu(): ElementFinder { return element(by.css('.md-menu-panel.above')); } + aboveMenu(): ElementFinder { return element(by.css('.mat-menu-panel.above')); } - combinedMenu(): ElementFinder { return element(by.css('.md-menu-panel.combined')); } + combinedMenu(): ElementFinder { return element(by.css('.mat-menu-panel.combined')); } getResultText() { return this.textArea().getText(); } } diff --git a/e2e/components/menu/menu.e2e.ts b/e2e/components/menu/menu.e2e.ts index 06c939a79b9d..10e25ef085d2 100644 --- a/e2e/components/menu/menu.e2e.ts +++ b/e2e/components/menu/menu.e2e.ts @@ -4,7 +4,7 @@ import {expectToExist, expectAlignedWith, expectFocusOn, expectLocation} from '. import {pressKeys} from '../../util/actions'; describe('menu', () => { - const menuSelector = '.md-menu-panel'; + const menuSelector = '.mat-menu-panel'; let page: MenuPage; beforeEach(() => page = new MenuPage()); @@ -60,7 +60,7 @@ describe('menu', () => { it('should mirror classes on host to menu template in overlay', () => { page.trigger().click(); page.menu().getAttribute('class').then((classes: string) => { - expect(classes).toContain('md-menu-panel custom'); + expect(classes).toContain('mat-menu-panel custom'); }); }); diff --git a/e2e/components/radio/radio.e2e.ts b/e2e/components/radio/radio.e2e.ts index 09781fbedb92..177423346195 100644 --- a/e2e/components/radio/radio.e2e.ts +++ b/e2e/components/radio/radio.e2e.ts @@ -7,7 +7,7 @@ describe('radio', () => { it('should be checked when clicked', () => { element(by.id('water')).click(); element(by.id('water')).getAttribute('class').then((value: string) => { - expect(value).toContain('md-radio-checked'); + expect(value).toContain('mat-radio-checked'); }); element(by.css('input[id=water-input]')).getAttribute('checked').then((value: string) => { expect(value).toBeTruthy(); @@ -18,7 +18,7 @@ describe('radio', () => { element(by.id('leaf')).click(); element(by.id('leaf')).getAttribute('class').then((value: string) => { - expect(value).toContain('md-radio-checked'); + expect(value).toContain('mat-radio-checked'); }); element(by.css('input[id=leaf-input]')).getAttribute('checked').then((value: string) => { expect(value).toBeTruthy(); @@ -32,7 +32,7 @@ describe('radio', () => { element(by.id('toggle-disable')).click(); element(by.id('water')).click(); element(by.id('water')).getAttribute('class').then((value: string) => { - expect(value).toContain('md-radio-disabled'); + expect(value).toContain('mat-radio-disabled'); }); element(by.css('input[id=water-input]')).getAttribute('disabled').then((value: string) => { expect(value).toBeTruthy(); @@ -40,7 +40,7 @@ describe('radio', () => { element(by.id('leaf')).click(); element(by.id('leaf')).getAttribute('class').then((value: string) => { - expect(value).toContain('md-radio-disabled'); + expect(value).toContain('mat-radio-disabled'); }); element(by.css('input[id=leaf-input]')).getAttribute('disabled').then((value: string) => { expect(value).toBeTruthy(); diff --git a/e2e/components/slide-toggle/slide-toggle.e2e.ts b/e2e/components/slide-toggle/slide-toggle.e2e.ts index 96f839e6e3ef..cd3e168aee5c 100644 --- a/e2e/components/slide-toggle/slide-toggle.e2e.ts +++ b/e2e/components/slide-toggle/slide-toggle.e2e.ts @@ -43,7 +43,7 @@ describe('slide-toggle', () => { it('should move the thumb on state change', () => { let slideToggleEl = getNormalToggle(); - let thumbEl = element(by.css('#normal-slide-toggle .md-slide-toggle-thumb-container')); + let thumbEl = element(by.css('#normal-slide-toggle .mat-slide-toggle-thumb-container')); let previousX = thumbEl.getLocation().then(pos => pos.x); diff --git a/e2e/components/tabs/tabs.e2e.ts b/e2e/components/tabs/tabs.e2e.ts index a8c7c5f72f57..2218b6ad2132 100644 --- a/e2e/components/tabs/tabs.e2e.ts +++ b/e2e/components/tabs/tabs.e2e.ts @@ -10,7 +10,7 @@ describe('tabs', () => { beforeEach(() => { browser.get('/tabs'); tabGroup = element(by.css('md-tab-group')); - tabLabels = element.all(by.css('.md-tab-label')); + tabLabels = element.all(by.css('.mat-tab-label')); tabBodies = element.all(by.css('md-tab-body')); }); @@ -67,12 +67,12 @@ function getFocusStates(elements: ElementArrayFinder) { /** Returns an array of true/false that represents the active states for the provided elements. */ function getLabelActiveStates(elements: ElementArrayFinder) { - return getClassStates(elements, 'md-tab-label-active'); + return getClassStates(elements, 'mat-tab-label-active'); } /** Returns an array of true/false that represents the active states for the provided elements */ function getBodyActiveStates(elements: ElementArrayFinder) { - return getClassStates(elements, 'md-tab-body-active'); + return getClassStates(elements, 'mat-tab-body-active'); } /** diff --git a/src/demo-app/autocomplete/autocomplete-demo.scss b/src/demo-app/autocomplete/autocomplete-demo.scss index 94821e89494d..8b4132523acf 100644 --- a/src/demo-app/autocomplete/autocomplete-demo.scss +++ b/src/demo-app/autocomplete/autocomplete-demo.scss @@ -2,12 +2,12 @@ display: flex; flex-flow: row wrap; - md-card { + .mat-card { width: 400px; margin: 24px; } - md-input-container { + .mat-input-container { margin-top: 16px; } } diff --git a/src/demo-app/baseline/baseline-demo.scss b/src/demo-app/baseline/baseline-demo.scss index 32ba259cffaa..2e25ae8f1518 100644 --- a/src/demo-app/baseline/baseline-demo.scss +++ b/src/demo-app/baseline/baseline-demo.scss @@ -2,7 +2,7 @@ .demo-basic { padding: 0; } -.demo-basic md-card-content { +.demo-basic .mat-card-content { padding: 16px; } .demo-full-width { diff --git a/src/demo-app/card/card-demo.html b/src/demo-app/card/card-demo.html index 1bb780497625..98cc322d20e3 100644 --- a/src/demo-app/card/card-demo.html +++ b/src/demo-app/card/card-demo.html @@ -51,7 +51,7 @@ - + Easily customizable diff --git a/src/demo-app/card/card-demo.scss b/src/demo-app/card/card-demo.scss index e5dfdfce005b..309b1e2d1366 100644 --- a/src/demo-app/card/card-demo.scss +++ b/src/demo-app/card/card-demo.scss @@ -2,7 +2,7 @@ display: flex; flex-flow: column nowrap; - md-card { + .mat-card { margin: 0 16px 16px 0; width: 350px; } @@ -15,7 +15,7 @@ .demo-card-blue { background-color: #b0becc; - md-card-actions { + .mat-card-actions { display: flex; flex-direction: column; } diff --git a/src/demo-app/chips/chips-demo.html b/src/demo-app/chips/chips-demo.html index f6932b772fc9..859d638695f6 100644 --- a/src/demo-app/chips/chips-demo.html +++ b/src/demo-app/chips/chips-demo.html @@ -54,7 +54,7 @@

Stacked Chips

(focus) event to run custom code.

- + {{aColor.name}} diff --git a/src/demo-app/chips/chips-demo.scss b/src/demo-app/chips/chips-demo.scss index d9392867ba1b..c44263807d75 100644 --- a/src/demo-app/chips/chips-demo.scss +++ b/src/demo-app/chips/chips-demo.scss @@ -1,23 +1,23 @@ .chips-demo { - .md-chip-list-stacked { + .mat-chip-list-stacked { display: block; max-width: 200px; } - md-card { + .mat-card { padding: 0; margin: 16px; - & md-toolbar { + & .mat-toolbar { margin: 0; } - & md-card-content { + & .mat-card-content { padding: 24px; } } - .md-basic-chip { + .mat-basic-chip { margin: auto 10px; } } \ No newline at end of file diff --git a/src/demo-app/demo-app/demo-app.scss b/src/demo-app/demo-app/demo-app.scss index dacebc95c957..d1b8650029dd 100644 --- a/src/demo-app/demo-app/demo-app.scss +++ b/src/demo-app/demo-app/demo-app.scss @@ -8,10 +8,10 @@ body { -moz-osx-font-smoothing: grayscale; } - md-sidenav { + .mat-sidenav { min-width: 15%; - [md-button] { + .mat-button { width: 100%; position: relative; bottom: 0; @@ -24,8 +24,8 @@ body { box-sizing: border-box; } - md-toolbar { - md-icon { + .mat-toolbar { + .mat-icon { cursor: pointer; } diff --git a/src/demo-app/grid-list/grid-list-demo.scss b/src/demo-app/grid-list/grid-list-demo.scss index 686a09d7380b..c2d99ad3e12b 100644 --- a/src/demo-app/grid-list/grid-list-demo.scss +++ b/src/demo-app/grid-list/grid-list-demo.scss @@ -1,7 +1,7 @@ .demo-grid-list { width: 1100px; - md-card { + .mat-card { margin: 16px 0; } @@ -9,7 +9,7 @@ margin: 16px; } - .demo-basic-list md-grid-tile { + .demo-basic-list .mat-grid-tile { background: rgba(0, 0, 0, 0.32); } diff --git a/src/demo-app/icon/icon-demo.scss b/src/demo-app/icon/icon-demo.scss index 02af5f002624..b1e8e3b288ab 100644 --- a/src/demo-app/icon/icon-demo.scss +++ b/src/demo-app/icon/icon-demo.scss @@ -1,3 +1,3 @@ -.demo-icon md-icon.green { +.demo-icon .mat-icon.green { color: green; } diff --git a/src/demo-app/input/input-container-demo.scss b/src/demo-app/input/input-container-demo.scss index b70dd6f1e573..5e5a3ef59da3 100644 --- a/src/demo-app/input/input-container-demo.scss +++ b/src/demo-app/input/input-container-demo.scss @@ -1,7 +1,7 @@ .demo-basic { padding: 0; } -.demo-basic md-card-content { +.demo-basic .mat-card-content { padding: 16px; } .demo-full-width { diff --git a/src/demo-app/list/list-demo.scss b/src/demo-app/list/list-demo.scss index 268668fa15d3..bcf8a770c381 100644 --- a/src/demo-app/list/list-demo.scss +++ b/src/demo-app/list/list-demo.scss @@ -3,7 +3,7 @@ display: flex; flex-flow: row wrap; - md-list, md-nav-list { + .mat-list, .mat-nav-list { border: 1px solid rgba(0, 0, 0, 0.12); width: 350px; margin: 20px 20px 0 0; @@ -13,11 +13,11 @@ margin-top: 20px; } - md-icon { + .mat-icon { color: rgba(0, 0, 0, 0.12); } - [md-list-icon] { + .mat-list-icon { color: white; background: rgba(0, 0, 0, 0.3); } diff --git a/src/demo-app/progress-spinner/progress-spinner-demo.html b/src/demo-app/progress-spinner/progress-spinner-demo.html index 91d632210889..64431bf23987 100644 --- a/src/demo-app/progress-spinner/progress-spinner-demo.html +++ b/src/demo-app/progress-spinner/progress-spinner-demo.html @@ -2,7 +2,7 @@

Determinate

+ class="mat-primary">
diff --git a/src/demo-app/progress-spinner/progress-spinner-demo.scss b/src/demo-app/progress-spinner/progress-spinner-demo.scss index 9c2d89b96171..92525a01e5c5 100644 --- a/src/demo-app/progress-spinner/progress-spinner-demo.scss +++ b/src/demo-app/progress-spinner/progress-spinner-demo.scss @@ -1,8 +1,8 @@ .demo-progress-spinner { width: 100%; - md-progress-spinner, - md-spinner { + .mat-progress-spinner, + .mat-spinner { display: inline-block; } diff --git a/src/demo-app/radio/radio-demo.scss b/src/demo-app/radio/radio-demo.scss index af41a95719cd..9a37d4da430a 100644 --- a/src/demo-app/radio/radio-demo.scss +++ b/src/demo-app/radio/radio-demo.scss @@ -8,7 +8,7 @@ margin: 8px; padding: 16px; - md-radio-button { + .mat-radio-button { margin: 8px; } } diff --git a/src/demo-app/select/select-demo.scss b/src/demo-app/select/select-demo.scss index 3594a998b107..e7e0649c3a24 100644 --- a/src/demo-app/select/select-demo.scss +++ b/src/demo-app/select/select-demo.scss @@ -2,7 +2,7 @@ display: flex; flex-flow: row wrap; - md-card { + .mat-card { width: 450px; margin: 24px; } diff --git a/src/demo-app/sidenav/sidenav-demo.html b/src/demo-app/sidenav/sidenav-demo.html index aaeba9c88258..3330798e1ce6 100644 --- a/src/demo-app/sidenav/sidenav-demo.html +++ b/src/demo-app/sidenav/sidenav-demo.html @@ -31,8 +31,8 @@

My Content

- - + + diff --git a/src/demo-app/sidenav/sidenav-demo.scss b/src/demo-app/sidenav/sidenav-demo.scss index 9805892bd0db..a04b3bb58124 100644 --- a/src/demo-app/sidenav/sidenav-demo.scss +++ b/src/demo-app/sidenav/sidenav-demo.scss @@ -1,7 +1,7 @@ .demo-sidenav-container { border: 3px solid black; - .md-sidenav-focus-trap > .cdk-focus-trap-content { + .mat-sidenav-focus-trap > .cdk-focus-trap-content { padding: 10px; } } diff --git a/src/demo-app/tabs/tabs-demo.scss b/src/demo-app/tabs/tabs-demo.scss index e35db93a5045..d10e259e7e5e 100644 --- a/src/demo-app/tabs/tabs-demo.scss +++ b/src/demo-app/tabs/tabs-demo.scss @@ -1,7 +1,7 @@ .demo-nav-bar { border: 1px solid #e0e0e0; margin-bottom: 40px; - [md-tab-nav-bar] { + .mat-tab-nav-bar { background: #f9f9f9; } sunny-routed-content, @@ -15,15 +15,15 @@ .demo-tab-group { border: 1px solid #e0e0e0; margin-bottom: 40px; - .md-tab-header { + .mat-tab-header { background: #f9f9f9; } - .md-tab-body-content { + .mat-tab-body-content { padding: 12px; } } -tabs-demo md-card { +tabs-demo .mat-card { width: 160px; } @@ -32,22 +32,22 @@ tabs-demo md-card { display: flex; width: 100%; - md-tab-group { + .mat-tab-group { min-width: 200px; margin-bottom: 0; flex-grow: 1; } - md-card { + .mat-card { min-width: 160px; margin-right: 16px; - md-checkbox { + .mat-checkbox { display: block; margin-top: 8px; } - md-input-container { + .mat-input-container { width: 100px; } diff --git a/src/demo-app/tooltip/tooltip-demo.scss b/src/demo-app/tooltip/tooltip-demo.scss index 39c9602a9e72..d3ff6bac1a6c 100644 --- a/src/demo-app/tooltip/tooltip-demo.scss +++ b/src/demo-app/tooltip/tooltip-demo.scss @@ -2,7 +2,7 @@ .centered { text-align: center; } - md-radio-button { + .mat-radio-button { display: block; } } diff --git a/src/lib/autocomplete/_autocomplete-theme.scss b/src/lib/autocomplete/_autocomplete-theme.scss index cf5bc6e609a1..7cce6dfe1c56 100644 --- a/src/lib/autocomplete/_autocomplete-theme.scss +++ b/src/lib/autocomplete/_autocomplete-theme.scss @@ -1,17 +1,17 @@ @import '../core/theming/theming'; -@mixin md-autocomplete-theme($theme) { +@mixin mat-autocomplete-theme($theme) { $foreground: map-get($theme, foreground); $background: map-get($theme, background); - .md-autocomplete-panel { - background: md-color($background, card); - color: md-color($foreground, text); + .mat-autocomplete-panel { + background: mat-color($background, card); + color: mat-color($foreground, text); - md-option { - &.md-selected:not(.md-active) { - background: md-color($background, card); - color: md-color($foreground, text); + .mat-option { + &.mat-selected:not(.mat-active) { + background: mat-color($background, card); + color: mat-color($foreground, text); } } } diff --git a/src/lib/autocomplete/autocomplete.html b/src/lib/autocomplete/autocomplete.html index 2d5e9661c483..54c2ad9117cd 100644 --- a/src/lib/autocomplete/autocomplete.html +++ b/src/lib/autocomplete/autocomplete.html @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/src/lib/autocomplete/autocomplete.scss b/src/lib/autocomplete/autocomplete.scss index 7dbf3071febc..69ef00d8b2f5 100644 --- a/src/lib/autocomplete/autocomplete.scss +++ b/src/lib/autocomplete/autocomplete.scss @@ -4,25 +4,25 @@ * The max-height of the panel, currently matching md-select value. * TODO: Check value with MD team. */ -$md-autocomplete-panel-max-height: 256px !default; +$mat-autocomplete-panel-max-height: 256px !default; /** When in "below" position, the panel needs a slight y-offset to ensure the input underline displays. */ -$md-autocomplete-panel-below-offset: 6px !default; +$mat-autocomplete-panel-below-offset: 6px !default; /** When in "above" position, the panel needs a larger y-offset to ensure the label has room to display. */ -$md-autocomplete-panel-above-offset: -24px !default; +$mat-autocomplete-panel-above-offset: -24px !default; -.md-autocomplete-panel { - @include md-menu-base(); +.mat-autocomplete-panel { + @include mat-menu-base(); - max-height: $md-autocomplete-panel-max-height; + max-height: $mat-autocomplete-panel-max-height; position: relative; - &.md-autocomplete-panel-below { - top: $md-autocomplete-panel-below-offset; + &.mat-autocomplete-panel-below { + top: $mat-autocomplete-panel-below-offset; } - &.md-autocomplete-panel-above { - top: $md-autocomplete-panel-above-offset; + &.mat-autocomplete-panel-above { + top: $mat-autocomplete-panel-above-offset; } } \ No newline at end of file diff --git a/src/lib/autocomplete/autocomplete.spec.ts b/src/lib/autocomplete/autocomplete.spec.ts index 57a5e4ca4fb0..25f80a24ee0a 100644 --- a/src/lib/autocomplete/autocomplete.spec.ts +++ b/src/lib/autocomplete/autocomplete.spec.ts @@ -345,11 +345,11 @@ describe('MdAutocomplete', () => { it('should disable input in view when disabled programmatically', () => { const inputUnderline = - fixture.debugElement.query(By.css('.md-input-underline')).nativeElement; + fixture.debugElement.query(By.css('.mat-input-underline')).nativeElement; expect(input.disabled) .toBe(false, `Expected input to start out enabled in view.`); - expect(inputUnderline.classList.contains('md-disabled')) + expect(inputUnderline.classList.contains('mat-disabled')) .toBe(false, `Expected input underline to start out with normal styles.`); fixture.componentInstance.stateCtrl.disable(); @@ -357,7 +357,7 @@ describe('MdAutocomplete', () => { expect(input.disabled) .toBe(true, `Expected input to be disabled in view when disabled programmatically.`); - expect(inputUnderline.classList.contains('md-disabled')) + expect(inputUnderline.classList.contains('mat-disabled')) .toBe(true, `Expected input underline to display disabled styles.`); }); @@ -469,8 +469,8 @@ describe('MdAutocomplete', () => { fixture.detectChanges(); expect(fixture.componentInstance.trigger.activeOption) .toBe(fixture.componentInstance.options.first, 'Expected first option to be active.'); - expect(optionEls[0].classList).toContain('md-active'); - expect(optionEls[1].classList).not.toContain('md-active'); + expect(optionEls[0].classList).toContain('mat-active'); + expect(optionEls[1].classList).not.toContain('mat-active'); fixture.componentInstance.trigger._handleKeydown(DOWN_ARROW_EVENT); @@ -479,8 +479,8 @@ describe('MdAutocomplete', () => { expect(fixture.componentInstance.trigger.activeOption) .toBe(fixture.componentInstance.options.toArray()[1], 'Expected second option to be active.'); - expect(optionEls[0].classList).not.toContain('md-active'); - expect(optionEls[1].classList).toContain('md-active'); + expect(optionEls[0].classList).not.toContain('mat-active'); + expect(optionEls[1].classList).toContain('mat-active'); }); }); }); @@ -498,8 +498,8 @@ describe('MdAutocomplete', () => { fixture.detectChanges(); expect(fixture.componentInstance.trigger.activeOption) .toBe(fixture.componentInstance.options.last, 'Expected last option to be active.'); - expect(optionEls[10].classList).toContain('md-active'); - expect(optionEls[0].classList).not.toContain('md-active'); + expect(optionEls[10].classList).toContain('mat-active'); + expect(optionEls[0].classList).not.toContain('mat-active'); fixture.componentInstance.trigger._handleKeydown(DOWN_ARROW_EVENT); @@ -508,8 +508,8 @@ describe('MdAutocomplete', () => { expect(fixture.componentInstance.trigger.activeOption) .toBe(fixture.componentInstance.options.first, 'Expected first option to be active.'); - expect(optionEls[0].classList).toContain('md-active'); - expect(optionEls[10].classList).not.toContain('md-active'); + expect(optionEls[0].classList).toContain('mat-active'); + expect(optionEls[10].classList).not.toContain('mat-active'); }); }); }); @@ -535,8 +535,8 @@ describe('MdAutocomplete', () => { expect(fixture.componentInstance.trigger.activeOption) .toBe(fixture.componentInstance.options.first, 'Expected first option to be active.'); - expect(optionEls[0].classList).toContain('md-active'); - expect(optionEls[1].classList).not.toContain('md-active'); + expect(optionEls[0].classList).toContain('mat-active'); + expect(optionEls[1].classList).not.toContain('mat-active'); }); }); }); @@ -607,7 +607,7 @@ describe('MdAutocomplete', () => { it('should scroll to active options below the fold', async(() => { fixture.whenStable().then(() => { - const scrollContainer = document.querySelector('.cdk-overlay-pane .md-autocomplete-panel'); + const scrollContainer = document.querySelector('.cdk-overlay-pane .mat-autocomplete-panel'); fixture.componentInstance.trigger._handleKeydown(DOWN_ARROW_EVENT); fixture.detectChanges(); @@ -646,7 +646,7 @@ describe('MdAutocomplete', () => { fixture.componentInstance.trigger.openPanel(); fixture.detectChanges(); - const panel = fixture.debugElement.query(By.css('.md-autocomplete-panel')).nativeElement; + const panel = fixture.debugElement.query(By.css('.mat-autocomplete-panel')).nativeElement; expect(panel.getAttribute('role')) .toEqual('listbox', 'Expected role of the panel to be listbox.'); @@ -709,7 +709,7 @@ describe('MdAutocomplete', () => { fixture.componentInstance.trigger.openPanel(); fixture.detectChanges(); - const panel = fixture.debugElement.query(By.css('.md-autocomplete-panel')).nativeElement; + const panel = fixture.debugElement.query(By.css('.mat-autocomplete-panel')).nativeElement; expect(input.getAttribute('aria-owns')) .toEqual(panel.getAttribute('id'), 'Expected aria-owns to match attached autocomplete.'); @@ -734,7 +734,7 @@ describe('MdAutocomplete', () => { fixture.detectChanges(); const inputBottom = input.getBoundingClientRect().bottom; - const panel = overlayContainerElement.querySelector('.md-autocomplete-panel'); + const panel = overlayContainerElement.querySelector('.mat-autocomplete-panel'); const panelTop = panel.getBoundingClientRect().top; // Panel is offset by 6px in styles so that the underline has room to display. @@ -753,7 +753,7 @@ describe('MdAutocomplete', () => { fixture.detectChanges(); const inputTop = input.getBoundingClientRect().top; - const panel = overlayContainerElement.querySelector('.md-autocomplete-panel'); + const panel = overlayContainerElement.querySelector('.mat-autocomplete-panel'); const panelBottom = panel.getBoundingClientRect().bottom; // Panel is offset by 24px in styles so that the label has room to display. @@ -777,7 +777,7 @@ describe('MdAutocomplete', () => { fixture.detectChanges(); const inputTop = input.getBoundingClientRect().top; - const panel = overlayContainerElement.querySelector('.md-autocomplete-panel'); + const panel = overlayContainerElement.querySelector('.mat-autocomplete-panel'); const panelBottom = panel.getBoundingClientRect().bottom; // Panel is offset by 24px in styles so that the label has room to display. diff --git a/src/lib/autocomplete/autocomplete.ts b/src/lib/autocomplete/autocomplete.ts index a77b4f2372bf..ff9af9688ffd 100644 --- a/src/lib/autocomplete/autocomplete.ts +++ b/src/lib/autocomplete/autocomplete.ts @@ -24,7 +24,10 @@ export type AutocompletePositionY = 'above' | 'below'; templateUrl: 'autocomplete.html', styleUrls: ['autocomplete.css'], encapsulation: ViewEncapsulation.None, - exportAs: 'mdAutocomplete' + exportAs: 'mdAutocomplete', + host: { + '[class.mat-autocomplete]': 'true' + } }) export class MdAutocomplete { @@ -54,8 +57,8 @@ export class MdAutocomplete { /** Sets a class on the panel based on its position (used to set y-offset). */ _getPositionClass() { return { - 'md-autocomplete-panel-below': this.positionY === 'below', - 'md-autocomplete-panel-above': this.positionY === 'above' + 'mat-autocomplete-panel-below': this.positionY === 'below', + 'mat-autocomplete-panel-above': this.positionY === 'above' }; } diff --git a/src/lib/button-toggle/_button-toggle-theme.scss b/src/lib/button-toggle/_button-toggle-theme.scss index e46e437518a5..995677eac65e 100644 --- a/src/lib/button-toggle/_button-toggle-theme.scss +++ b/src/lib/button-toggle/_button-toggle-theme.scss @@ -2,21 +2,21 @@ @import '../core/theming/theming'; -@mixin md-button-toggle-theme($theme) { +@mixin mat-button-toggle-theme($theme) { $foreground: map-get($theme, foreground); $background: map-get($theme, background); - md-button-toggle { - color: md-color($foreground, hint-text); + .mat-button-toggle { + color: mat-color($foreground, hint-text); } - .md-button-toggle-checked { - background-color: md-color($md-grey, 300); - color: md-color($foreground, base); + .mat-button-toggle-checked { + background-color: mat-color($mat-grey, 300); + color: mat-color($foreground, base); } - .md-button-toggle-disabled { - background-color: map_get($md-grey, 200); - color: md-color($foreground, disabled-button); + .mat-button-toggle-disabled { + background-color: map_get($mat-grey, 200); + color: mat-color($foreground, disabled-button); } } diff --git a/src/lib/button-toggle/button-toggle.html b/src/lib/button-toggle/button-toggle.html index 60cccfd2e44a..face84340cfa 100644 --- a/src/lib/button-toggle/button-toggle.html +++ b/src/lib/button-toggle/button-toggle.html @@ -1,5 +1,5 @@ -