Polymer/docs — pull request #836 by jeffposnick (2014-12-16 17:22:05+00:00)
Title: Add support for deep-linking.

@ebidel @arthurevans @robdodson & co.:

This closes #792 with an approach similar to what was implemented for `` in https://github.com/Polymer/core-doc-viewer/pull/26

The main differences in this implementation are:
- Instead of relying on `id` attributes for the anchor identifiers, I'm using a `data-anchor-id` attribute. This makes sure that the special anchor link behavior is only applied to elements that we explicitly expect, and not to random elements generated by the docs that also happen to have `id` attributes.
- Elements with an `data-anchor-id` attribute are clickable, and clicking on them will trigger an update of `window.location.hash`. In order to make this behavior discoverable, I'm setting `cursor: pointer` on those clickable elements, but I'm open to other approaches (e.g. using CSS to insert in some sort of "link" icon or something like that).

If those implementation details sound reasonable, I'll port them to `` as well.

This PR also include some minor style changes that were previously implemented in `` to improve the formatting of some type info.

(Because of [a change](https://github.com/Polymer/context-free-parser/commit/62abb6143d4ee6a952065d827171342e9ffd24ff) to ``, the doc pages for any element that extends another element is currently broken. This breakage is unrelated to this PR and I'm going to file a separate PR with some changes from https://github.com/Polymer/core-doc-viewer/pull/34 to resolve it.)