Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2d8f42d

Browse files
committedMay 22, 2023
Bring back sizes mistakenly removed from InputGroup to fix label alignment in horizontal layout
1 parent cfacdbc commit 2d8f42d

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed
 

‎src/lib/components/InputGroup/InputGroup.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
@use "../../styles/tools/form-fields/box-field-elements";
66
@use "../../styles/tools/form-fields/box-field-layout";
7+
@use "../../styles/tools/form-fields/box-field-sizes";
78
@use "../../styles/tools/form-fields/foundation";
89
@use "../../styles/tools/form-fields/variants";
910
@use "../../styles/tools/accessibility";
@@ -65,3 +66,16 @@
6566
.isRootInFormLayout {
6667
@include box-field-layout.in-form-layout();
6768
}
69+
70+
// Sizes
71+
.isRootSizeSmall {
72+
@include box-field-sizes.size(small, $has-input: false);
73+
}
74+
75+
.isRootSizeMedium {
76+
@include box-field-sizes.size(medium, $has-input: false);
77+
}
78+
79+
.isRootSizeLarge {
80+
@include box-field-sizes.size(large, $has-input: false);
81+
}
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
@use "sass:map";
22
@use "../../theme/form-fields" as theme;
33

4-
@mixin size($size, $is-multiline: false) {
4+
@mixin size($size, $has-input: true, $is-multiline: false) {
55
$size-properties: map.get(theme.$box-sizes, $size);
66

77
--rui-local-padding-y: #{map.get($size-properties, padding-y)};
88
--rui-local-padding-x: #{map.get($size-properties, padding-x)};
9-
--rui-local-font-size: #{map.get($size-properties, font-size)};
109

11-
.input {
12-
@if $is-multiline {
13-
height: auto;
14-
min-height: map.get($size-properties, height);
15-
} @else {
16-
--rui-local-height: #{map.get($size-properties, height)};
10+
@if $has-input {
11+
--rui-local-font-size: #{map.get($size-properties, font-size)};
12+
13+
.input {
14+
@if $is-multiline {
15+
height: auto;
16+
min-height: map.get($size-properties, height);
17+
} @else {
18+
--rui-local-height: #{map.get($size-properties, height)};
19+
}
1720
}
1821
}
1922
}

0 commit comments

Comments
 (0)
Please sign in to comment.