Skip to content

Commit

Permalink
fix inline alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilad Gray committed Jun 5, 2018
1 parent afa0836 commit 77e2383
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/components/forms/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ $dark-input-background-color: rgba($black, 0.3) !default;
$dark-input-background-color-disabled: rgba($dark-gray5, 0.5) !default;
$dark-input-shadow-color-focus: $pt-intent-primary !default;

$control-indicator-size: $pt-icon-size-standard !default;
$control-indicator-size-large: $pt-icon-size-large !default;

// avoids edge blurriness for light theme focused default input
// second box-shadow of $pt-input-box-shadow
$input-box-shadow-focus: inset 0 1px 1px rgba($black, $pt-drop-shadow-opacity) !default;
Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/components/forms/_controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
@import "../../common/variables";
@import "../button/common";

$control-indicator-size: $pt-icon-size-standard !default;
$control-indicator-size-large: $pt-icon-size-large !default;

$control-background-color: $button-background-color !default;
$control-background-color-hover: $button-background-color-hover !default;
$control-background-color-active: $button-background-color-active !default;
Expand Down
17 changes: 9 additions & 8 deletions packages/core/src/components/forms/_form-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

@import "../../common/variables";
@import "../../common/mixins";
@import "common";

/*
Form groups
Expand All @@ -11,17 +12,17 @@ Markup:
<div class="#{$ns}-form-group {{.modifier}}">
<label class="#{$ns}-label" for="form-group-input">
Label
<span class="#{$ns}-text-muted">(required)</span>
</label>
<div class="#{$ns}-form-content">
<span class="#{$ns}-text-muted">(required)</span>
</label>
<div class="#{$ns}-form-content">
<div class="#{$ns}-input-group {{.modifier}}">
<span class="#{$ns}-icon #{$ns}-icon-calendar"></span>
<span class="#{$ns}-icon #{$ns}-icon-calendar"></span>
<input id="form-group-input" type="text" {{:modifier}} class="#{$ns}-input"
style="width: 200px;" placeholder="Placeholder text" dir="auto" />
</div>
<div class="#{$ns}-form-helper-text">Please enter a value</div>
</div>
<div class="#{$ns}-form-helper-text">Please enter a value</div>
</div>
</div>
:disabled - Disable the input.
.#{$ns}-disabled - Disabled styles. Input must be disabled separately via attribute.
Expand All @@ -41,7 +42,7 @@ Styleguide form-group
}

.#{$ns}-control {
margin-top: $pt-grid-size / 2;
margin-top: ($pt-input-height - $control-indicator-size) / 2;
}

.#{$ns}-form-helper-text {
Expand All @@ -61,7 +62,7 @@ Styleguide form-group

&.#{$ns}-inline {
flex-direction: row;
align-items: baseline;
align-items: flex-start;

&.#{$ns}-large label.#{$ns}-label {
margin: 0 $pt-grid-size 0 0;
Expand Down

1 comment on commit 77e2383

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix inline alignment

Preview: documentation | landing | table

Please sign in to comment.