From 3db831481471872e7d6976b70fb5a1de7fe6904a Mon Sep 17 00:00:00 2001 From: Jeferson Estevo Date: Wed, 22 Feb 2017 11:51:57 -0300 Subject: [PATCH 1/2] md-select: change the arrow position to absolute so it will not change the final width of md-select --- src/demo-app/select/select-demo.html | 24 ++++++++++++++++++++++++ src/demo-app/select/select-demo.scss | 23 ++++++++++++++++++++++- src/demo-app/select/select-demo.ts | 3 +++ src/lib/select/select.scss | 7 +++++++ 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/demo-app/select/select-demo.html b/src/demo-app/select/select-demo.html index 821934b4b59f..8fe17f460a64 100644 --- a/src/demo-app/select/select-demo.html +++ b/src/demo-app/select/select-demo.html @@ -54,3 +54,27 @@
This div is for testing scrolled selects.
+ + + Inside Simple Flex Layout +
+
+ + {{ starter.viewValue }} + +
+ +
+ + {{ starter.viewValue }} + +
+ +
+ + {{ starter.viewValue }} + A really long name for a pokemon. A pokemon should really be named like that? + +
+
+
\ No newline at end of file diff --git a/src/demo-app/select/select-demo.scss b/src/demo-app/select/select-demo.scss index e7e0649c3a24..c5338a84e2f2 100644 --- a/src/demo-app/select/select-demo.scss +++ b/src/demo-app/select/select-demo.scss @@ -7,4 +7,25 @@ margin: 24px; } -} \ No newline at end of file +} + +.demo-flex-line { + display:flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: stretch; + align-content: stretch; + align-items: stretch; + + .demo-flex-column { + flex-grow: 1; + flex-shrink: 0; + flex-basis: 200px; + } + + md-select { + margin: 10px 0; + width: 100%; + } +} + diff --git a/src/demo-app/select/select-demo.ts b/src/demo-app/select/select-demo.ts index b731087b5624..acb44abc525f 100644 --- a/src/demo-app/select/select-demo.ts +++ b/src/demo-app/select/select-demo.ts @@ -13,6 +13,9 @@ export class SelectDemo { isDisabled = false; showSelect = false; currentDrink: string; + flex1: string; + flex2: string; + flex3: string; latestChangeEvent: MdSelectChange; floatPlaceholder: string = 'auto'; foodControl = new FormControl('pizza-1'); diff --git a/src/lib/select/select.scss b/src/lib/select/select.scss index e024c72e12ec..a1da149c0b70 100644 --- a/src/lib/select/select.scss +++ b/src/lib/select/select.scss @@ -111,12 +111,19 @@ $mat-select-trigger-font-size: 16px !default; } .mat-select-arrow { + position: absolute; + right: 0; width: 0; height: 0; border-left: $mat-select-arrow-size solid transparent; border-right: $mat-select-arrow-size solid transparent; border-top: $mat-select-arrow-size solid; margin: 0 $mat-select-arrow-margin; + + [dir='rtl'] & { + right: auto; + left: 0; + } } .mat-select-panel { From 6abfb7c4345443d61ec72c839269b6bfd1cccfa5 Mon Sep 17 00:00:00 2001 From: Jeferson Estevo Date: Mon, 13 Mar 2017 15:21:01 -0300 Subject: [PATCH 2/2] removing demo for select on flex container --- src/demo-app/select/select-demo.html | 24 ------------------------ src/demo-app/select/select-demo.scss | 21 --------------------- src/demo-app/select/select-demo.ts | 3 --- 3 files changed, 48 deletions(-) diff --git a/src/demo-app/select/select-demo.html b/src/demo-app/select/select-demo.html index a5f2c8bbc68f..f5cddc897323 100644 --- a/src/demo-app/select/select-demo.html +++ b/src/demo-app/select/select-demo.html @@ -85,27 +85,3 @@
This div is for testing scrolled selects.
- - - Inside Simple Flex Layout -
-
- - {{ starter.viewValue }} - -
- -
- - {{ starter.viewValue }} - -
- -
- - {{ starter.viewValue }} - A really long name for a pokemon. A pokemon should really be named like that? - -
-
-
diff --git a/src/demo-app/select/select-demo.scss b/src/demo-app/select/select-demo.scss index c5338a84e2f2..e346f6fe7251 100644 --- a/src/demo-app/select/select-demo.scss +++ b/src/demo-app/select/select-demo.scss @@ -6,26 +6,5 @@ width: 450px; margin: 24px; } - -} - -.demo-flex-line { - display:flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: stretch; - align-content: stretch; - align-items: stretch; - - .demo-flex-column { - flex-grow: 1; - flex-shrink: 0; - flex-basis: 200px; - } - - md-select { - margin: 10px 0; - width: 100%; - } } diff --git a/src/demo-app/select/select-demo.ts b/src/demo-app/select/select-demo.ts index ca22a5537080..04813bdae4e9 100644 --- a/src/demo-app/select/select-demo.ts +++ b/src/demo-app/select/select-demo.ts @@ -16,9 +16,6 @@ export class SelectDemo { showSelect = false; currentDrink: string; currentPokemon: string[]; - flex1: string; - flex2: string; - flex3: string; latestChangeEvent: MdSelectChange; floatPlaceholder: string = 'auto'; foodControl = new FormControl('pizza-1');