Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Design Update for Table of Contents:
- Change document counts to be a single row.
- Reduce count sizes.
- Increase width of panel.
- Rename "word count" to just "words".
  • Loading branch information
mtias committed Jan 4, 2018
commit cce5946119ef3eae8303af0410a114b95d9186e2
10 changes: 5 additions & 5 deletions editor/components/table-of-contents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ function TableOfContents( { blocks } ) {
<div key="counts" className="table-of-contents__counts">
<div className="table-of-contents__count">
<WordCount />
{ __( 'Word Count' ) }
</div>
<div className="table-of-contents__count">
<span className="table-of-contents__number">{ blocks.length }</span>
{ __( 'Blocks' ) }
{ __( 'Words' ) }
</div>
<div className="table-of-contents__count">
<span className="table-of-contents__number">{ headings.length }</span>
Expand All @@ -55,6 +51,10 @@ function TableOfContents( { blocks } ) {
<span className="table-of-contents__number">{ paragraphs.length }</span>
{ __( 'Paragraphs' ) }
</div>
<div className="table-of-contents__count">
<span className="table-of-contents__number">{ blocks.length }</span>
{ __( 'Blocks' ) }
</div>
</div>,
headings.length > 0 && (
<div key="headings">
Expand Down
27 changes: 20 additions & 7 deletions editor/components/table-of-contents/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
.table-of-contents__popover .components-popover__content {
padding: 16px;
.table-of-contents__popover.components-popover:not(.is-mobile) .components-popover__content {
min-width: 380px;
}

.table-of-contents__popover {
.components-popover__content {
padding: 16px;
}

hr {
margin: 0 -16px;
}
}

.table-of-contents__counts {
Expand All @@ -9,18 +19,21 @@
}

.table-of-contents__count {
width: 50%;
width: 25%;
display: flex;
flex-direction: column;
margin-bottom: 10px;
font-size: 12px;
color: $dark-gray-300;
}

.table-of-contents__number,
.table-of-contents__popover .word-count {
font-size: 40px;
font-weight: 100;
line-height: 50px;
color: $dark-gray-300;
font-size: 21px;
font-weight: 400;
line-height: 30px;
color: $dark-gray-500;
order: 2;
}

.table-of-contents__title {
Expand Down