-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Refactoring module css for PeoplePicker. #1069
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"changes": [{ | ||
"packageName": "office-ui-fabric-react", | ||
"comment": "Update People Picker with module css.", | ||
"type": "patch" | ||
}], | ||
"email": "luh@microsoft.com" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
@import '../../../common/common'; | ||
|
||
:global { | ||
|
||
.ms-PickerPersona-Container { | ||
display: inline-block; | ||
} | ||
|
||
.ms-Picker-MenuItem.ms-result-content{ | ||
display: table-row; | ||
.ms-result-item { | ||
display: table-cell; | ||
vertical-align: bottom; | ||
} | ||
.pickerMenuItem.resultContent { | ||
display: table-row; | ||
.resultItem { | ||
display: table-cell; | ||
vertical-align: bottom; | ||
} | ||
} | ||
|
||
.ms-PeoplePicker-Persona { | ||
width: 180px; | ||
|
||
.ms-Persona-details { | ||
width: 100%; | ||
} | ||
.peoplePickerPersona { | ||
width: 180px; | ||
:global(.ms-Persona-details) { | ||
width: 100%; | ||
} | ||
} | ||
|
||
.ms-PeoplePicker { | ||
.ms-BasePicker-text { | ||
min-height: 40px; | ||
} | ||
.peoplePicker { | ||
:global(.ms-BasePicker-text) { | ||
min-height: 40px; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,35 @@ | ||
@import '../../../../common/common'; | ||
|
||
:global { | ||
.ms-PickerPersona-container { | ||
@include focus-border(); | ||
|
||
display: inline-flex; | ||
align-items: center; | ||
background: $ms-color-neutralLighter; | ||
margin: 1px; | ||
cursor: default; | ||
user-select: none; | ||
max-width: 100%; | ||
|
||
.pickerPersonaContainer { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove everying .pickerPersona or any other block level names. You only need "container", or if there are multiple containers, "personaContainer". CSS modules means everything is scoped to this component already. |
||
@include focus-border(); | ||
display: inline-flex; | ||
align-items: center; | ||
background: $ms-color-neutralLighter; | ||
margin: 1px; | ||
cursor: default; | ||
user-select: none; | ||
max-width: 100%; | ||
&:hover { | ||
background: $ms-color-neutralLight; | ||
} | ||
&.isSelected { | ||
background: $ms-color-neutralQuaternary; | ||
&:hover { | ||
background: $ms-color-neutralLight; | ||
} | ||
|
||
&.is-selected { | ||
background: $ms-color-neutralQuaternary; | ||
&:hover { | ||
background: $ms-color-neutralQuaternaryAlt; | ||
} | ||
} | ||
|
||
.ms-PickerItem-content { | ||
flex: 0 1 auto; | ||
min-width: 0px; | ||
&.ms-Button { | ||
flex: 0 0 auto; | ||
} | ||
background: $ms-color-neutralQuaternaryAlt; | ||
} | ||
|
||
.ms-Persona-details { | ||
flex: 0 1 auto; | ||
} | ||
.pickerItemContent { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. itemContent etc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have updated the PR to address the above comments. Thanks! |
||
flex: 0 1 auto; | ||
min-width: 0px; | ||
&:global(.ms-Button) { | ||
flex: 0 0 auto; | ||
} | ||
} | ||
|
||
.ms-PickerItem-container { | ||
display: inline-block; | ||
.personaDetails { | ||
flex: 0 1 auto; | ||
} | ||
} | ||
|
||
.pickerItemContainer { | ||
display: inline-block; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be just resultContent, or itemResultContent if it needs to be unique.