diff --git a/field/demo/stories.ts b/field/demo/stories.ts index 22e3a46c6d..e28488e990 100644 --- a/field/demo/stories.ts +++ b/field/demo/stories.ts @@ -10,6 +10,7 @@ import '@material/web/field/outlined-field.js'; import {MaterialStoryInit} from './material-collection.js'; import {css, html, nothing} from 'lit'; +import {styleMap} from 'lit/directives/style-map.js'; /** Knob types for field stories. */ export interface StoryKnobs { @@ -62,8 +63,10 @@ const filled: MaterialStoryInit = { html`` : html``; + const styles = {resize: resizable ? 'both' : null}; return html` = { .hasStart=${hasStart} .hasEnd=${hasEnd} .populated=${populated} - .resizable=${resizable} .required=${required} supporting-text=${supportingText} error-text=${errorText} @@ -110,8 +112,10 @@ const outlined: MaterialStoryInit = { disabled} aria-describedby="description">` : html``; + const styles = {resize: resizable ? 'both' : null}; return html` = { .hasStart=${hasStart} .hasEnd=${hasEnd} .populated=${populated} - .resizable=${resizable} .required=${required} supporting-text=${supportingText} error-text=${errorText} diff --git a/field/lib/_shared.scss b/field/lib/_shared.scss index 208a1de90a..0f7ca3da8a 100644 --- a/field/lib/_shared.scss +++ b/field/lib/_shared.scss @@ -49,8 +49,10 @@ position: relative; } - .resizable .container { - resize: both; + .field, + .container-overflow, + .container { + resize: inherit; } .disabled { diff --git a/field/lib/field.ts b/field/lib/field.ts index b715925482..4026d38a73 100644 --- a/field/lib/field.ts +++ b/field/lib/field.ts @@ -20,7 +20,6 @@ export class Field extends LitElement implements SurfacePositionTarget { @property({type: Boolean}) focused = false; @property() label = ''; @property({type: Boolean}) populated = false; - @property({type: Boolean}) resizable = false; @property({type: Boolean}) required = false; @property({attribute: 'supporting-text'}) supportingText = ''; @property({attribute: 'error-text'}) errorText = ''; @@ -104,7 +103,6 @@ export class Field extends LitElement implements SurfacePositionTarget { 'with-start': this.hasStart, 'with-end': this.hasEnd, 'populated': this.populated, - 'resizable': this.resizable, 'required': this.required, 'no-label': !this.label, };