diff --git a/common/changes/textfield-text-fixes_2017-05-01-15-56.json b/common/changes/textfield-text-fixes_2017-05-01-15-56.json new file mode 100644 index 00000000000000..1072968837fb0e --- /dev/null +++ b/common/changes/textfield-text-fixes_2017-05-01-15-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "TextField: Fixed bugs in textfield font family and focus borders", + "type": "patch" + } + ], + "email": "micahgodbolt@gmail.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/TextField/TextField.scss b/packages/office-ui-fabric-react/src/components/TextField/TextField.scss index 298b70332e9332..e44177a8bebad0 100644 --- a/packages/office-ui-fabric-react/src/components/TextField/TextField.scss +++ b/packages/office-ui-fabric-react/src/components/TextField/TextField.scss @@ -85,11 +85,11 @@ border-color: $ms-color-neutralSecondaryAlt; } - &:focus { + &.fieldGroupIsFocused { border-color: $ms-color-themePrimary; } &:hover, - &:focus { + &.fieldGroupIsFocused { @media screen and (-ms-high-contrast: active) { border-color: $ms-color-contrastBlackSelected; } @@ -116,14 +116,20 @@ } .field { + @include ms-u-normalize; + @include ms-baseFont; border-radius: 0; border: none; color: $ms-color-neutralPrimary; @include padding(0, 12px, 0, 12px); width: 100%; - outline: 0; text-overflow: ellipsis; - + outline: 0; + &:active, + &:focus, + &:hover { + outline: 0; + } &.hasIcon { @include padding-right(24px); } @@ -169,11 +175,6 @@ } } - &:active, - &:focus { - border-color: $ms-color-themePrimary; - } - :global(.ms-Label) { font-size: $ms-font-size-m; @include margin-right(8px); @@ -186,11 +187,6 @@ flex: 1 1 0; border: 0; @include text-align(left); - &:active, - &:focus, - &:hover { - outline: 0; - } } &.rootIsDisabled { diff --git a/packages/office-ui-fabric-react/src/components/TextField/TextField.tsx b/packages/office-ui-fabric-react/src/components/TextField/TextField.tsx index 6ebac0170d5c09..b49d666d89bbac 100644 --- a/packages/office-ui-fabric-react/src/components/TextField/TextField.tsx +++ b/packages/office-ui-fabric-react/src/components/TextField/TextField.tsx @@ -147,7 +147,7 @@ export class TextField extends BaseComponent i return (
{ label && } -
+
{ (addonString !== undefined || this.props.onRenderAddon) && (
{ onRenderAddon(this.props, this._onRenderAddon) }