Skip to content
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": "Fix style and alignment issues with DetailsList headers",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "tmichon@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ $menuHeaderColor: "[theme:menuHeader, default: #0078d4]";
/* Lists */
$listBackgroundColor: "[theme:listBackground, default: #ffffff]";
$listTextColor: "[theme:listText, default: #333333]";
$listItemHeaderHoveredColor: "[theme:listItemHeaderHovered, default: #f4f4f4]";
$listItemHeaderActivatedColor: "[theme:listItemActivatedHovered, default: #eaeaea]";
$listItemBackgroundHoveredColor: "[theme:listItemBackgroundHovered, default: #f8f8f8]";
$listItemBackgroundCheckedColor: "[theme:listItemBackgroundChecked, default: #eaeaea]";
$listItemBackgroundCheckedHoveredColor: "[theme:listItemBackgroundCheckedHovered, default: #d0d0d0]";
$listItemBackgroundCheckedHoveredColor: "[theme:listItemBackgroundCheckedHovered, default: #d0d0d0]";
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ $isPaddedMargin: 24px;

&:hover {
color: $bodyTextColor;
background: $bodyBackgroundColor;
background: $listItemHeaderHoveredColor;
}

&:active {
background: $listItemBackgroundHoveredColor;
background: $listItemHeaderActivatedColor;
}
}

Expand Down Expand Up @@ -161,16 +161,23 @@ $isPaddedMargin: 24px;
}

.cellTitle {
display: block;
display: inline-flex;
flex-direction: row;
justify-content: flex-start;
align-items: stretch;
box-sizing: border-box;
overflow: hidden;
@include focus-border($position: absolute);
top: 0;
left: 0;
bottom: 0;
right: 0;
max-width: 100%;
@include focus-border($position: auto);
padding: 0 8px;
}

.cellName {
flex: 1 1 auto;
overflow: hidden;
text-overflow: ellipsis;
}

:global(.ms-TooltipHost).checkTooltip {
display: block;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export class DetailsHeader extends BaseComponent<IDetailsHeaderProps, IDetailsHe
className={ css('ms-DetailsHeader-cellTitle', styles.cellTitle) }
data-is-focusable={ column.columnActionsMode !== ColumnActionsMode.disabled }
role={ column.columnActionsMode !== ColumnActionsMode.disabled ? 'button' : undefined }
aria-describedby={ `${this._id}-${column.key}-tooltip` }
aria-describedby={ this.props.onRenderColumnHeaderTooltip ? `${this._id}-${column.key}-tooltip` : undefined }
onContextMenu={ this._onColumnContextMenu.bind(this, column) }
onClick={ this._onColumnClick.bind(this, column) }
aria-haspopup={ column.columnActionsMode === ColumnActionsMode.hasDropdown }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ exports[`DetailsHeader can render 1`] = `
className=""
>
<span
aria-describedby="header0-a-tooltip"
aria-describedby={undefined}
aria-haspopup={false}
aria-label={undefined}
aria-labelledby="header0-a-name "
Expand Down Expand Up @@ -183,7 +183,7 @@ exports[`DetailsHeader can render 1`] = `
className=""
>
<span
aria-describedby="header0-b-tooltip"
aria-describedby={undefined}
aria-haspopup={false}
aria-label={undefined}
aria-labelledby="header0-b-name "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ exports[`DetailsList renders List correctly 1`] = `
className=""
>
<span
aria-describedby="header0-key-tooltip"
aria-describedby={undefined}
aria-haspopup={false}
aria-label={undefined}
aria-labelledby="header0-key-name "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class DetailsListDocumentsExample extends React.Component<any, IDetailsLi
fieldName: 'name',
minWidth: 16,
maxWidth: 16,
onColumnClick: this._onColumnClick,
onRender: (item: IDocument) => {
return (
<img
Expand Down