Include additional documentation for scrape-examples changes

This commit is contained in:
Will Crichton 2022-12-06 09:34:37 -08:00
parent 4574217074
commit 679d7ea064
2 changed files with 8 additions and 2 deletions

View File

@ -1817,9 +1817,12 @@ in storage.js
/* Should have min-width: (N + 1)px where N is the mobile breakpoint above. */
@media (min-width: 701px) {
/* Places file-link for a scraped example on top of the example to save space.
We only do this on large screens so the file-link doesn't overlap too much
with the example's content. */
.scraped-example-title {
position: absolute;
z-index: 1000;
z-index: 10;
background: var(--main-background-color);
bottom: 8px;
right: 5px;
@ -1915,6 +1918,7 @@ in storage.js
}
.scraped-example {
/* So .scraped-example-title can be positioned absolutely */
position: relative;
}

View File

@ -3,7 +3,9 @@
"use strict";
(function() {
// Number of lines shown when code viewer is not expanded
// Number of lines shown when code viewer is not expanded.
// DEFAULT is the first example shown by default, while HIDDEN is
// the examples hidden beneath the "More examples" toggle.
const DEFAULT_MAX_LINES = 5;
const HIDDEN_MAX_LINES = 10;