Fix cheatsheet style on small screens
This commit is contained in:
parent
71ead5abb7
commit
04e1c1b0b1
|
@ -1,17 +1,17 @@
|
|||
{:.postcard-grammar}
|
||||
{:.postcard-grammar.textsyntax}
|
||||
| *Document* | := | *Value* **ws** |
|
||||
| *Value* | := | **ws** (*Record* | *Collection* | *Atom* | *Embedded* | *Annotated*) |
|
||||
| *Collection* | := | *Sequence* | *Dictionary* | *Set* |
|
||||
| *Atom* | := | *Boolean* | *ByteString* | *String* | *QuotedSymbol* | *Symbol* | *Number* |
|
||||
| **ws** | := | (**space** | **tab** | **cr** | **lf** |`,`)<sup>⋆</sup> |
|
||||
|
||||
{:.postcard-grammar}
|
||||
{:.postcard-grammar.textsyntax}
|
||||
| *Record* | := | `<`*Value*<sup>+</sup> **ws**`>` |
|
||||
| *Sequence* | := | `[`*Value*<sup>⋆</sup> **ws**`]` |
|
||||
| *Dictionary* | := | `{` (*Value* **ws**`:`*Value*)<sup>⋆</sup> **ws**`}` |
|
||||
| *Set* | := | `#{`*Value*<sup>⋆</sup> **ws**`}` |
|
||||
|
||||
{:.postcard-grammar}
|
||||
{:.postcard-grammar.textsyntax}
|
||||
| *Boolean* | := | `#t`|`#f` |
|
||||
| *ByteString* | := | `#"`*binchar*<sup>⋆</sup> `"`|`#x"` (**ws** *hex* *hex*)<sup>⋆</sup> **ws**`"`|`#[` (**ws** | *base64char*)<sup>⋆</sup> **ws**`]` |
|
||||
| *String* | := | `"` (« any unicode scalar value except `\` or `"` » | *escaped* |`\"`)<sup>⋆</sup> `"` |
|
||||
|
@ -22,12 +22,12 @@
|
|||
| *Double* | := | *flt* |`#xd"` (**ws** *hex* *hex*)<sup>8</sup> **ws**`"` |
|
||||
| *SignedInteger* | := | *int* |
|
||||
|
||||
{:.postcard-grammar}
|
||||
{:.postcard-grammar.textsyntax}
|
||||
| *Embedded* | := | `#!`*Value* |
|
||||
| *Annotated* | := | *Annotation* *Value* |
|
||||
| *Annotation* | := | `@`*Value* |`;`« any unicode scalar value except **cr** or **lf** »<sup>⋆</sup> (**cr** | **lf**) |
|
||||
|
||||
{:.postcard-grammar}
|
||||
{:.postcard-grammar.textsyntax}
|
||||
| *escaped* | := | `\\`|`\/`|`\b`|`\f`|`\n`|`\r`|`\t`|`\u`*hex* *hex* *hex* *hex* |
|
||||
| *binchar* | := | *binunescaped* | (*escaped* |`\"`|`\x`*hex* *hex*) |
|
||||
| *binunescaped* | := | « any unicode scalar value ≥32 and ≤126, except `\` or `"` » |
|
||||
|
@ -35,7 +35,7 @@
|
|||
| *sympunct* | := | `~`|`!`|`$`|`%`|`^`|`&`|`*`|`?`|`_`|`=`|`+`|`-`|`/`|`.` |
|
||||
| *symuchar* | := | « any scalar value ≥128 whose Unicode category is Lu, Ll, Lt, Lm, Lo, Mn, Mc, Me, Nd, Nl, No, Pc, Pd, Po, Sc, Sm, Sk, So, or Co » |
|
||||
|
||||
{:.postcard-grammar}
|
||||
{:.postcard-grammar.textsyntax}
|
||||
| *flt* | := | *int* ( *frac* *exp* | *frac* | *exp* ) |
|
||||
| *int* | := | (`-`|`+`) (`0`..`9`)<sup>+</sup> |
|
||||
| *frac* | := | `.` (`0`..`9`)<sup>+</sup> |
|
||||
|
|
|
@ -184,19 +184,24 @@ td {
|
|||
font-family: var(--sans-font);
|
||||
font-size: 1rem;
|
||||
color: #888;
|
||||
line-height: 1.414rem;
|
||||
line-height: 141.4%;
|
||||
}
|
||||
table.postcard-grammar { background: #e9f0f9; }
|
||||
@media screen and (max-width: 768px) { table.postcard-grammar { font-size: 0.75rem; } }
|
||||
.postcard-grammar.binarysyntax { color: black; }
|
||||
.postcard-grammar tr > *:nth-child(1) { width: 7em; text-align: right; }
|
||||
.postcard-grammar.binarysyntax tr > *:nth-child(1) { width: 13em; text-align: right; }
|
||||
.postcard-grammar tr > *:nth-child(1) { text-align: right; }
|
||||
.postcard-grammar.textsyntax tr > *:nth-child(1) { width: 7em; }
|
||||
.postcard-grammar.binarysyntax tr > *:nth-child(1) { width: 13em; }
|
||||
@media screen and (max-width: 580px) {
|
||||
.postcard-grammar.binarysyntax tr > *:nth-child(1) { width: auto; }
|
||||
}
|
||||
.postcard-grammar tr > *:nth-child(2) { width: 1em; text-align: center; }
|
||||
.postcard-grammar sup {
|
||||
color: #040;
|
||||
font-size: 0.9rem;
|
||||
font-size: 90%;
|
||||
}
|
||||
.postcard-grammar em { color: black; }
|
||||
.postcard-grammar .roman { font-family: var(--serif-font); font-size: 1.05rem; }
|
||||
.postcard-grammar .roman { font-family: var(--serif-font); font-size: 105%; }
|
||||
.postcard-grammar strong { color: #400; font-weight: normal; }
|
||||
.postcard-grammar td {
|
||||
vertical-align: top;
|
||||
|
@ -204,7 +209,7 @@ table.postcard-grammar { background: #e9f0f9; }
|
|||
.postcard-grammar pre, .postcard-grammar code {
|
||||
color: black;
|
||||
display: inline-block;
|
||||
font-size: 1rem;
|
||||
font-size: 100%;
|
||||
padding: 0 0.33rem;
|
||||
}
|
||||
.postcard-grammar .outputish { background: #eee; color: black; }
|
||||
|
|
Loading…
Reference in New Issue