From 4b3d3d5640f4b8e1b6e96cdbff22692dc7714fdd Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Tue, 29 Aug 2017 16:45:11 -0700 Subject: [PATCH] chore: create beta.10 with fix for input width specificity (#6711) --- CHANGELOG.md | 9 +++++++-- package.json | 2 +- src/lib/form-field/_form-field-theme.scss | 6 ++++++ src/lib/form-field/form-field.scss | 1 - 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28c20ed92e65..4e330f4ecb0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ - -# [2.0.0-beta.9 découpage-panjandrum](https://github.com/angular/material2/compare/2.0.0-beta.8...2.0.0-beta.9) (2017-08-29) + +# [2.0.0-beta.10 découpage-panjandrum](https://github.com/angular/material2/compare/2.0.0-beta.8...2.0.0-beta.10) (2017-08-29) ### Highlights * Over 140 bug fixes @@ -43,6 +43,9 @@ still re-exported through `@angular/material`, but these re-exports will be remo subsequent release. * `cdkScrollable`, `ScrollDispatcher`, and `ViewportRuler` have been moved from overlay into its own `scrolling` subpackage in `@angular/cdk`. +* **input:** Inputs have a width of `200px` by default (similar to native input elements). The +width can be overridden by via the `mat-form-field` css class. +* **input:** CSS classes have changed from `mat-input-container-` to `mat-form-field-`. * **input:** `md-prefix` and `md-suffix` are now `mdPrefix` and `mdSuffix`. * **portal:** `TemplatePortal` now requires a generic type (C) to align with `TemplateRef`. This will usually be `any`. @@ -54,6 +57,8 @@ DOM element to `apply`. * **datepicker:** You must now use a date object (of whatever type your DateAdapter uses) rather than a string when setting the value of the datepicker programmatically (through value, ngModel, or formControl). +* **datepicker:** `mdDatepickerToggle` is now an element `` with a `for` +property that points to the `MdDatepicker` instance * **datepicker:** `NativeDateAdapter` will now use Angular's LOCALE_ID instead of the browser's locale. * **sidenav:** CSS classes have changed from `mat-sidenav-` to `mat-drawer-` diff --git a/package.json b/package.json index 311fb94984bf..64d6f1a0de56 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "docs": "gulp docs", "api": "gulp api-docs" }, - "version": "2.0.0-beta.9", + "version": "2.0.0-beta.10", "license": "MIT", "engines": { "node": ">= 5.4.1" diff --git a/src/lib/form-field/_form-field-theme.scss b/src/lib/form-field/_form-field-theme.scss index 8f475fd4f96f..6c3be808cdfd 100644 --- a/src/lib/form-field/_form-field-theme.scss +++ b/src/lib/form-field/_form-field-theme.scss @@ -23,6 +23,12 @@ $underline-color-warn: mat-color($warn); $underline-focused-color: mat-color($primary); + // Define the width here so that it is easier for users to override with one css class worth + // of specificity. + .mat-form-field { + width: 200px; + } + .mat-form-field-placeholder { color: $placeholder-color; } diff --git a/src/lib/form-field/form-field.scss b/src/lib/form-field/form-field.scss index d4e76aedded5..15694919e78f 100644 --- a/src/lib/form-field/form-field.scss +++ b/src/lib/form-field/form-field.scss @@ -11,7 +11,6 @@ $mat-form-field-underline-height: 1px !default; .mat-form-field { display: inline-block; position: relative; - width: 200px; // To avoid problems with text-align. text-align: left;