line length
of the commentary column in both modes.Smooth-scale the page in viewports that are between ideal widths for two-column and one-column modes. Scaling starts at the same width as $tools-width into the code column.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam cursus lorem at mi hendrerit pretium. Maecenas ultrices dolor dictum orci lobortis fringilla. Integer ut sem at libero scelerisque commodo quis a dui. Nulla pellentesque, purus non ultricies porta, diam est fringilla orci, dignissim mattis leo erat a urna. Donec fermentum orci nec magna vehicula consectetur. Vivamus a dui eget orci malesuada elementum. Cras tempor mi sit amet ligula mollis porta. Nulla eu purus eget dui aliquet iaculis in quis massa. Phasellus sed lectus ac augue tincidunt blandit. Pellentesque et aliquam neque. Donec faucibus ultricies sem, ut mattis ante consectetur sed. In sollicitudin consectetur nisl, nec malesuada diam dictum ut. Duis feugiat, lorem in pulvinar interdum, nibh turpis lobortis erat, dictum hendrerit massa nibh molestie odio. Ut ultricies, dui a lobortis aliquam, massa diam tempus eros, eu ornare risus mi vitae elit. Integer pretium vulputate eros vitae luctus. Mauris in rhoncus nisi.
As a general tenet, we try to avoid using margins, as they get us into trouble. Pparticularly,
when ensuring that our html
/body
/#document
are full height and do not induce scrolling
unless their content grows past the page.
Conceptually, the layout focuses the user on the commentary first, so we lay out that column.
In two-column mode, the segment is actually shifted over a full column to favor code fragments. We may or may not have either .comment or .code sections, so we need to handle all three cases.
Fit the meta info into the code column
Before we swap over to a single column layout, we scale the page down a little bit in an effort to squeeze some extra life out of it. Scaling starts once the toolbar is flush with the main column
We swap over to the single column layout once we hit the edge of the scaling
Switch modes at a little wider than a full (padded) column
Fit the meta info into on screen, removing any overflow it creates
Nav should be full width in single column mode
In either mode, we need to expand the nav's height when showing the table of contents (we don't want a blank div getting in the way of interaction)
In two-column mode, we slide the table of contents in from the right
In single column mode, we slide in from the left (and also pop the body)
When we switch to the navigation in single column mode, "pop" the body off by sliding it off screen to the right.
By default, all file lists are collapsed.
We only expand direct descendants for files, but outlines are fully expanded from the outset.
Every label gets one, but not all need to display them.
When searching, we only hide labels so that the hierarchy can still be shown to the user
Make sure that we expand to show any matched nodes
Disclosure indicators are confusing when we're searching
We want a bit of depth between the columns, so make the code appear inset
We cheat and use #document to display the shadow
We apply font changes to .wrapper elements so that we do not resize the 'standard' em unit that we are relying on for layout.
Search styling
This isn't the best of signals...
Make sure that our tools are opaque in single column mode so that the transitions aren't distracting
Don't allow mobile WebKit clients to mess with the font size
Replicate the WebKit type="search" appearance in other browsers if they don't have their own search field styling
.wrapper color: #252519
Configuration