Skip to content

Commit f0be7ba

Browse files
add 'small' setting
1 parent beffc47 commit f0be7ba

9 files changed

Lines changed: 84 additions & 6 deletions

File tree

src/mm-button/doc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"description":"instructs the component to be displayed at a predetermined size (i.e. - 'normal' or 'large')",
5151
"optional":true,
5252
"default":"none",
53-
"options":["normal","large"],
53+
"options":["normal","large","small"],
5454
"reflect":true
5555
}
5656
]

src/mm-dropdown/doc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@
8383
"default":"none",
8484
"attribute": "N/A",
8585
"readOnly": true
86+
},
87+
{
88+
"name":"size",
89+
"type":"String",
90+
"description":"instructs the component to be displayed at a predetermined size (i.e. - 'normal' or 'large')",
91+
"optional":true,
92+
"default":"none",
93+
"options":["normal","large", "small"],
94+
"reflect":true
8695
}
8796
],
8897
"methods": [

src/mm-dropdown/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
<hr/>
238238

239239
<p><span class="bold">Dropdown:</span> List with overflow: overflowWidth set</p>
240-
<mm-dropdown placeholder="Select One Please" overflow="visible">
240+
<mm-dropdown placeholder="Select One Please" overflow="visible" size="small">
241241
<mm-list-item unresolved>mm-list-item with an exremely long label or name in here 00</mm-list-item>
242242
<mm-list-item unresolved>mm-list-item with an exremely long label or name in here 01</mm-list-item>
243243
<mm-list-item unresolved>mm-list-item with an exremely long label or name in here 02</mm-list-item>

src/mm-dropdown/mm-dropdown.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
notify: true,
7171
observer: '_dataChanged'
7272
},
73+
size: {
74+
type: String,
75+
reflectToAttribute: true
76+
},
7377
_layout: String
7478
},
7579

src/mm-input/doc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"description":"instructs the component to be displayed at a predetermined size (i.e. - 'normal' or 'large')",
9595
"optional":true,
9696
"default":"none",
97-
"options":["normal","large"],
97+
"options":["normal","large", "small"],
9898
"reflect":true
9999
}
100100
],

src/mm-input/mm-input.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,13 @@
134134
line-height: 2.231em !important;
135135
padding: 0 10px;
136136
}
137+
}
138+
139+
:host([size='small']){
140+
.text-input {
141+
height: 20px !important;
142+
font-size: 11px !important;
143+
line-height: 1.250em !important;
144+
padding: 0 7px;
145+
}
137146
}

src/shared/sass/_button.scss

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,34 @@
171171
:host([size='large']){
172172
.button {
173173
height: 46px !important;
174-
font-size: 15px !important;
175174
padding: 0 15px;
175+
176+
& > ::content label {
177+
font-size: 15px !important;
178+
line-height: 45px !important;
179+
}
176180
}
177181
}
178182

179183
:host([size='normal']){
180184
.button {
181185
height: 29px !important;
182-
font-size: 13px !important;
183186
padding: 0 10px;
187+
188+
& > ::content label {
189+
@include buttonFont();
190+
}
191+
}
192+
}
193+
194+
:host([size='small']){
195+
.button {
196+
height: 20px !important;
197+
padding: 0 7px;
198+
199+
& > ::content label {
200+
font-size: 11px!important;
201+
line-height: 19px !important;
202+
}
184203
}
185204
}

src/shared/sass/_dropdown.scss

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,40 @@ $border-color: $color-A18 !default;
9494
overflow-y: auto;
9595
}
9696
}
97+
98+
// support multiple size configurations
99+
:host([size='large']){
100+
.button {
101+
height: 46px !important;
102+
padding: 0 32px 0 15px;
103+
104+
label {
105+
font-size: 15px !important;
106+
line-height: 45px !important;
107+
}
108+
}
109+
}
110+
111+
:host([size='normal']){
112+
.button {
113+
height: 29px !important;
114+
padding: 0 32px 0 10px;
115+
116+
label {
117+
font-size: 13px!important;
118+
line-height: 28px !important;
119+
}
120+
}
121+
}
122+
123+
:host([size='small']){
124+
.button {
125+
height: 20px !important;
126+
padding: 0 32px 0 7px;
127+
128+
label {
129+
font-size: 11px!important;
130+
line-height: 19px !important;
131+
}
132+
}
133+
}

src/shared/sass/_mixins.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
@mixin buttonFont() {
1111
font-family: "Arimo", sans-serif;
12-
@include fontSmoothing();
1312
font-weight: 700;
1413
font-size: 13px!important;
1514
line-height: 28px !important;
15+
@include fontSmoothing();
1616
}
1717

1818
// fix for google's fit behavior

0 commit comments

Comments
 (0)