Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComboBox: Fixed input overlap rendering issue #4102

Merged
merged 3 commits into from
Feb 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "ComboBox: Shortened and centered the input field to account for overlap that appears at some resolutions.",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,9 @@ export const getStyles = memoizeFunction((
borderWidth: '2px',
MsHighContrastAdjust: 'none',
paddingLeft: '11px',
paddingTop: '0',
paddingBottom: '0',
selectors: {
'.ms-ComboBox-Input': {
// ComboBoxHeight is 32, 28 accounts for the 2px borders
height: '28px'
},
'.ms-ComboBox-CaretDown-button': {
// Negative positioning to account for the 2px border
right: '-2px',
Expand All @@ -237,9 +235,9 @@ export const getStyles = memoizeFunction((
boxShadow: 'none',
marginBottom: '10px',
marginLeft: '0',
paddingTop: '0',
paddingTop: '1px', // The 1px padding centers the input field, avoiding overlap in the browser
paddingBottom: '1px',
paddingRight: ComboxBoxCaretDownWidth,
paddingBottom: '0',
paddingLeft: '12px',
color: ComboBoxRootTextColor,
position: 'relative',
Expand Down Expand Up @@ -316,7 +314,7 @@ export const getStyles = memoizeFunction((
input: {
boxSizing: 'border-box',
width: '100%',
height: '30px',
height: '28px',
borderStyle: 'none',
outline: 'none',
font: 'inherit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ exports[`ComboBox Renders ComboBox correctly 1`] = `
margin-left: 0;
outline: 0;
overflow: hidden;
padding-bottom: 0;
padding-bottom: 1px;
padding-left: 12px;
padding-right: 32px;
padding-top: 0;
padding-top: 1px;
position: relative;
text-overflow: ellipsis;
user-select: none;
Expand All @@ -53,10 +53,9 @@ exports[`ComboBox Renders ComboBox correctly 1`] = `
border-color: Highlight;
border-width: 2px;
color: HighlightText;
padding-bottom: 0;
padding-left: 11px;
}
@media screen and (-ms-high-contrast: active){&.is-open .ms-ComboBox-Input {
height: 28px;
padding-top: 0;
}
@media screen and (-ms-high-contrast: active){&.is-open .ms-ComboBox-CaretDown-button {
right: -2px;
Expand All @@ -80,10 +79,9 @@ exports[`ComboBox Renders ComboBox correctly 1`] = `
border-color: Highlight;
border-width: 2px;
color: HighlightText;
padding-bottom: 0;
padding-left: 11px;
}
@media screen and (-ms-high-contrast: active){&:active .ms-ComboBox-Input {
height: 28px;
padding-top: 0;
}
@media screen and (-ms-high-contrast: active){&:active .ms-ComboBox-CaretDown-button {
right: -2px;
Expand All @@ -98,10 +96,9 @@ exports[`ComboBox Renders ComboBox correctly 1`] = `
border-color: Highlight;
border-width: 2px;
color: HighlightText;
padding-bottom: 0;
padding-left: 11px;
}
@media screen and (-ms-high-contrast: active){&:focus .ms-ComboBox-Input {
height: 28px;
padding-top: 0;
}
@media screen and (-ms-high-contrast: active){&:focus .ms-ComboBox-CaretDown-button {
right: -2px;
Expand All @@ -127,7 +124,7 @@ exports[`ComboBox Renders ComboBox correctly 1`] = `
border-style: none;
box-sizing: border-box;
font: inherit;
height: 30px;
height: 28px;
outline: none;
padding-bottom: 0;
padding-left: 0;
Expand Down