From 56d736b0cf5b9f16795ec1e0aa091d9c2e45c065 Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Mon, 18 Dec 2017 08:14:15 -0500 Subject: [PATCH 01/11] eliminate header --- scss/shared/_heading.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scss/shared/_heading.scss b/scss/shared/_heading.scss index c391cdd..3afc336 100644 --- a/scss/shared/_heading.scss +++ b/scss/shared/_heading.scss @@ -14,8 +14,9 @@ $heading-after:" " !default; //////////////////////////////////////////////////////////////////////////////// // Mixin for quickly and consistently outputting the heading selector +// & > .heading, & > header > .heading { @mixin heading-selector { - & > .heading, & > header > .heading { + & > .heading { @content; } } From fb3d381d7be2c9595c37b70cbbc060db07f176ad Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Mon, 18 Dec 2017 16:12:14 -0500 Subject: [PATCH 02/11] trimmed a bit more --- scss/shared/_heading.scss | 8 ++++---- scss/shared/_typography.scss | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scss/shared/_heading.scss b/scss/shared/_heading.scss index 3afc336..99a6cfa 100644 --- a/scss/shared/_heading.scss +++ b/scss/shared/_heading.scss @@ -106,6 +106,7 @@ $heading-after:" " !default; @include typography-heading-base; } +/* @include heading-set-before-after($heading-before, $heading-after); .type { @@ -121,17 +122,16 @@ $heading-after:" " !default; .title { @include heading-set-before-after($title-before, $title-after); } +*/ +/* .type, .codenumber, .title { - /** - * Hide the space after the last element, - * defer to .heading:after instead XX obsolete comment - */ &:last-child:after { // display:none; // content: ".\2009 "; } } +*/ &.hide-type { @include heading-hide-type(); diff --git a/scss/shared/_typography.scss b/scss/shared/_typography.scss index 71c0b5f..5f26b7f 100644 --- a/scss/shared/_typography.scss +++ b/scss/shared/_typography.scss @@ -225,7 +225,9 @@ $relative-font-sizing: true; // uses ems instead of pixels @include adjust-font-size-to($typography-font-size-base); /* We only want bottom margins on paragraphs */ +/* NO, we only want top margins on paragraphs @include margin-trailer; +*/ } } From a73754a2551e2db023a972ac0c5a049a6f852a53 Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Mon, 18 Dec 2017 20:58:55 -0500 Subject: [PATCH 03/11] more eliminations --- scss/content/mixins/_environment.scss | 4 ++-- scss/content/mixins/_section.scss | 2 +- scss/content/partials/_figure.scss | 10 +++++----- scss/content/partials/_sections.scss | 12 ++++++------ scss/shared/_typography.scss | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/scss/content/mixins/_environment.scss b/scss/content/mixins/_environment.scss index 6ec341d..8332910 100644 --- a/scss/content/mixins/_environment.scss +++ b/scss/content/mixins/_environment.scss @@ -16,7 +16,7 @@ $environment-heading-after: "" !default; @include heading-base($heading-after:$environment-heading-after); // Adjust the heading size/line-height/margins - @include typography-heading-size($environment-heading-font-size); +// @include typography-heading-size($environment-heading-font-size); // TODO should we move links into heading-base? /* Support links in headings */ @@ -35,5 +35,5 @@ $environment-heading-after: "" !default; @include heading-force-inline(); // One line-height bottom margin - @include margin-trailer(1); +// @include margin-trailer(1); } diff --git a/scss/content/mixins/_section.scss b/scss/content/mixins/_section.scss index d8ecf29..633f018 100644 --- a/scss/content/mixins/_section.scss +++ b/scss/content/mixins/_section.scss @@ -33,7 +33,7 @@ $section-heading-size-level-3: h5 !default; margin-left:-3px; } } - @include margin-trailer($section-margin-lines); +// @include margin-trailer($section-margin-lines); } @mixin section-level($level) { diff --git a/scss/content/partials/_figure.scss b/scss/content/partials/_figure.scss index 51e5c7d..3b3c272 100644 --- a/scss/content/partials/_figure.scss +++ b/scss/content/partials/_figure.scss @@ -6,10 +6,10 @@ $figure-heading-after: ". " !default; figure { - & { - /* maintain vertical rhythym with line-height sized trailing margin */ - @include margin-trailer; - } +// & { +// /* maintain vertical rhythym with line-height sized trailing margin */ +// @include margin-trailer; +// } &.wrap { float: right; @@ -49,7 +49,7 @@ figcaption { & { @include adjust-font-size-to($typography-font-size-base); - margin: 0 auto; +// margin: 0 auto; padding-left: 2em; @include margin-leader; } diff --git a/scss/content/partials/_sections.scss b/scss/content/partials/_sections.scss index 4d86811..18ac4ff 100644 --- a/scss/content/partials/_sections.scss +++ b/scss/content/partials/_sections.scss @@ -49,7 +49,7 @@ section, .section-like { * within this context */ font-size: $context-font-size; - @include margin-trailer(1, $context-font-size); +// @include margin-trailer(1, $context-font-size); .type, .codenumber { /* Chapter type prefix is smaller (as in LaTeX) */ @@ -77,7 +77,7 @@ section, .section-like { & { font-size: $context-font-size; - @include margin-trailer(1, $context-font-size); +// @include margin-trailer(1, $context-font-size); } @include heading-selector { @@ -106,7 +106,7 @@ section, .section-like { text-align:center; @include typography-heading-size($title-font-size); // Needs a bit of extra space - @include margin-trailer(1, $title-font-size); +// @include margin-trailer(1, $title-font-size); .subtitle { display:block; @@ -119,9 +119,9 @@ section, .section-like { } } - .header { - @include margin-trailer(2); - } +// .header { +// @include margin-trailer(2); +// } .contributors { text-align:center; diff --git a/scss/shared/_typography.scss b/scss/shared/_typography.scss index 5f26b7f..71e5667 100644 --- a/scss/shared/_typography.scss +++ b/scss/shared/_typography.scss @@ -213,14 +213,14 @@ $relative-font-sizing: true; // uses ems instead of pixels @include adjust-font-size-to($font-size); @include margin-leader(1,$font-size); - @include margin-trailer(.5,$font-size); +// @include margin-trailer(.5,$font-size); } // Paragraph styling @mixin typography-paragraph() { & { /* Reset margins */ - margin:0; +// margin:0; @include adjust-font-size-to($typography-font-size-base); @@ -234,7 +234,7 @@ $relative-font-sizing: true; // uses ems instead of pixels // Special styling for a lead-in paragraph @mixin typography-paragraph-lead() { & { - margin:0; +// margin:0; @include adjust-font-size-to(floor($typography-font-size-base*1.15)); @include margin-trailer; font-weight: 200; @@ -313,7 +313,7 @@ $relative-font-sizing: true; // uses ems instead of pixels ) { & { - margin:0 1px; // override beezer.css +// margin:0 1px; // override beezer.css //font-size: 80%; @include adjust-font-size-to(.9*$typography-font-size-base); white-space: nowrap; @@ -332,7 +332,7 @@ $relative-font-sizing: true; // uses ems instead of pixels @mixin typography-address() { & { padding:0; - margin:0; +// margin:0; line-height: inherit; font-style: inherit; } From 21a71623db2804a2e4f8e8a2d3bac6367c1ec85b Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Fri, 22 Dec 2017 10:09:33 -0500 Subject: [PATCH 04/11] more add-on, and eliminate poor selectors --- mathbook-add-on.css | 238 +++++++++++++----- scss/content/partials/_environments.scss | 67 ++--- scss/content/partials/_sections.scss | 4 +- .../partials/_typographic-elements.scss | 24 +- 4 files changed, 231 insertions(+), 102 deletions(-) diff --git a/mathbook-add-on.css b/mathbook-add-on.css index af50a0c..e8b1507 100644 --- a/mathbook-add-on.css +++ b/mathbook-add-on.css @@ -5,8 +5,10 @@ https://www.w3schools.com/cssref/css_default_values.asp /* the default margin for pre is "1em 0", so we over-ride so that we can set our own later */ -pre { +.mathbook-content pre { margin: 0; + padding: 0; + border: none; } /* p and other block-level elements should have space at the top, and not the bottom */ @@ -16,11 +18,22 @@ pre { .mathbook-content p { margin-top: 1.25em; margin-bottom: 0; + line-height: 1.35; } .mathbook-content ol, .mathbook-content ul { margin-bottom: 0; } +.mathbook-content figure { + margin-bottom: 0; +} + + +.mathbook-content .heading { + margin-top: 0; + margin-bottom: 0; +} +/* .mathbook-content section > article { margin-top: 1.25em; margin-bottom: 0; @@ -29,7 +42,15 @@ pre { .mathbook-content p + article { margin-top: 1.25em; } -.mathbook-content section > article.proof { +*/ +.mathbook-content section article { + margin-top: 1.25em; +} +.mathbook-content section article + article, +.mathbook-content section .posterior + article { + margin-top: 1.75em; +} +.mathbook-content section .proof { margin-top: 0.75em; } .mathbook-content .sagecell { @@ -76,16 +97,22 @@ pre { margin-top: 0; } +.mathbook-content #index > .heading { + display: block; + text-align: center; +} + .mathbook-content article > .heading + p { margin-top: 0; } /* go back and delete the header case when no longer needed */ -.mathbook-content section > .heading + p, .mathbook-content section > header + p, -.mathbook-content section > .blob > p:first-child { - margin-top: 0; +.mathbook-content section .heading + p, .mathbook-content section header + p, +.mathbook-content section .blob > p:first-child, +.mathbook-content section .permalink + p { + margin-top: 0.25em; } -.mathbook-content section > .heading + article, .mathbook-content section > header + article { - margin-top: 0; +.mathbook-content section .heading + article, .mathbook-content section header + article { + margin-top: 1em; } .mathbook-content a > .heading { display: inline;} @@ -94,26 +121,73 @@ pre { .mathbook-content article .heading { font-family: "PT Serif", "Times New Roman", Times, serif; font-weight: 700; + color: inherit; } -.mathbook-content article .heading { +/* +.mathbook-content a article .heading { + font-weight: 500; +} +*/ + +.mathbook-content section .heading { + font-size: 1.75em; + line-height: 1.42857em; + margin-top: 1em; +} +.mathbook-content section section .heading { + font-size: 1.5em; + line-height: 1.25em; + margin-top: 1em; +} +.mathbook-content section section section .heading { + font-size: 1.40em; + line-height: 1.15em; + margin-top: 0.75em; +} + + +.mathbook-content section article .heading, .mathbook-content section section article .heading { + font-size: 1.125em; + line-height: 1.125em; + margin-top: 0; + display: inline; +} +/* Currently only for Solution to example */ +.mathbook-content .posterior .heading { + font-weight: normal; + font-size: 1.125em; + line-height: 1.125em; + margin-top: 0; +} +/* trmporary: heading is not type */ +.mathbook-content section figcaption .heading, .mathbook-content section section figcaption .heading { font-size: 1.125em; + line-height: 1.125em; + margin-top: 0; } +.mathbook-content .heading.hide-type > .type { + display: none; +} +/* .mathbook-content section > .heading > .type + .codenumber::before, .mathbook-content article > .heading > .type + .codenumber::before, -.mathbook-content article > a > .heading > .type + .codenumber::before { +.mathbook-content article > a > .heading > .type + .codenumber::before +*/ +.mathbook-content .heading > .type + .codenumber::before { content: " "; } -.mathbook-content section > .heading > .codenumber:not(:empty) + .title::before, +/*.mathbook-content section > .heading > .codenumber:not(:empty) + .title::before, .mathbook-content article > .heading > .codenumber:not(:empty) + .title::before, -.mathbook-content article > a > .heading > .codenumber:not(:empty) + .title::before { +.mathbook-content article > a > .heading > .codenumber:not(:empty) + .title::before +.mathbook-content section > .heading > .codenumber:not(:empty) + .title::before { content: ": \2009"; } - -/* -.mathbook-content section > .heading > .title:not(:empty):last-child::after, */ -.mathbook-content article > .heading > .title:not(:empty):last-child::after, +.mathbook-content section:not(.chapter) .heading > .codenumber:not(:empty) + .title::before { + content: " \2009"; +} + .mathbook-content article > .heading > .title:not(:empty):last-child::after { content: ".\2009"; } @@ -122,20 +196,39 @@ pre { content: "."; } + +/* + * Contents of articles + */ +.mathbook-content section article .heading + p { + display: inline; +} +.mathbook-content section article.assemblage-like .heading + p { + display: block; +} +.mathbook-content section article.theorem-like p, +.mathbook-content section article.theorem-like li { + font-style: italic; +} + +/* + * .hiddenproof + */ + /* knowlified proofs are in an article.hiddenproof */ .mathbook-content .hiddenproof > .heading, /* can't happen, because the a does the hiding? */ .mathbook-content .hiddenproof > a > .heading { font-style: italic; font-weight: normal; } -.mathbook-content .hiddenproof > .heading > .type::after, /* can't happen, because the a does the hiding? */ +/* .mathbook-content .hiddenproof > a > .heading > .type::after { content: ""; } -.mathbook-content .hiddenproof > .heading:after, /* can't happen, because the a does the hiding? */ .mathbook-content .hiddenproof > a > .heading:after { content: "."; } +*/ @@ -438,33 +531,38 @@ body > a.assistive:focus { clear:both; } -.mathbook-content figure figcaption { +.mathbook-content figcaption { font-weight: normal; } -.mathbook-content figure figcaption { +.mathbook-content figcaption { margin-top: 10px; margin-left: auto; margin-right: auto; - font-size: 100%; /* Commenting this out because the initial letter of some captions were cut off text-indent: -30px; */ } -.mathbook-content figure figcaption .heading, .mathbook-content figure figcaption .codenumber { +/* delete the figcaption .heading once refactoring is complete */ +.mathbook-content figcaption .heading, +.mathbook-content section figcaption .heading, +.mathbook-content section figcaption .codenumber, +.mathbook-content section figcaption .type { font-weight: 700; + font-size: inherit; } -.mathbook-content figure figcaption .heading:after { +.mathbook-content figcaption .heading + .codenumber::before, +.mathbook-content figcaption .type + .codenumber::before { content: " "; } -.mathbook-content figure figcaption .codenumber:after { +.mathbook-content figcaption .codenumber:after { content: ".\2002"; /* en space */ } -.mathbook-content figure figcaption .codenumber:last-child:after { +.mathbook-content figcaption .codenumber:last-child:after { display: inline; content: ". "; } @@ -577,7 +675,6 @@ h2:last-child { .mathbook-content h6 { line-height: 1em; - margin-bottom: 0.5em; } .mathbook-content .sidebyside > p, .mathbook-content .sidebyside > figure, .mathbook-content .sidebyside > img, .mathbook-content .sidebyside > table, .mathbook-content .sidebyside > tabular, .mathbook-content .sidebyside > .paragraphs { @@ -590,10 +687,9 @@ h2:last-child { } .mathbook-content .sidebyside figcaption { - font-weight: normal; padding-left: 1em; padding-right: 0; - padding-bottom: 1.5em; + padding-bottom: 0; margin: 0.75em 0 0 0; } @@ -632,7 +728,7 @@ h2:last-child { } .mathbook-content .sidebyside { - margin-bottom: 1em; + margin-bottom: 0; } .mathbook-content .sidebyside p:only-child { margin-bottom: 0; @@ -928,7 +1024,7 @@ table tr td { } .mathbook-content table + p { - margin-top: 20px; + margin-top: 1.5em; } .mathbook-content table tr td span.decimal { @@ -944,26 +1040,20 @@ table tr td { margin-bottom: 0; } -.mathbook-content .hidden-knowl-wrapper .hiddenproof { - margin-top: 0; +.mathbook-content .hidden-knowl-wrapper .hiddenproof, +.mathbook-content article.hiddenproof { + margin-top: 0.25em; } .mathbook-content .hidden-knowl-wrapper article { display: inline; } -/* things like knowlified examples */ -.mathbook-content section > .hidden-knowl-wrapper { - margin-bottom: 1em; -} - -.mathbook-content .theorem-like + .hidden-knowl-wrapper { - margin-top: -0.5em; -} - +/* .mathbook-content .hiddenproof > .heading::after { content: "." } +*/ .amathbook-content figure.figure-like { overflow: auto; @@ -1029,6 +1119,7 @@ table tr td { margin-top: 0.5em; } +/* this should be obsolete, because the permalink is outside of the .heading */ .mathbook-content section .heading a.permalink { opacity: 0.1; font-size: 70%; @@ -1535,9 +1626,11 @@ a.mjx-svg-href { .mathbook-content .latex-logo .E {vertical-align:-.5ex; text-transform: uppercase; margin-left: -.18em; margin-right: -.12em} +/* .mathbook-content .posterior { margin-bottom: 1.25em; } +*/ .mathbook-content .fillin { display: inline-block; @@ -1589,12 +1682,14 @@ a.mjx-svg-href { margin-left: 0; } +.mathbook-content article + .hidden-knowl-wrapper { + margin-top: 1em; +} +.mathbook-content article + .posterior { + margin-top: 0.5em; +} .mathbook-content .exercisegroup article + .hidden-knowl-wrapper { margin-left: 4em; -/* - margin-top: 0; - margin-bottom: 1em; -*/ } /* make it look like a list, and have entra indenting when already more indented */ @@ -1725,10 +1820,6 @@ a.mjx-svg-href { font-family: "Inconsolata", monospace; } -.main .mathbook-content section article .heading { - line-height: 1.125em; -} - .mathbook-content .sagecell_sessionOutput pre { font-family: 'Inconsolata', monospace; } @@ -1769,32 +1860,43 @@ a.mjx-svg-href { font-style: oblique; } +/* .mathbook-content .definition-like > .heading .type:last-child:after, .mathbook-content .theorem-like > .heading .type:last-child:after, .mathbook-content .remark-like > .heading .type:last-child:after, .mathbook-content .example-like > .heading .type:last-child:after, .mathbook-content .exercise-like > .heading .type:last-child:after, .mathbook-content .definition-like > .heading .codenumber:last-child:after, .mathbook-content .theorem-like > .heading .codenumber:last-child:after, .mathbook-content .remark-like > .heading .codenumber:last-child:after, .mathbook-content .example-like > .heading .codenumber:last-child:after, .mathbook-content .exercise-like > .heading .codenumber:last-child:after, .mathbook-content .definition-like > .heading .title:last-child:after, .mathbook-content .theorem-like > .heading .title:last-child:after, .mathbook-content .remark-like > .heading .title:last-child:after, .mathbook-content .example-like > .heading .title:last-child:after, .mathbook-content .exercise-like > .heading .title:last-child:after, .mathbook-content .definition-like > header > .heading .type:last-child:after, .mathbook-content .theorem-like > header > .heading .type:last-child:after, .mathbook-content .remark-like > header > .heading .type:last-child:after, .mathbook-content .example-like > header > .heading .type:last-child:after, .mathbook-content .exercise-like > header > .heading .type:last-child:after, .mathbook-content .definition-like > header > .heading .codenumber:last-child:after, .mathbook-content .theorem-like > header > .heading .codenumber:last-child:after, .mathbook-content .remark-like > header > .heading .codenumber:last-child:after, .mathbook-content .example-like > header > .heading .codenumber:last-child:after, .mathbook-content .exercise-like > header > .heading .codenumber:last-child:after, .mathbook-content .definition-like > header > .heading .title:last-child:after, .mathbook-content .theorem-like > header > .heading .title:last-child:after, .mathbook-content .remark-like > header > .heading .title:last-child:after, .mathbook-content .example-like > header > .heading .title:last-child:after, .mathbook-content .exercise-like > header > .heading .title:last-child:after { content: ".\2009 "; } +*/ -.mathbook-content .aside-like > .heading .type:last-child:after, -.mathbook-content .aside-like > .heading .codenumber:last-child:after, -.mathbook-content .aside-like > .heading .title:last-child:after, -.mathbook-content .aside-like > header > .heading .type:last-child:after, -.mathbook-content .aside-like > header > .heading .codenumber:last-child:after, -.mathbook-content .aside-like > header > .heading .title:last-child:after { +.mathbook-content article > .heading .type:last-child::after, +.mathbook-content article > .heading .codenumber:last-child::after, +.mathbook-content article > .heading .title:not(:empty):last-child::after { + content: ".\2009 "; +} +.mathbook-content .aside-like > .heading .type:last-child::after, +.mathbook-content .aside-like > .heading .codenumber:last-child::after, +.mathbook-content .aside-like > .heading .title:last-child::after { content: ":\2009 "; } -.mathbook-content .aside-like > .heading .title:empty:after { +.mathbook-content .aside-like > .heading .title:empty::after { content: ""; } /* need sample use case for these */ +/* .mathbook-content a .definition-like > .heading .type:last-child:after, .mathbook-content a .theorem-like > .heading .type:last-child:after, .mathbook-content a .remark-like > .heading .type:last-child:after, .mathbook-content a .example-like > .heading .type:last-child:after, .mathbook-content a .exercise-like > .heading .type:last-child:after, .mathbook-content a .definition-like > .heading .codenumber:last-child:after, .mathbook-content a .theorem-like > .heading .codenumber:last-child:after, .mathbook-content a .remark-like > .heading .codenumber:last-child:after, .mathbook-content a .example-like > .heading .codenumber:last-child:after, .mathbook-content a .exercise-like > .heading .codenumber:last-child:after, .mathbook-content a .definition-like > .heading .title:last-child:after, .mathbook-content a .theorem-like > .heading .title:last-child:after, .mathbook-content a .remark-like > .heading .title:last-child:after, .mathbook-content a .example-like > .heading .title:last-child:after, .mathbook-content a .exercise-like > .heading .title:last-child:after, .mathbook-content a .definition-like > header > .heading .type:last-child:after, .mathbook-content a .theorem-like > header > .heading .type:last-child:after, .mathbook-content a .remark-like > header > .heading .type:last-child:after, .mathbook-content a .example-like > header > .heading .type:last-child:after, .mathbook-content a .exercise-like > header > .heading .type:last-child:after, .mathbook-content a .definition-like > header > .heading .codenumber:last-child:after, .mathbook-content a .theorem-like > header > .heading .codenumber:last-child:after, .mathbook-content a .remark-like > header > .heading .codenumber:last-child:after, .mathbook-content a .example-like > header > .heading .codenumber:last-child:after, .mathbook-content a .exercise-like > header > .heading .codenumber:last-child:after, .mathbook-content a .definition-like > header > .heading .title:last-child:after, .mathbook-content a .theorem-like > header > .heading .title:last-child:after, .mathbook-content a .remark-like > header > .heading .title:last-child:after, .mathbook-content a .example-like > header > .heading .title:last-child:after, .mathbook-content a .exercise-like > header > .heading .title:last-child:after, { content: ""; } +*/ /* FOr exercises, etc, hidden in knowls */ +/* .mathbook-content a .definition-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .theorem-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .remark-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .example-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .exercise-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .theorem-like > header > .heading .codenumber:not(:empty)::after, .mathbook-content a .remark-like > header > .heading .codenumber:not(:empty)::after, .mathbook-content a .example-like > header > .heading .codenumber:not(:empty)::after, .mathbook-content a .exercise-like > header > .heading .codenumber:not(:empty)::after { content: ": \2009"; } +*/ +.mathbook-content a article > .heading .codenumber:not(:empty)::after { + content: ": \2009"; +} .mathbook-content .hiddenproof > .heading .type:after, .mathbook-content .hiddenproof > header > .heading .type:after { content: ""; @@ -1815,7 +1917,7 @@ a.mjx-svg-href { } -.mathbook-content .solutions > a, .mathbook-content .solutions > a:hover, .mathbook-content .solutions > a.active { +.mathbook-content .solutions a, .mathbook-content .solutions a:hover, .mathbook-content .solutions a.active { display: inline-block; margin-right: 1em; } @@ -1854,7 +1956,10 @@ body, html body { background: #fff; } figure { margin-top: 10px; } -.mathbook-content figure + figure { +.mathbook-content figure + figure, +.mathbook-content figure + .sidebyside, +.mathbook-content .sidebyside + .sidebyside, +.mathbook-content .sidebyside + figure { padding-top: 1.0em; } @@ -1998,17 +2103,23 @@ sup [knowl]:hover { padding: 0px 0px 0px 3px; } +/* .mathbook-content .proof > .heading:after { content: "."; } +*/ -figure pre.prettyprint { +.mathbook-content pre.prettyprint, +.mathbook-content pre.plainprint { margin-top: 0; padding-left: 15px; border-left: 1px solid #aaa; + font-size: 110%; +/* preveiously turned off the border and padding from pretty.css */ } -figure pre.prettyprint:before { +.mathbook-content pre.prettyprint:before, +.mathbook-content pre.plainprint:before { content:''; border-top: 1px solid #aaa; display: block; @@ -2026,10 +2137,10 @@ figure pre.prettyprint:before { } /* List 12.3 at http://mathbook.pugetsound.edu/examples/sample-article/html/section-12.html [[put somethign here]] - */ .mathbook-content article.example-like + .posterior { margin-top: -0.75em; } + */ .mathbook-content article.proof > *:last-child { margin-bottom: 0; @@ -2465,7 +2576,7 @@ body.sidebar-left-closed .searchwrapper { border: none; } -.times-sign { +.mathbook-content .times-sign { font-size: larger; vertical-align: -0.15ex; } @@ -2603,3 +2714,8 @@ and condider having this replace line 3338 of the general code (which uses .head .mathbook-content meta { display: none; } + +#masthead .banner .container a img { + font-size: 25%; +} + diff --git a/scss/content/partials/_environments.scss b/scss/content/partials/_environments.scss index d7b5308..bb7caa1 100644 --- a/scss/content/partials/_environments.scss +++ b/scss/content/partials/_environments.scss @@ -15,10 +15,13 @@ @include environment-base(); } +/* .definition-like { @extend %environment-base; } +*/ +/* .theorem-like { @extend %environment-base; @@ -26,19 +29,20 @@ font-style: italic; } - .statement { - - display:inline; - - p:first-child { - display:inline; - } - - &:last-child, &:last-of-type { - margin-bottom:0; - } - } +// .statement { +// +// display:inline; +// +// p:first-child { +// display:inline; +// } +// +// &:last-child, &:last-of-type { +// margin-bottom:0; +// } +// } } +*/ .proof { @@ -137,20 +141,20 @@ @include environment-base(); & { - @include heading-selector { - font-style: italic; - font-weight:normal; +// @include heading-selector { +// font-style: italic; +// font-weight:normal; /* It helps to have a little bit of extra space after proof */ - margin-right:.25em; - } +// margin-right:.25em; +// } - position:relative; +// position:relative; /* Cut the border up into the top margin */ - margin-top: -0.5em; - padding-top: 0; +// margin-top: -0.5em; +// padding-top: 0; - @include margin-trailer(1.0); +// @include margin-trailer(1.0); @media screen and (max-width: $screen-md-max) { /* Bring border out of the right margin */ @@ -172,19 +176,24 @@ } +/* .hiddenproof a>.heading { margin-top: 0px; margin-bottom: 0px; } +*/ +/* .remark-like { @extend %environment-base; } +*/ .listitem { @extend %environment-base; } +/* .example-like { @extend %environment-base; } @@ -192,22 +201,14 @@ .exercise-like { @extend %environment-base; } +*/ // TODO what is this? does it belong in content or ui? // TODO tie values into variables for vertical rythym and color + +/* .aside-like { @extend %environment-base; - - // From addon - // ------------- - // padding: 8px 15px 10px 15px; - // margin: 5px 0px 5px 10px; - // background-color: rgb(245,250,255); - // border: 2px solid rgb(220,235,250); -// - // .aside-like { - // background-color: rgb(250,255,245); - // border: 1px dotted #aaa; - // } } +*/ diff --git a/scss/content/partials/_sections.scss b/scss/content/partials/_sections.scss index 18ac4ff..33c3c95 100644 --- a/scss/content/partials/_sections.scss +++ b/scss/content/partials/_sections.scss @@ -51,8 +51,8 @@ section, .section-like { font-size: $context-font-size; // @include margin-trailer(1, $context-font-size); +/* .type, .codenumber { - /* Chapter type prefix is smaller (as in LaTeX) */ @include typography-heading-size($heading-type-font-size); } @@ -60,9 +60,9 @@ section, .section-like { display:block; @include typography-heading-size($heading-title-font-size); - /* Force a half-line leader */ @include margin-leader(.5, $heading-title-font-size); } +*/ } /** diff --git a/scss/content/partials/_typographic-elements.scss b/scss/content/partials/_typographic-elements.scss index 733973e..ab38ae9 100644 --- a/scss/content/partials/_typographic-elements.scss +++ b/scss/content/partials/_typographic-elements.scss @@ -6,6 +6,7 @@ @include typography-heading-base(); } +/* h1, %h1 { @extend %heading-base; @include typography-heading-size(h1); @@ -35,6 +36,7 @@ h6, %h6 { @extend %heading-base; @include typography-heading-size(h6); } +*/ /* deleted by David Farmer on 2/15/16 because it is too non-specific * and difficult to over-ride in MathJax @@ -54,6 +56,7 @@ section h2 > a, li > a, li > %a, p > a, p> %a, .image-links > a { } } +/* p, %p { @include typography-paragraph(); } @@ -65,22 +68,26 @@ blockquote .blockquote, %blockquote { address, .address, %address { @include typography-address(); } +*/ // Unordered and Ordered lists // Adapted from twitter bootstrap +/* ul, ol { // Set correct line-height @include adjust-font-size-to($typography-font-size-base); margin-top: 0; - @include margin-trailer; - - ul, - ol { - margin-bottom: 0; - } +// @include margin-trailer; +// +// ul, +// ol { +// margin-bottom: 0; +// } } +*/ +/* // Unstyled keeps list items block level, // just removes default browser padding and list-style // Adapted from twitter bootstrap @@ -88,7 +95,9 @@ ol { padding-left: 0; list-style: none; } +*/ +/* // Inline turns list items into inline-block // Adapted from twitter bootstrap .list-inline { @@ -104,7 +113,9 @@ ol { } } } +*/ +/* // Description Lists // Adapted from twitter bootstrap dl { @@ -121,3 +132,4 @@ dt { dd { margin-left: 0; // Undo browser default } +*/ From 05ba2d25b6021f06380350b30e0582f2e76cfa4b Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Fri, 29 Dec 2017 13:56:29 -0500 Subject: [PATCH 05/11] more deleting --- scss/content/partials/_sections.scss | 5 +++-- scss/mathbook-content-prefixed.scss | 2 ++ scss/shared/_heading.scss | 6 ++++-- scss/shared/_typography.scss | 4 +++- scss/ui/partials/_layout.scss | 2 ++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/scss/content/partials/_sections.scss b/scss/content/partials/_sections.scss index 33c3c95..79e80a9 100644 --- a/scss/content/partials/_sections.scss +++ b/scss/content/partials/_sections.scss @@ -48,7 +48,7 @@ section, .section-like { * We use font-size-base so that ems are relative to base font size * within this context */ - font-size: $context-font-size; +// font-size: $context-font-size; // @include margin-trailer(1, $context-font-size); /* @@ -73,6 +73,7 @@ section, .section-like { * The main difference is that the margin is applied to the header * element instead of the heading element. */ +/* & > header { & { @@ -83,7 +84,6 @@ section, .section-like { @include heading-selector { .title { display:block; - /* The margin goes on the header element instead */ margin-bottom:0; } } @@ -96,6 +96,7 @@ section, .section-like { &:before { content: "By "; } } } +*/ } .frontmatter, .book { diff --git a/scss/mathbook-content-prefixed.scss b/scss/mathbook-content-prefixed.scss index 11e14ad..1d51b5e 100644 --- a/scss/mathbook-content-prefixed.scss +++ b/scss/mathbook-content-prefixed.scss @@ -18,10 +18,12 @@ @include typography-google-fonts-import-once(); +/* .mathbook-content { @include typography-base(); @import "content/content"; } +*/ /******************************************************************************* * END MATHBOOK CONTENT PREFIXED diff --git a/scss/shared/_heading.scss b/scss/shared/_heading.scss index 99a6cfa..159346d 100644 --- a/scss/shared/_heading.scss +++ b/scss/shared/_heading.scss @@ -148,6 +148,7 @@ $heading-after:" " !default; // Force the heading to appear inline with the following paragraph @mixin heading-force-inline() { +/* @include heading-selector { display:inline; @@ -155,22 +156,22 @@ $heading-after:" " !default; display:inline; &:after { - /* Restore the inline paragraph's margin */ content: ""; display:block; @include margin-trailer; } &:last-child:after { - /* Restore the inline paragraph's margin */ margin-bottom: 0; } } } +*/ } // Force the heading back to block @mixin heading-force-block() { +/* @include heading-selector { display:block; @@ -182,4 +183,5 @@ $heading-after:" " !default; } } } +*/ } diff --git a/scss/shared/_typography.scss b/scss/shared/_typography.scss index 71e5667..554741a 100644 --- a/scss/shared/_typography.scss +++ b/scss/shared/_typography.scss @@ -53,6 +53,7 @@ $typography-code-border-color: #ddd !default; $typography-code-border-radius: .2em !default; $typography-code-scrollable-max-height: 340px !default; +/* // GOOGLE FONTS $typography-google-fonts-url-base:"https://fonts.googleapis.com/css" !default; $typography-google-fonts-options: @@ -60,7 +61,8 @@ $typography-google-fonts-options: $typography-google-fonts-url: $typography-google-fonts-url-base + $typography-google-fonts-options; // Flag for whether or not to import the google font url in the output CSS -$typography-should-import-google-fonts: true !default; +*/ +$typography-should-import-google-fonts: false !default; // Compass Vertical Rhythm //------------------------------------------------------------------------------ diff --git a/scss/ui/partials/_layout.scss b/scss/ui/partials/_layout.scss index 01c77ae..45777e9 100644 --- a/scss/ui/partials/_layout.scss +++ b/scss/ui/partials/_layout.scss @@ -5,6 +5,7 @@ // This provides an overview of the layout and how the root level // elements of the page fit together. +/* html, body { margin:0; padding:0; @@ -20,6 +21,7 @@ body { border-bottom:none; } } +*/ /** * Containers restrict the max-width of content within elements From 82bd9e774c61e70404ce94e4643a519927b4a36e Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Sat, 30 Dec 2017 14:02:23 -0500 Subject: [PATCH 06/11] delete more, knowls next --- scss/mathbook.scss | 4 +++- scss/ui/partials/_layout.scss | 10 ++++++++-- scss/ui/partials/_main.scss | 4 +++- scss/ui/partials/_masthead.scss | 3 ++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/scss/mathbook.scss b/scss/mathbook.scss index 72945a6..a168f89 100644 --- a/scss/mathbook.scss +++ b/scss/mathbook.scss @@ -24,12 +24,14 @@ /** * Reset HTML to iron out browser inconsistencies - */ @include reset-html5(); + */ +/* body { @include typography-base(); } +*/ // Import modules @import "ui/ui"; diff --git a/scss/ui/partials/_layout.scss b/scss/ui/partials/_layout.scss index 45777e9..bfc37f6 100644 --- a/scss/ui/partials/_layout.scss +++ b/scss/ui/partials/_layout.scss @@ -43,15 +43,19 @@ body { max-width: $content-outer-width + $ui-sidebar-left-width; } +/* &.has-sidebar-right, .has-sidebar-right & { max-width:none; } +*/ +/* &.layout-centered, .layout-centered &, .has-sidebar-left.has-sidebar-right & { max-width: none; } +*/ } /** @@ -180,7 +184,7 @@ body { /** * Container for the main focus/purpose of the page. */ -#main, .main { +.main { // Main styling should go here. @import "./main"; @@ -219,11 +223,13 @@ body { margin: $ui-content-margin; } +/* .layout-centered & { margin: $ui-content-margin auto; } +*/ - &, .layout-left &, .layout-centered & { + &, .layout-left & { /*, .layout-centered & { */ /** * When the content is cramped, diff --git a/scss/ui/partials/_main.scss b/scss/ui/partials/_main.scss index 039980a..e81bffe 100644 --- a/scss/ui/partials/_main.scss +++ b/scss/ui/partials/_main.scss @@ -52,12 +52,14 @@ margin: $ui-content-margin; } +/* .layout-centered & { margin: $ui-content-margin auto; } +*/ - &, .layout-left &, .layout-centered & { + &, .layout-left & { /*, .layout-centered & { */ /* When the content is cramped */ @include sliding-sidebars-media-cramped-content( diff --git a/scss/ui/partials/_masthead.scss b/scss/ui/partials/_masthead.scss index d2033d9..37b7675 100644 --- a/scss/ui/partials/_masthead.scss +++ b/scss/ui/partials/_masthead.scss @@ -26,9 +26,9 @@ $masthead-font-family: $typography-heading-font-family; @include box-shadow(none); } +/* .banner { border-bottom:1px solid darken($masthead-bg-color, 15%); - /* to ensure children's margin-top works */ border-top:1px solid transparent; @include clearfix(); @@ -40,6 +40,7 @@ $masthead-font-family: $typography-heading-font-family; padding-right:$ui-content-margin-xs; } } +*/ #title-container, .title-container { font-size: 1em; From d9f66abf1aeef47437fcd92e094f668c79ae963e Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Sat, 30 Dec 2017 14:03:00 -0500 Subject: [PATCH 07/11] multiple changes --- mathbook-add-on.css | 263 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 230 insertions(+), 33 deletions(-) diff --git a/mathbook-add-on.css b/mathbook-add-on.css index e8b1507..4874f9b 100644 --- a/mathbook-add-on.css +++ b/mathbook-add-on.css @@ -1,4 +1,16 @@ +@import url("https://fonts.googleapis.com/css?family=PT+Serif:400,700,400italic,700italic|Open+Sans:400italic,700italic,400,700"); + +body { + font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + margin: 0; + padding: 0; +} + +a { + color: inherit; +} + /* CSS defult values: https://www.w3schools.com/cssref/css_default_values.asp */ @@ -97,7 +109,7 @@ so that we can set our own later */ margin-top: 0; } -.mathbook-content #index > .heading { +.mathbook-content .frontmatter > .heading { display: block; text-align: center; } @@ -184,7 +196,10 @@ so that we can set our own later */ content: ": \2009"; } */ +/* .mathbook-content section:not(.chapter) .heading > .codenumber:not(:empty) + .title::before { +*/ +.mathbook-content section .heading > .codenumber:not(:empty) + .title::before { content: " \2009"; } @@ -216,21 +231,168 @@ so that we can set our own later */ */ /* knowlified proofs are in an article.hiddenproof */ -.mathbook-content .hiddenproof > .heading, /* can't happen, because the a does the hiding? */ +/* .mathbook-content .hiddenproof .heading, ???? can't happen, because the a does the hiding? */ .mathbook-content .hiddenproof > a > .heading { font-style: italic; font-weight: normal; } -/* .mathbook-content .hiddenproof > a > .heading > .type::after { - content: ""; + content: "."; } +/* .mathbook-content .hiddenproof > a > .heading:after { content: "."; } */ +/* + main knowls style +*/ + +/* +[knowl], [knowl]:hover, [knowl].active { +*/ +[knowl] { + display: inline; + position: relative; + cursor: pointer; + color: #9c2310; + padding: 0px 2px 0px 2px; + margin: 0; + text-decoration: none; + margin-bottom: 1px; + margin-bottom: 0; + font-weight: 500; + white-space: nowrap; + border-bottom: none; + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-topright: 3px; + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-transition-property: background-color; + -moz-transition-property: background-color; + -o-transition-property: background-color; + transition-property: background-color; + -webkit-transition-duration: 0ms; + -moz-transition-duration: 0ms; + -o-transition-duration: 0ms; + transition-duration: 0ms; +} + +[knowl]:hover, [knowl]:active, [knowl].active { + color: #8a1200; + background: #ffedeb; + margin-bottom: 0; + border-bottom: none; +} + +[knowl]::after, [knowl]:hover::after, [knowl].active::after { + content: ""; + position: absolute; + top: 0; + bottom: 1px; + right: 2.4px; + left: 2.4px; + border-bottom: 1px dotted #9c2310; + -webkit-transition-property: left, right; + -moz-transition-property: left, right; + -o-transition-property: left, right; + transition-property: left, right; + -webkit-transition-duration: 0ms; + -moz-transition-duration: 0ms; + -o-transition-duration: 0ms; + transition-duration: 0ms; + z-index: 0; +} + +.knowl-error { + color: red; + border-bottom: 0; +} +.knowl-output { + background: #f5f5ff; + border-top: 10px solid #ddf; + border-left: 10px solid #ddf; + border-right: 10px solid #ddf; + border-bottom: 10px solid #ddf; + border-top-left-radius: 10px; + -moz-border-radius-topleft: 10px; + border-bottom-left-radius: 10px; + -moz-border-radius-bottomleft: 10px; + border-bottom-right-radius: 10px; + -moz-border-radius-bottomright: 10px; + border-top-right-radius: 10px; + -moz-border-radius-topright: 10px; + display: none; + display: none; + padding: 0px; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; +} +.knowl-output .knowl-output, .knowl-output .knowl-output.loading { + margin-left: 0; + margin-right: 0; +} +.knowl-output .knowl-output { + border-width: 6px; + background: #fffff5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + margin-bottom: -3px; + margin-left: -7px; + margin-right: -7px; +} +.knowl-output .knowl-output .knowl-output { + background: #fff5fe; +} +.knowl-output .knowl-output .knowl-output .knowl-output { + background: #ffffff; +} +.knowl-footer { + position: relative; + bottom: -9px; + font-size: x-small; + background: #ddf; + color: grey; + padding: 0 0 0 12px; + margin: -10px 0 0 0; +} +.knowl-footer a { + color: #006; +} +.knowl-footer a:hover { + background: none; + color: #88f; +} +.knowl-footer:after { + content: "\2002"; +} + +.knowl-output .knowl-output .knowl-footer { + bottom: -5px; + margin: -5px 0 0 0; +} + +.knowl-output + .knowl-output { + margin-top: 0; +} +.knowl-content { + padding: 10px; + padding-bottom: 7px; +} +.knowl-content > *:first-child { + margin-top: 0; +} /* this needs to be first, because we want any background to over-rule this. @@ -350,6 +512,14 @@ body > a.assistive:focus { } +#masthead .banner { + border-bottom: 1px solid #d4d4d4; + border-top: 1px solid transparent; + overflow: hidden; + padding-top: 0.625em; + padding-bottom: 1.125em; +} + /* newer, small top nav buttons */ #masthead.smallbuttons #primary-navbar .navbar-top-buttons .toolbar-align-right .toolbar-item-middle { float: left; @@ -1041,8 +1211,8 @@ table tr td { } .mathbook-content .hidden-knowl-wrapper .hiddenproof, -.mathbook-content article.hiddenproof { - margin-top: 0.25em; +.mathbook-content section > article.hiddenproof { + margin-top: 0.3em; } .mathbook-content .hidden-knowl-wrapper article { @@ -1081,10 +1251,6 @@ table tr td { padding-top: 0; } -.mathbook-content .knowl p:last-of-type { - margin-bottom: 0; -} - /* not sure where this was being used, but it made short knowls * look bad, like the hint here: * SAFurtherReading.html @@ -1093,15 +1259,17 @@ table tr td { } */ -.mathbook-content .knowl-output { - margin-bottom: 0; -} - +/* .mathbook-content tt { font-size: 1.4em; + font-size: 110%; margin-left: 0.2em; margin-right: 0.2em; } +*/ +.mathbook-content a > tt { + font-size: 110%; +} .mathbook-content section .videolink a:link { background-size: 0; @@ -1404,7 +1572,8 @@ table tr td { display: block; font-size: 85%; text-align: right; - margin-bottom: -1.0em; +/* margin-bottom: -1.0em; +*/ } .mathbook-content .terminology { @@ -1548,13 +1717,11 @@ table tr td { } */ +/* .mathbook-content .knowl .definition-like:last-child, .mathbook-content .knowl .theorem-like:last-child, .mathbook-content .knowl .remark-like:last-child, .mathbook-content .knowl .example-like:last-child, .mathbook-content .knowl .exercise-like:last-child, .mathbook-content .knowl .objectives:last-child { margin-bottom: 0.3em; } - -.mathbook-content a { - color: inherit; -} +*/ /* to stop things being blue when rendering MathJax with SVG */ a.mjx-svg-href { @@ -1593,7 +1760,10 @@ a.mjx-svg-href { } /* to allow big math in knowl links */ +/* .mathbook-content .hidden-knowl-wrapper a .mjx-chtml { +*/ +.mathbook-content a .mjx-chtml { z-index: 1; background: #fff; } @@ -1718,10 +1888,6 @@ a.mjx-svg-href { margin-left: 1.5em; } -.mathbook-content article.exercise-like .hint [knowl]{ - font-weight: lighter; -} - /* .mathbook-content .exercise-like .hint { display: block; @@ -1775,10 +1941,6 @@ a.mjx-svg-href { margin-top: -0.75em; } -.mathbook-content article.example-like .hint [knowl]{ - font-weight: lighter; -} - .mathbook-content .exercisegroup .exercisegroup-exercises.cols2, .mathbook-content .exercisegroup .exercisegroup-exercises.cols3, .mathbook-content .exercisegroup .exercisegroup-exercises.cols4, .mathbook-content .exercisegroup .exercisegroup-exercises.cols5, .mathbook-content .exercisegroup .exercisegroup-exercises.cols6 { width: 100%; @@ -1819,6 +1981,23 @@ a.mjx-svg-href { .mathbook-content .console { font-family: "Inconsolata", monospace; } +.mathbook-content .code-inline { + font-size: 1em; +/* line-height: 1.38889em; +*/ + white-space: nowrap; + color: inherit; + background: #eeeeee; + border: 1px solid #dddddd; + padding: 0.0625em 0.25em; + margin-left: 0.2em; + margin-right: 0.2em; + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + -ms-border-radius: 0.2em; + -o-border-radius: 0.2em; + border-radius: 0.2em; +} .mathbook-content .sagecell_sessionOutput pre { font-family: 'Inconsolata', monospace; @@ -2474,6 +2653,23 @@ article.list .heading .codenumber + .title:before { margin-top: 3ex; } +.mathbook-content .frontmatter .contributors, .mathbook-content .book .contributors { + text-align: center; + font-style: normal; +} + +.mathbook-content .frontmatter > .heading .title, .mathbook-content .book > .heading .title { + font-size: 1.3em; +} +.mathbook-content .frontmatter > .heading .subtitle, .mathbook-content .book > .heading .subtitle { + display: block; + font-weight: normal; + color: #666666; + font-size: 0.875em; + line-height: 1.42857em; + margin-top: 0.35714em; +} + .searchwrapper { max-width: 900px; @@ -2630,9 +2826,7 @@ http://mathbook.pugetsound.edu/examples/sample-article/html/interesting-corollar margin-bottom: 0.25em; } */ -.mathbook-content .conclusion p:last-child { - margin-bottom: 0.25em; -} + /* not sure about these two. there may be bad side-effects */ /* .mathbook-content .example-like p { @@ -2715,7 +2909,10 @@ and condider having this replace line 3338 of the general code (which uses .head display: none; } -#masthead .banner .container a img { - font-size: 25%; -} +/* +To delete when moving to pretextbook.org: + +all .hidden-knowl-wrapper +*/ + From 5d61b1490a8e7afc79b25a06d454426f7c28c074 Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Sat, 30 Dec 2017 14:08:37 -0500 Subject: [PATCH 08/11] delete _addon.css. was it actually used? --- scss/_addon.scss | 193 ----------------------------------------------- 1 file changed, 193 deletions(-) diff --git a/scss/_addon.scss b/scss/_addon.scss index 22e7e31..e69de29 100644 --- a/scss/_addon.scss +++ b/scss/_addon.scss @@ -1,193 +0,0 @@ -.hint { - display:block; - - [knowl] { - font-weight:lighter; - } -} - -img { - display: block; - margin-left: auto; - margin-right: auto; -} - - -div.center img { - display: block; - margin-left: auto; - margin-right: auto; -} - -.caption { - margin-top: 10px; - margin-left: auto; - margin-right: auto; - font-size: 100%; - text-align: center; -} - -.caption .counter:after { content: " ";} - -/* above repeated for captions outside figures */ - -.caption .heading { - font-weight: bold; -} - -.caption .heading:after { content: " ";} - -.caption .counter { - font-weight: bold; -} - -.unprocessed { - padding: 8px; - background-color: rgb(255,230,230) -} - -.unprocessed .unprocessed { - margin: 8px; - background-color: rgb(255,200,255) -} - -.unprocessed .unprocessed .unprocessed { - margin: 8px; - background-color: rgb(205,205,255) -} - -.l { - text-align: left; -} - -.c { - text-align: center; -} - -.r { - text-align: right; -} - -.vv { - border-left: 2px solid #000000; - border-right: 2px solid #000000; -} - -.vcv { - border-left: 2px solid #000000; - border-right: 2px solid #000000; - text-align: center; -} - -.vcvv { - border-left: 2px solid #000000; - border-right: 4px solid #000000; - text-align: center; -} - -.vlv { - border-left: 2px solid #000000; - border-right: 2px solid #000000; - text-align: left; -} - -.vrv { - border-left: 2px solid #000000; - border-right: 2px solid #000000; - text-align: right; -} - -.rv { - border-right: 2px solid #000000; - text-align: right; -} - -.lv { - border-right: 2px solid #000000; - text-align: left; -} - -.cv { - border-right: 2px solid #000000; - text-align: center; -} - -.Xv { - border-right: 2px solid #000000; - text-align: left; -} -.vc { - border-left: 2px solid #000000; - text-align: center; -} - -.abstract + .preface { - margin-top: 35px; -} - -#navbar #toc h2 + h2 { - margin-top: 5px; -} - -// TODO copy exercise like to others -.example-like > .heading, .exercise-like > .heading, .remark-like > .heading, aside-like > .heading, .exercise-like > h5, .example-like > h5, .remark-like > h5, .aside-like > h5 { - display: inline; - font-weight: bold; - font-size: 19px; - font-size: 1.05em; -} - -.example-like > h5 + p, .exercise-like > h5 + p, .remark-like > h5 + p, .aside-like > h5 + p { - display: inline; -} - -.exercise-like > h5:after, .example-like > h5:after, .remark-like > h5:after { - content:". "; -} - -.exercise-like > h5 .counter:before, .example-like > h5 .counter:before, .remark-like > h5 .counter:before { - content:" "; -} - -article.example-like > article.remark-like { - margin-top: 10pt; -} - -.minipage + .minipage { - display: inline-block; -} - -#prevnext { - right: 20px; - margin-right: 1px; - margin-top: -45px; - margin-bottom: -10px; - text-align: right; - max-width: 960px; -} - -/* - * The next section link at the footer of a section - * TODO use link-directional mixin instead - */ -.nextsection { - text-align: center; - padding: 10px; - background-color: maroon; - color: #FFEECC; - font-size: -} - -// TODO integrate this somehow! -/* sup knowls are used for footnotes */ -sup [knowl] { - padding: 0px 0px 0px 3px; -} - -sup .active[knowl] { - padding: 0px 0px 0px 3px; -} - -sup [knowl]:hover { - padding: 0px 0px 0px 3px; -} From fe2b7c491e0d97300407cc22afe679d8caa8204d Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Sat, 30 Dec 2017 14:15:50 -0500 Subject: [PATCH 09/11] partially remove knowls css --- scss/content/mixins/_environment.scss | 9 ++--- scss/content/partials/_knowl.scss | 48 ++------------------------- 2 files changed, 4 insertions(+), 53 deletions(-) diff --git a/scss/content/mixins/_environment.scss b/scss/content/mixins/_environment.scss index 8332910..7d4be30 100644 --- a/scss/content/mixins/_environment.scss +++ b/scss/content/mixins/_environment.scss @@ -3,9 +3,9 @@ @import "../../shared/_heading.scss"; @import "../../shared/_knowl.scss"; -$environment-heading-font-size: $typography-font-size-h5 !default; +// $environment-heading-font-size: $typography-font-size-h5 !default; // $environment-heading-after: ".\2009 " !default; -$environment-heading-after: "" !default; +// $environment-heading-after: "" !default; // Defaults for environments @mixin environment-base { @@ -24,11 +24,6 @@ $environment-heading-after: "" !default; @include heading-link(); } - /* Support knowl links in headings */ - *[knowl] { - @include knowl-link($font-type:serif); - margin-left:-3px; - } } // Default to inline heading diff --git a/scss/content/partials/_knowl.scss b/scss/content/partials/_knowl.scss index fd980ba..b3f95cf 100644 --- a/scss/content/partials/_knowl.scss +++ b/scss/content/partials/_knowl.scss @@ -4,59 +4,15 @@ @import "../../shared/knowl"; @import "../../shared/zig-zag"; -/* Links that open knowls */ -*[knowl] { - @include knowl-link(); -} - // Border colors at different levels of knowl-within-knowl nesting // They get darker the further they are nested so as to draw attention // to ones the user cared about most recently // // Code border colors use the same progression // Other embedded objects should do likewise +/* $level-1-border-color: darken($knowl-border-color, 5%); $level-2-border-color: darken($knowl-border-color, 10%); $level-3-border-color: darken($knowl-border-color, 15%); +*/ -.knowl-output { - @include knowl-output(); - - // Alter code border color to match knowl bg - $code-border-color: $level-1-border-color; - $code-bg-color: $knowl-nested-bg-color; - @import "code"; - - // TODO Add other embedded object overrides here -} - -.knowl-output .knowl-output { - - @include knowl-output( - $bg-color: $knowl-nested-bg-color, - $border-width: $knowl-nested-border-width, - $border-color: $level-1-border-color - ); - - // Alter code border color to match knowl bg - $code-border-color: $level-2-border-color; - $code-bg-color:$knowl-bg-color; - @import "code"; - - // TODO Add other embedded object overrides here -} - -.knowl-output .knowl-output .knowl-output { - - @include knowl-output( - $border-width: $knowl-nested-border-width, - $border-color: $level-2-border-color - ); - - // Alter code border color to match knowl bg - $code-border-color: $level-3-border-color; - $code-bg-color:$knowl-nested-bg-color; - @import "code"; - - // TODO Add other embedded object overrides here -} From 6c4ac4375179ad45f1bdcbc2a4e557a7cfb34b2c Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Mon, 1 Jan 2018 11:08:49 -0500 Subject: [PATCH 10/11] almost done eliminating .mathbook --- mathbook-add-on.css | 6 ++ scss/content/mixins/_environment.scss | 2 +- scss/content/mixins/_section.scss | 5 - scss/shared/_knowl.scss | 150 -------------------------- 4 files changed, 7 insertions(+), 156 deletions(-) diff --git a/mathbook-add-on.css b/mathbook-add-on.css index 4874f9b..1481583 100644 --- a/mathbook-add-on.css +++ b/mathbook-add-on.css @@ -1998,6 +1998,12 @@ a.mjx-svg-href { -o-border-radius: 0.2em; border-radius: 0.2em; } +.mathbook-content .title .code-inline { + padding-left: 0; + padding-right: 0; + margin-left: 0; + margin-right: 0; +} .mathbook-content .sagecell_sessionOutput pre { font-family: 'Inconsolata', monospace; diff --git a/scss/content/mixins/_environment.scss b/scss/content/mixins/_environment.scss index 7d4be30..5b7c258 100644 --- a/scss/content/mixins/_environment.scss +++ b/scss/content/mixins/_environment.scss @@ -5,7 +5,7 @@ // $environment-heading-font-size: $typography-font-size-h5 !default; // $environment-heading-after: ".\2009 " !default; -// $environment-heading-after: "" !default; +$environment-heading-after: "" !default; // Defaults for environments @mixin environment-base { diff --git a/scss/content/mixins/_section.scss b/scss/content/mixins/_section.scss index 633f018..850f10e 100644 --- a/scss/content/mixins/_section.scss +++ b/scss/content/mixins/_section.scss @@ -27,11 +27,6 @@ $section-heading-size-level-3: h5 !default; @include heading-link(); } - /* Support knowl links in headings */ - *[knowl] { - @include knowl-link($font-type: serif); - margin-left:-3px; - } } // @include margin-trailer($section-margin-lines); } diff --git a/scss/shared/_knowl.scss b/scss/shared/_knowl.scss index 7a9b7ad..deda7cf 100644 --- a/scss/shared/_knowl.scss +++ b/scss/shared/_knowl.scss @@ -42,107 +42,6 @@ $knowl-margin-bottom: 12px !default; $font-type: sans-serif ) { - $border-width-base: 1px; - $border-width-hover: 2px; - $underline-offset: $typography-underline-offset-sans-serif; - @if($font-type == serif) { - $underline-offset: $typography-underline-offset-serif; - } - - $transition-duration: 0ms; - $padding-horizontal: 3px; /* not used? */ - $padding-horizontal-right: 2px; - $padding-horizontal-left: 2px; - - &, &:hover, &.active { - position:relative; - color: $color; - background: transparent; - padding:0px $padding-horizontal-right 0px $padding-horizontal-left; - margin:0; - text-decoration:none; - - /* add a bottom margin so the line - * doesn't jump onHover. - */ - /*margin-bottom: 1px;*/ - /*border-bottom: 1px dotted $color;*/ - - margin-bottom:0; - border-bottom: none; - - font-weight:500; - //line-height:1.3; - white-space: nowrap; - // @include inline-block(baseline); // why was it set to inline-block? - @include border-top-left-radius($border-radius); - @include border-top-right-radius($border-radius); - /* Prevent accidental text selection on click */ - @include user-select(none); - @include transition-property(background-color); - @include transition-duration($transition-duration); - - /** - * This gets us an underline that's a bit tighter with the baseline - * instead of awkwardly floating below like a border on the parent - */ - &:after { - content: ""; - position:absolute; - top:0; - bottom: $border-width-hover - $border-width-base; - right:$padding-horizontal-right * 1.2; - left:$padding-horizontal-left * 1.2; - - /* Smooth out the transition from underline to border */ - @include transition-property(left,right); - @include transition-duration($transition-duration); - - border-bottom: $border-width-base dotted $color; - /*@include typography-underline(*/ - /*$color,*/ - /*$underline-style: dotted,*/ - /*$underline-size: .1,*/ - /*$underline-offset: $underline-offset);*/ - /* Display under parent content, but above parent background */ - z-index:0; - } - } - - &:hover, &:active, &.active { - color: darken($border-color, 65%); - background: lighten($border-color, 4%); - text-decoration:none; - - /* See comment on default style's border/margin */ - margin-bottom:0; - /*border-bottom:2px solid darken($border-color, 15%);*/ - /*border-bottom: none;*/ - - &:after { - border-bottom:$border-width-hover solid darken($border-color, 15%); - left:0; - right:0; - bottom:0; - /*@include typography-underline(*/ - /*darken($border-color, 32.5%),*/ - /*$underline-size: .1,*/ - /*$underline-offset: $underline-offset);*/ - } - } - - &:active { - color: $brand-secondary; - background: $brand-secondary-light; - - &:after { - border-color: $brand-secondary; - } - } - - &.active { - background: $border-color; - } } @mixin knowl-output( @@ -152,54 +51,5 @@ $knowl-margin-bottom: 12px !default; $border-radius: $knowl-border-radius, $margin-bottom: $knowl-margin-bottom ) { -// $has-ragged-top: $knowl-has-ragged-top, -// $ragged-top-height: $knowl-ragged-top-height - & { -// set in master knowlstyle border: $border-width solid $border-color; - border-color: $border-color; - background: $bg-color; - @include border-radius($border-radius); - margin-bottom:$margin-bottom; - } - - // TODO could be refactored into seperate mixin so that option could - // be exposed with a class on body -// @if($has-ragged-top) { -// & { -// position:relative; -// /* Keep a small border to maintain margin-collapse */ -// border-top-width:1px; -// margin-top:$ragged-top-height; -// -// @include border-top-radius(0); -// } -// -// &:before { -// content:""; -// position:absolute; -// position:absolute; -// top:0; -// left:0; -// right:0; -// margin-top: -$ragged-top-height; -// margin-left:-$border-width; -// margin-right:-$border-width; -// @include zig-zag-edge($border-color, $ragged-top-height); -// } -// } - - .knowl-footer { - font-size:x-small; - color: darken($border-color, 60%); - background: $border-color; -// the master setting from knowlstyle.css seem okay to me -// bottom: -$border-width; -// padding:1px 0px 1px $border-width; - } - .knowl-content { - /* Better to apply a margin, so that heading margins collapse */ - padding:0; - margin: $knowl-padding; - } } From 655dbd96db0fe7d8639ee278d035b424c1477e58 Mon Sep 17 00:00:00 2001 From: "David W. Farmer" Date: Sun, 15 Apr 2018 12:23:14 -0400 Subject: [PATCH 11/11] catch-up before splitting --- mathbook-add-on.css | 756 ++++++++++++++++++-------- scss/mathbook-content-prefixed.scss | 7 - scss/mathbook-content.scss | 2 + scss/mathbook.scss | 11 - scss/ui/mixins/_sliding-sidebars.scss | 27 - scss/ui/partials/_layout.scss | 43 +- 6 files changed, 540 insertions(+), 306 deletions(-) diff --git a/mathbook-add-on.css b/mathbook-add-on.css index 1481583..1fdfb32 100644 --- a/mathbook-add-on.css +++ b/mathbook-add-on.css @@ -32,9 +32,20 @@ so that we can set our own later */ margin-bottom: 0; line-height: 1.35; } +.mathbook-content td > p:first-child { + margin-top: 0; +} +.mathbook-content p.intertext { + margin-top: -0.25em; + text-indent: 0; +} + .mathbook-content ol, .mathbook-content ul { margin-bottom: 0; } +.mathbook-content li { + margin-bottom: 0; +} .mathbook-content figure { margin-bottom: 0; } @@ -45,16 +56,6 @@ so that we can set our own later */ margin-bottom: 0; } -/* -.mathbook-content section > article { - margin-top: 1.25em; - margin-bottom: 0; -} -.mathbook-content .introduction + article, -.mathbook-content p + article { - margin-top: 1.25em; -} -*/ .mathbook-content section article { margin-top: 1.25em; } @@ -62,6 +63,12 @@ so that we can set our own later */ .mathbook-content section .posterior + article { margin-top: 1.75em; } +.mathbook-content article + .hidden-knowl-wrapper { + margin-top: 1em; +} +.mathbook-content article + .posterior { + margin-top: 0.5em; +} .mathbook-content section .proof { margin-top: 0.75em; } @@ -76,6 +83,9 @@ so that we can set our own later */ .mathbook-content .conclusion { margin-top: 1em; } +.mathbook-content .conclusion > p:first-child { + margin-top: 0.5em; +} .mathbook-content ol, .mathbook-content ul { margin-top: 0.75em; @@ -102,8 +112,14 @@ so that we can set our own later */ } .mathbook-content dl dt, .mathbook-content dl dd { + margin-top: 1.5em; +} +.mathbook-content dl dd p { margin-top: 1em; } +.mathbook-content dl dt > p:first-child, .mathbook-content dl dd > p:first-child { + margin-top: 0; +} .mathbook-content dl dt:first-of-type, .mathbook-content dl dd:first-of-type { margin-top: 0; @@ -113,6 +129,56 @@ so that we can set our own later */ display: block; text-align: center; } +.mathbook-content .frontmatter > .heading .title, .mathbook-content .book > .heading .title { + font-size: 1.3em; +} +.mathbook-content .frontmatter > .heading .subtitle, .mathbook-content .book > .heading .subtitle { + display: block; + font-weight: normal; + color: #666666; + font-size: 0.875em; + line-height: 1.42857em; + margin-top: 0.35714em; +} + +.mathbook-content .frontmatter .author:first-of-type { + margin-top: 4em; +} +.mathbook-content .frontmatter > p:first-of-type { + margin-top: 4em; +} +.mathbook-content .frontmatter > .author, +.mathbook-content .frontmatter > .credit { + margin-top: 2em; + text-align: center; +} +.mathbook-content .frontmatter .date { + display: block; + margin-top: 2em; + text-align: center; +} +.mathbook-content .frontmatter .credit .title { + font-size: 1em; +} +.mathbook-content .frontmatter .credit .author { + font-size: 0.9em; +} +.mathbook-content .frontmatter .author-info { + font-size: 90%; +} +.mathbook-content .frontmatter a[href^="mailto:"] { + font-size: 110%; + text-decoration: none; +} +.mathbook-content a[href^="mailto:"] { + font-style: normal; + font-family: monospace; +} +/* look into where .preface and .frontmatter are used */ +.mathbook-content .preface a[href^="mailto:"] { + font-size: 110%; +} + .mathbook-content article > .heading + p { margin-top: 0; @@ -158,7 +224,9 @@ so that we can set our own later */ } -.mathbook-content section article .heading, .mathbook-content section section article .heading { +.mathbook-content section article .heading, +.mathbook-content section section article .heading, +.mathbook-content .abstract .heading { font-size: 1.125em; line-height: 1.125em; margin-top: 0; @@ -181,36 +249,14 @@ so that we can set our own later */ .mathbook-content .heading.hide-type > .type { display: none; } -/* -.mathbook-content section > .heading > .type + .codenumber::before, -.mathbook-content article > .heading > .type + .codenumber::before, -.mathbook-content article > a > .heading > .type + .codenumber::before -*/ + .mathbook-content .heading > .type + .codenumber::before { content: " "; } -/*.mathbook-content section > .heading > .codenumber:not(:empty) + .title::before, -.mathbook-content article > .heading > .codenumber:not(:empty) + .title::before, -.mathbook-content article > a > .heading > .codenumber:not(:empty) + .title::before -.mathbook-content section > .heading > .codenumber:not(:empty) + .title::before { - content: ": \2009"; -} -*/ -/* -.mathbook-content section:not(.chapter) .heading > .codenumber:not(:empty) + .title::before { -*/ .mathbook-content section .heading > .codenumber:not(:empty) + .title::before { content: " \2009"; } -.mathbook-content article > .heading > .title:not(:empty):last-child::after { - content: ".\2009"; -} -/* when hidden in a knowl, don't need the space at the end */ -.mathbook-content article > a > .heading > .title:last-child::after { - content: "."; -} - /* * Contents of articles @@ -261,7 +307,9 @@ so that we can set our own later */ margin: 0; text-decoration: none; margin-bottom: 1px; +/* margin-bottom: 0; +*/ font-weight: 500; white-space: nowrap; border-bottom: none; @@ -287,7 +335,9 @@ so that we can set our own later */ [knowl]:hover, [knowl]:active, [knowl].active { color: #8a1200; background: #ffedeb; +/* margin-bottom: 0; +*/ border-bottom: none; } @@ -332,7 +382,9 @@ so that we can set our own later */ display: none; padding: 0px; margin-top: 10px; +/* margin-bottom: 0px; +*/ margin-right: 0px; } @@ -401,7 +453,8 @@ so that we can set our own later */ .mathbook-content p { background-color: #fff; -/* box-shadow: 0 0 0.5em 0.2em #fff; +/* + box-shadow: 0 0 0.5em 0.2em #fff; put this back after the major CSS refactor */ } @@ -440,8 +493,47 @@ contains only a theorem or definition. In good writing, can a section start with a Theorem? (apparently I think not) -Note: the styling for proofs is in the main CSS */ + +.mathbook-content .proof > .heading { + font-style: italic; + font-weight: normal; + /* It helps to have a little bit of extra space after proof */ + margin-right: 0.75em; +} + +/* +supplied by the general .type:after for headings +.mathbook-content .proof > .heading:after { + content: ". "; +} +*/ + +.mathbook-content .proof { + border-right: 1px solid #666; + padding-right: 0.625em; + margin-right: -0.725em; +} +.mathbook-content .proof:after { + content: ''; + border-bottom: 1px solid #666; + display: block; + margin-left: auto; + margin-right: -0.625em; + /* so the corner of the L meets */ + width: 1.5em; + padding-bottom: 0.25em; +} + +.mathbook-content .proof .proof { + margin-right: -0.2em; + border-right: 1.5px solid #ddd; +} +.mathbook-content .proof .proof:after { + border-bottom: 1.5px solid #ddd; + width: 1em; +} + .mathbook-content article.theorem-like:not(:first-child), .mathbook-content article.definition-like:not(:first-child), .mathbook-content article.example-like:not(:first-child), @@ -630,6 +722,12 @@ body > a.assistive:focus { font-weight: bold; margin-right: 1em; } +.collectedworks .work .title a { + text-decoration: none; + color: #009; +} +.collectedworks .work .title { +} /* see http://mathbook.pugetsound.edu/examples/sample-book/html/references-1.html */ .mathbook-content .bibitem + .bibentry { @@ -776,12 +874,8 @@ h2:last-child { margin-bottom: 100px; } -.mathbook-content section h2 a { - text-decoration: none; -} - -.mathbook-content section.introduction { - margin-bottom: 2em; +.mathbook-content section.introduction + section { + margin-top: 2em; } .mathbook-content { @@ -806,9 +900,11 @@ h2:last-child { display: block; margin-bottom: 1.25em; } +/* .mathbook-content .paragraphs p:last-child::after { margin-bottom: 0; } +*/ /* the next are to avoid styping a p as inline, because @@ -897,6 +993,7 @@ h2:last-child { vertical-align: middle; } +/* .mathbook-content .sidebyside { margin-bottom: 0; } @@ -906,28 +1003,13 @@ h2:last-child { .mathbook-content .sidebyside p:last-child { margin-bottom: 0; } +*/ .mathbook-content .sidebyside .sbsrow .sbsheader { margin-top: 0; } -/* -.mathbook-content .sidebyside { - text-align: justify; -} -*/ - -/* Deleted on 9/12/16 because it caused a blank line. - Figure out when it was supposed to do, and do it another way. - -.mathbook-content .sidebyside:after { - display:inline-block; - width:100%; - content:''; -} -*/ - .mathbook-content .sbsgroup { width: 100%; } @@ -936,8 +1018,12 @@ h2:last-child { width: 100%; } -/* see Ex 29 https://yoshiwarabooks.org/linear-functions.html */ -.mathbook-content p + .sidebyside { +/* see Ex 29 https://yoshiwarabooks.org/linear-functions.html +and ex 2.91 in +https://yoshiwarabooks.org/mfg/MathModels.html */ +.mathbook-content p + .sidebyside, +.mathbook-content ol + .sidebyside, +.mathbook-content ul + .sidebyside { margin-top: 1em; } @@ -955,11 +1041,9 @@ h2:last-child { /* titles, totally centered text */ .mathbook-content .sbsheader { -/* - display: flex; -*/ text-align: center; justify-content: center; + font-size: 1em; } /* containers of desired width for actual content */ @@ -967,6 +1051,9 @@ h2:last-child { display: flex; flex-direction: column; } +.mathbook-content .sbspanel > p:first-child { + margin-top: 0; +} /* fixed-width items are centered horizontally in their panel */ /* always used in conjunction with sbspanel */ @@ -986,22 +1073,21 @@ h2:last-child { -table { +.mathbook-content table { border-spacing: 0; } -/* -table { +.mathbook-content table { border-collapse: collapse; } -table tr td { - padding: 2px; +.mathbook-content table tr td { + padding-top: 2px; + padding-bottom: 2px; padding-left: 5px; padding-right: 5px; font-size: 90%; } -*/ .mathbook-content table tr td.l { text-align: left; @@ -1185,10 +1271,6 @@ table tr td { border-left: none; } -.mathbook-content table tr td p { - margin-bottom: 0; -} - .mathbook-content table tr td p + p { margin-top: 1em; } @@ -1206,10 +1288,6 @@ table tr td { margin-top: 1em; } -.mathbook-content ol li p, .mathbook-content ul li p { - margin-bottom: 0; -} - .mathbook-content .hidden-knowl-wrapper .hiddenproof, .mathbook-content section > article.hiddenproof { margin-top: 0.3em; @@ -1229,13 +1307,12 @@ table tr td { overflow: auto; } .mathbook-content figure.figure-like { -/* - margin-left: 0; - margin-right: 0; -*/ margin-left: auto; margin-right: auto; } +.mathbook-content p + figure.figure-like > table { + margin-top: 1em; +} /* .mathbook-content .sbscaption { width: 100%! important; @@ -1246,11 +1323,6 @@ table tr td { overflow: hidden; } -/* need to fix this in the main CSS code */ -.mathbook-content .proof { - padding-top: 0; -} - /* not sure where this was being used, but it made short knowls * look bad, like the hint here: * SAFurtherReading.html @@ -1357,7 +1429,6 @@ table tr td { margin-top: 0.2ex; padding-top: 0; /* display: inline; - * * ooooooo * * */ float: left; line-height: 0.95; @@ -1505,16 +1576,15 @@ table tr td { .mathbook-content .cols2 + *, .mathbook-content .cols3 + *, .mathbook-content .cols4 + *, .mathbook-content .cols5 + *, .mathbook-content .cols6 + * { clear: both; } + /* .mathbook-content .cols2 > li:last-child, .mathbook-content .cols3 > li:last-child, .mathbook-content .cols4 > li:last-child, .mathbook-content .cols5 > li:last-child, .mathbook-content .cols6 > li:last-child{ margin-bottom: 1.5em; } -/* see elsewhere for discussion about bargin bottom for hints */ -.mathbook-content .exercise-like .cols2 > li:last-child, .mathbook-content .exercise-like .cols3 > li:last-child, .mathbook-content .exercise-like .cols4 > li:last-child, .mathbook-content .exercise-like .cols5 > li:last-child, .mathbook-content .exercise-like .cols6 > li:last-child{ - margin-bottom: 0; -} +*/ -.mathbook-content ol.cols2:last-child > li:last-child, .mathbook-content ol.cols3:last-child > li:last-child, .mathbook-content ol.cols4:last-child > li:last-child, .mathbook-content ol.cols5:last-child > li:last-child, .mathbook-content ol.cols6:last-child > li:last-child, .mathbook-content ul.cols2:last-child > li:last-child, .mathbook-content ul.cols3:last-child > li:last-child, .mathbook-content ul.cols4:last-child > li:last-child, .mathbook-content ul.cols5:last-child > li:last-child, .mathbook-content ul.cols6:last-child > li:last-child { - margin-bottom: 0; +.mathbook-content section > ol:last-child, +.mathbook-content section > ul:last-child { + margin-bottom: 1.5em; } .mathbook-content .cols2:last-child::after, .mathbook-content .cols3:last-child::after, .mathbook-content .cols4:last-child::after, .mathbook-content .cols5:last-child::after, .mathbook-content .cols6:last-child::after { @@ -1523,19 +1593,11 @@ table tr td { clear: both; } -.mathbook-content .cols2 li:nth-child(2n+1) { - clear: left; -} -.mathbook-content .cols3 li:nth-child(3n+1) { - clear: left; -} -.mathbook-content .cols4 li:nth-child(4n+1) { - clear: left; -} -.mathbook-content .cols5 li:nth-child(5n+1) { - clear: left; -} -.mathbook-content .cols6 li:nth-child(6n+1) { +.mathbook-content .cols2 > li:nth-child(2n+1), +.mathbook-content .cols3 > li:nth-child(3n+1), +.mathbook-content .cols4 > li:nth-child(4n+1), +.mathbook-content .cols5 > li:nth-child(5n+1), +.mathbook-content .cols6 > li:nth-child(6n+1) { clear: left; } /* need to repeat for .colsN */ @@ -1543,30 +1605,29 @@ table tr td { margin-top: 0.5em; } -/* need to rethink paragraph spacing and have margin-top instead of margin-bottom, - so that hints in exercises don't have a lot of extra space above them */ - -.mathbook-content .exercise-like > .heading + p::after { - margin-bottom: 0; -} -.mathbook-content .exercise-like p + p { - margin-top: 1.25em; +.mathbook-content .cols2 > li, +.mathbook-content .cols3 > li, +.mathbook-content .cols4 > li, +.mathbook-content .cols5 > li, +.mathbook-content .cols6 > li { + float: left; } + +.mathbook-content .cols2 > li { width: 49%; } +.mathbook-content .cols3 > li { width: 33%; } +.mathbook-content .cols4 > li { width: 24.5%; } +.mathbook-content .cols5 > li { width: 19.5%; } +.mathbook-content .cols6 > li { width: 16.3%; } + /* 1.25 = ol top + li top ? looked too big with 0.75 below */ .mathbook-content .exercise-like p + ol { margin-top: 0.5em; } +/* .mathbook-content .exercise-like ol { margin-bottom: 0; } - -/* see http://bob.cs.sonoma.edu/IntroCompOrg-RPi/exercises-10.html - for examples of an odd number of items in a cols2, followed by - a hint */ -.mathbook-content .cols2 li:last-child:nth-child(odd) { - float: none !important; - padding-top: 0.5em; -} +*/ .mathbook-content .incontext { display: block; @@ -1656,6 +1717,35 @@ table tr td { content: attr(label) "\00A0\00A0 "; } +.mathbook-content ol.decimal { + list-style-type: decimal; +} +.mathbook-content ol.lower-alpha { + list-style-type: lower-alpha; +} +.mathbook-content ol.upper-alpha { + list-style-type: upper-alpha; +} +.mathbook-content ol.lower-roman { + list-style-type: lower-roman; +} +.mathbook-content ol.upper-roman { + list-style-type: upper-roman; +} +.mathbook-content ul.disc { + list-style-type: disc; +} +.mathbook-content ul.square { + list-style-type: square; +} +.mathbook-content ul.circle { + list-style-type: circle; +} +.mathbook-content ol.no-marker, +.mathbook-content ul.no-marker { + list-style-type: none; +} + /* The dl should behave more like the default on a narrow screen, * with the term and definition on separate lines. */ @@ -1664,6 +1754,10 @@ table tr td { margin-left: 0; } +.mathbook-content dl dt { + font-weight: bold; +} + .mathbook-content dl.description-list dt { float: left; clear: left; @@ -1743,6 +1837,50 @@ a.mjx-svg-href { } } +/* o show wide equation overflow even when no scroll bars, +from Jiří Lebl */ +/* +.MJXc-display, .figure-like { +*/ +.mathbook-content .MJXc-display, .mathbook-content .knowl-output .knowl-output .knowl-output .knowl-output .MJXc-display , +.mathbook-content pre.prettyprint, +.mathbook-content pre.plainprint { + background-image: linear-gradient(to right, white, white), linear-gradient(to right, white, white), linear-gradient(to right, rgba(0,0,0,.25), rgba(255,255,255,0)), linear-gradient(to left, rgba(0,0,0,.25), rgba(255,255,255,0)); + background-position: left center, right center, left center, right center; + background-repeat: no-repeat; + background-color: inherit; + background-size: 20px 100%, 20px 100%, 10px 100%, 10px 100%; + background-attachment: local, local, scroll, scroll; +} +.mathbook-content .knowl-output .MJXc-display { + background-image: none; + background-image: linear-gradient(to right, #f5f5ff, #f5f5ff), linear-gradient(to right, #f5f5ff, #f5f5ff), linear-gradient(to right, rgba(0,0,0,.25), rgba(243,243,255,0)), linear-gradient(to left, rgba(0,0,0,.25), rgba(243,243,255,0)); +} +.mathbook-content .assemblage-like .MJXc-display { + background-image: none; + background-image: linear-gradient(to right, #f4f4fe, #f4f4fe), linear-gradient(to right, #f4f4fe, #f4f4fe), linear-gradient(to right, rgba(0,0,0,.25), rgba(242,242,254,0)), linear-gradient(to left, rgba(0,0,0,.25), rgba(242,242,254,0)); +} + + +.mathbook-content .knowl-output .knowl-output .MJXc-display { + background-image: none; + background-image: linear-gradient(to right, #fffff5, #fffff5), linear-gradient(to right, #fffff5, #fffff5), linear-gradient(to right, rgba(0,0,0,.25), rgba(255,255,243,0)), linear-gradient(to left, rgba(0,0,0,.25), rgba(255,255,243,0)); +} +.mathbook-content .knowl-output .knowl-output .knowl-output .MJXc-display { + background-image: none; + background-image: linear-gradient(to right, #fff5fe, #fff5fe), linear-gradient(to right, #fff5fe, #fff5fe), linear-gradient(to right, rgba(0,0,0,.25), rgba(255,243,254,0)), linear-gradient(to left, rgba(0,0,0,.25), rgba(255,243,254,0)); +} + + +/* http://sites.wcsu.edu/mbxml/OER_Linear_Alg/glossary.html + to fix the extra margin on top of the next term when + the previous definition ends in display math + May need to make less specific +*/ +.mathbook-content dd .displaymath:last-child .MJXc-display { + margin-bottom: 0; +} + .floatnav { margin-top: 8px; margin-left: 50px; @@ -1763,7 +1901,14 @@ a.mjx-svg-href { /* .mathbook-content .hidden-knowl-wrapper a .mjx-chtml { */ +/* main page of sample book */ +/* .mathbook-content a .mjx-chtml { + background: inherit; +} +*/ +/* Example 4.8 of sample article (compare main page of sample book (4^{th} edition)`*/ +.mathbook-content a .heading .mjx-chtml { z-index: 1; background: #fff; } @@ -1794,7 +1939,7 @@ a.mjx-svg-href { margin-left: -.48em; margin-right: -.2em;} .mathbook-content .latex-logo .E {vertical-align:-.5ex; text-transform: uppercase; - margin-left: -.18em; margin-right: -.12em} + margin-left: -.18em; margin-right: -.12em; } /* .mathbook-content .posterior { @@ -1814,8 +1959,12 @@ a.mjx-svg-href { margin-bottom: 1.0em; } .mathbook-content .exercisegroup article.exercise-like p { - margin: 0; + margin-top: 0.5em; } +.mathbook-content .exercisegroup article.exercise-like li > p:first-child { + margin-top: 0; +} + .mathbook-content .exercisegroup article.exercise-like .heading { margin: 0; } @@ -1825,12 +1974,17 @@ a.mjx-svg-href { .mathbook-content .exercisegroup .hidden-knowl-wrapper { margin: 0; } +/* .mathbook-content .exercisegroup .exercise-like .heading + p:after { margin: 0; } .mathbook-content .exercisegroup .introduction .heading + p:last-child { margin-bottom: 0.5em; } +*/ +.mathbook-content .exercisegroup article + article { + margin-top: 1em; +} .mathbook-content .exercises .exercise-like figcaption .heading { font-weight: bold; @@ -1852,12 +2006,6 @@ a.mjx-svg-href { margin-left: 0; } -.mathbook-content article + .hidden-knowl-wrapper { - margin-top: 1em; -} -.mathbook-content article + .posterior { - margin-top: 0.5em; -} .mathbook-content .exercisegroup article + .hidden-knowl-wrapper { margin-left: 4em; } @@ -1871,9 +2019,6 @@ a.mjx-svg-href { .mathbook-content .exercisegroup .exercise-like .conclusion { margin-left: 1.5em; } -/* -.mathbook-content section > p + .hidden-knowl-wrapper { -*/ .mathbook-content section > .hidden-knowl-wrapper { margin-top: 1em; } @@ -1901,7 +2046,7 @@ a.mjx-svg-href { .mathbook-content .exercise-like .introduction .heading { display: inline; } -.mathbook-content .exercise-like .introduction p { +.mathbook-content .exercise-like .introduction p:first-child { display: inline; } .mathbook-content .exercise-like .introduction::after { @@ -1960,16 +2105,18 @@ a.mjx-svg-href { display: block; } +/* .mathbook-content .exercisegroup .exercisegroup-exercises article.exercise-like { margin-top: 0; } +*/ -.mathbook-content .exercisegroup .cols1 article.exercise-like {flex-basis: calc(100% - 2em);} -.mathbook-content .exercisegroup .cols2 article.exercise-like {flex-basis: calc(50% - 2em);} -.mathbook-content .exercisegroup .cols3 article.exercise-like {flex-basis: calc(33.33% - 2em);} -.mathbook-content .exercisegroup .cols4 article.exercise-like {flex-basis: calc(25% - 2em);} -.mathbook-content .exercisegroup .cols5 article.exercise-like {flex-basis: calc(20% - 2em);} -.mathbook-content .exercisegroup .cols6 article.exercise-like {flex-basis: calc(16.66% - 2em);} +.mathbook-content .exercisegroup .cols1 > article.exercise-like {flex-basis: calc(100% - 2em);} +.mathbook-content .exercisegroup .cols2 > article.exercise-like {flex-basis: calc(50% - 2em);} +.mathbook-content .exercisegroup .cols3 > article.exercise-like {flex-basis: calc(33.33% - 2em);} +.mathbook-content .exercisegroup .cols4 > article.exercise-like {flex-basis: calc(25% - 2em);} +.mathbook-content .exercisegroup .cols5 > article.exercise-like {flex-basis: calc(20% - 2em);} +.mathbook-content .exercisegroup .cols6 > article.exercise-like {flex-basis: calc(16.66% - 2em);} /* .mathbook-content .exercisegroup .cols3 article.exercise-like {flex-basis: calc(100% / 3 - 2em);} .mathbook-content .exercisegroup .cols6 article.exercise-like {flex-basis: calc(100% / 6 - 2em);} @@ -2024,41 +2171,31 @@ a.mjx-svg-href { margin-top: 0; } -/* need more generally: see next -.mathbook-content .assemblage-like + .assemblage-like { - margin-top: 3ex; -} -*/ -/* -.mathbook-content .assemblage-like { - margin-top: 1ex; - margin-bottom: 2ex; -} -*/ -/* obsolete once we refactor paragraph spacing */ -.mathbook-content .assemblage-like > p:last-child, .mathbook-content .assemblage-like > ul:last-child, .mathbook-content .assemblage-like > ol:last-child { - margin-bottom: 0; +.mathbook-content .assemblage-like + .sidebyside { + margin-top: 1.25em; } - .mathbook-content .booktitle { font-style: oblique; } -/* -.mathbook-content .definition-like > .heading .type:last-child:after, .mathbook-content .theorem-like > .heading .type:last-child:after, .mathbook-content .remark-like > .heading .type:last-child:after, .mathbook-content .example-like > .heading .type:last-child:after, .mathbook-content .exercise-like > .heading .type:last-child:after, .mathbook-content .definition-like > .heading .codenumber:last-child:after, .mathbook-content .theorem-like > .heading .codenumber:last-child:after, .mathbook-content .remark-like > .heading .codenumber:last-child:after, .mathbook-content .example-like > .heading .codenumber:last-child:after, .mathbook-content .exercise-like > .heading .codenumber:last-child:after, .mathbook-content .definition-like > .heading .title:last-child:after, .mathbook-content .theorem-like > .heading .title:last-child:after, .mathbook-content .remark-like > .heading .title:last-child:after, .mathbook-content .example-like > .heading .title:last-child:after, .mathbook-content .exercise-like > .heading .title:last-child:after, .mathbook-content .definition-like > header > .heading .type:last-child:after, .mathbook-content .theorem-like > header > .heading .type:last-child:after, .mathbook-content .remark-like > header > .heading .type:last-child:after, .mathbook-content .example-like > header > .heading .type:last-child:after, .mathbook-content .exercise-like > header > .heading .type:last-child:after, .mathbook-content .definition-like > header > .heading .codenumber:last-child:after, .mathbook-content .theorem-like > header > .heading .codenumber:last-child:after, .mathbook-content .remark-like > header > .heading .codenumber:last-child:after, .mathbook-content .example-like > header > .heading .codenumber:last-child:after, .mathbook-content .exercise-like > header > .heading .codenumber:last-child:after, .mathbook-content .definition-like > header > .heading .title:last-child:after, .mathbook-content .theorem-like > header > .heading .title:last-child:after, .mathbook-content .remark-like > header > .heading .title:last-child:after, .mathbook-content .example-like > header > .heading .title:last-child:after, .mathbook-content .exercise-like > header > .heading .title:last-child:after { - content: ".\2009 "; +.mathbook-content .poem { + margin-top: 1.5em; +} + +/* when hidden in a knowl, don't need the space at the end */ +.mathbook-content article > a > .heading > .title:not(.punctuated):last-child::after { + content: "."; } -*/ .mathbook-content article > .heading .type:last-child::after, .mathbook-content article > .heading .codenumber:last-child::after, -.mathbook-content article > .heading .title:not(:empty):last-child::after { +.mathbook-content article > .heading .title:not(:empty):not(.punctuated):last-child::after { content: ".\2009 "; } .mathbook-content .aside-like > .heading .type:last-child::after, .mathbook-content .aside-like > .heading .codenumber:last-child::after, -.mathbook-content .aside-like > .heading .title:last-child::after { +.mathbook-content .aside-like > .heading .title:not(:empty):not(.punctuated):last-child::after { content: ":\2009 "; } @@ -2066,19 +2203,6 @@ a.mjx-svg-href { content: ""; } -/* need sample use case for these */ -/* -.mathbook-content a .definition-like > .heading .type:last-child:after, .mathbook-content a .theorem-like > .heading .type:last-child:after, .mathbook-content a .remark-like > .heading .type:last-child:after, .mathbook-content a .example-like > .heading .type:last-child:after, .mathbook-content a .exercise-like > .heading .type:last-child:after, .mathbook-content a .definition-like > .heading .codenumber:last-child:after, .mathbook-content a .theorem-like > .heading .codenumber:last-child:after, .mathbook-content a .remark-like > .heading .codenumber:last-child:after, .mathbook-content a .example-like > .heading .codenumber:last-child:after, .mathbook-content a .exercise-like > .heading .codenumber:last-child:after, .mathbook-content a .definition-like > .heading .title:last-child:after, .mathbook-content a .theorem-like > .heading .title:last-child:after, .mathbook-content a .remark-like > .heading .title:last-child:after, .mathbook-content a .example-like > .heading .title:last-child:after, .mathbook-content a .exercise-like > .heading .title:last-child:after, .mathbook-content a .definition-like > header > .heading .type:last-child:after, .mathbook-content a .theorem-like > header > .heading .type:last-child:after, .mathbook-content a .remark-like > header > .heading .type:last-child:after, .mathbook-content a .example-like > header > .heading .type:last-child:after, .mathbook-content a .exercise-like > header > .heading .type:last-child:after, .mathbook-content a .definition-like > header > .heading .codenumber:last-child:after, .mathbook-content a .theorem-like > header > .heading .codenumber:last-child:after, .mathbook-content a .remark-like > header > .heading .codenumber:last-child:after, .mathbook-content a .example-like > header > .heading .codenumber:last-child:after, .mathbook-content a .exercise-like > header > .heading .codenumber:last-child:after, .mathbook-content a .definition-like > header > .heading .title:last-child:after, .mathbook-content a .theorem-like > header > .heading .title:last-child:after, .mathbook-content a .remark-like > header > .heading .title:last-child:after, .mathbook-content a .example-like > header > .heading .title:last-child:after, .mathbook-content a .exercise-like > header > .heading .title:last-child:after, { - content: ""; -} -*/ - -/* FOr exercises, etc, hidden in knowls */ -/* -.mathbook-content a .definition-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .theorem-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .remark-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .example-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .exercise-like > .heading .codenumber:not(:empty)::after, .mathbook-content a .theorem-like > header > .heading .codenumber:not(:empty)::after, .mathbook-content a .remark-like > header > .heading .codenumber:not(:empty)::after, .mathbook-content a .example-like > header > .heading .codenumber:not(:empty)::after, .mathbook-content a .exercise-like > header > .heading .codenumber:not(:empty)::after { - content: ": \2009"; -} -*/ .mathbook-content a article > .heading .codenumber:not(:empty)::after { content: ": \2009"; } @@ -2138,9 +2262,13 @@ a.mjx-svg-href { body, html body { background: #fff; } -figure { - margin-top: 10px; +.mathbook-content figure { + margin-top: 0.5em; +} +.mathbook-content article > figure:first-child { + margin-top: 0; } + .mathbook-content figure + figure, .mathbook-content figure + .sidebyside, .mathbook-content .sidebyside + .sidebyside, @@ -2155,8 +2283,8 @@ figure { margin-right: auto; } +/* is .cs for commutative diagrams? */ .mathbook-content img.cs { - display: block; margin-top: 20px; margin-bottom: 20px; @@ -2164,12 +2292,7 @@ figure { margin-right: auto; } -.mathbook-content img.cs.svg { - /* transform: scale(1.3); - */ -} - -img:not(.cs) { +.mathbook-content img:not(.cs) { max-width: 550px; } @@ -2186,22 +2309,16 @@ figure img { display: block; margin-left: auto; margin-right: auto; - max-width: 550px; } figure img + img { margin-top: 30px; } -figure.wrap img { - width: 250px; -} - div.center img { display: block; margin-left: auto; margin-right: auto; - max-width: 550px; } div.center + div.center > img { @@ -2226,11 +2343,18 @@ figure table { } +figure.wrap img { + width: 250px; +} figure.wrap { float: right; margin-right: 0; margin-left: 30px; } +figure img.wrap { + float: right; + margin: 0; +} figure figcaption.wrap { margin: 10px; @@ -2238,11 +2362,23 @@ figure figcaption.wrap { text-align: center; } -figure img.wrap { - float: right; - margin: 0; +.mathbook-content .sbspanel > img:not(.draw_on_me):not(.mag_popup), +.mathbook-content figure > img:not(.draw_on_me):not(.mag_popup) { + cursor: zoom-in; +} +.mathbook-content img.mag_popup { + border: 1px solid #666; + box-shadow: 5px 10px 5px #999; + cursor: zoom-out; + max-width: 600px; + margin-right: 50px; +} +.mathbook-content .mag_popup_container { + width:100%; + position:absolute; + z-index:1001; + overflow-x: auto; } - .caption .counter:after { content: " ";} @@ -2299,7 +2435,8 @@ sup [knowl]:hover { margin-top: 0; padding-left: 15px; border-left: 1px solid #aaa; - font-size: 110%; + font-size: 93%; + overflow: auto; /* preveiously turned off the border and padding from pretty.css */ } @@ -2314,12 +2451,14 @@ sup [knowl]:hover { width: 2.5em; } +/* .mathbook-content article.example-like > *:last-child { margin-bottom: 0; } .mathbook-content article.example-like > *:last-child::after { margin-bottom: 0; } +*/ /* List 12.3 at http://mathbook.pugetsound.edu/examples/sample-article/html/section-12.html [[put somethign here]] .mathbook-content article.example-like + .posterior { @@ -2327,6 +2466,7 @@ sup [knowl]:hover { } */ +/* .mathbook-content article.proof > *:last-child { margin-bottom: 0; } @@ -2340,6 +2480,7 @@ sup [knowl]:hover { .mathbook-content article.definition-like *:last-child::after { margin-bottom: 0; } +*/ .mathbook-content .objectives { margin-bottom: 1.25em; @@ -2365,6 +2506,7 @@ article.list .heading .codenumber + .title:before { content: ":\2002"; } +/* .mathbook-content article.theorem-like *:last-child, .mathbook-content article.objectives *:last-child { margin-bottom: 0; } @@ -2378,6 +2520,7 @@ article.list .heading .codenumber + .title:before { .mathbook-content article.remark-like > *:last-child::after { margin-bottom: 0; } +*/ /* Since there can be p which are nearby but not siblings, let's put background and (but not box shadow) on everything */ @@ -2460,7 +2603,6 @@ article.list .heading .codenumber + .title:before { max-height: none; max-width: 550px; color: inherit; -/* width: 550px; */ font-size: 100%; box-shadow: none; } @@ -2486,12 +2628,14 @@ article.list .heading .codenumber + .title:before { .mathbook-content article.aside-like > p:first-child { margin-top: 0; } +/* .mathbook-content article.aside-like > *:last-child { margin-bottom: 0; } .mathbook-content article.aside-like > *:last-child::after { margin-bottom: 0; } +*/ /* .mathbook-content .aside-like { margin-bottom: 1.25em; @@ -2604,7 +2748,7 @@ article.list .heading .codenumber + .title:before { padding: 2px 10px; } -/* figure out a better way to handle asides in content that has a wide left margin */ +/* find a better way to handle asides in content that has a wide left margin */ /* see http://pretext.jahrme.com/aside-in-knowl/section-1.html */ .mathbook-content section dl dd .aside-like { margin-top: 0 !important; @@ -2614,27 +2758,75 @@ article.list .heading .codenumber + .title:before { margin-left: -300px !important; } +.mathbook-content ol > li { + padding-left: 0.25em; +} +/* +.mathbook-content ol.cols2 > li { width: calc(49% - 0.25em) !important; } +*/ +.mathbook-content ol.cols2 > li, .mathbook-content ul.cols2 > li { width: calc(49% - 1.75em) !important; } +.mathbook-content ol.cols3 > li { width: calc(33% - 0.25em) !important; } +.mathbook-content ol.cols4 > li { width: calc(24.5% - 0.25em) !important; } +.mathbook-content ol.cols5 > li { width: calc(19.5% - 0.25em) !important; } +.mathbook-content ol.cols6 > li { width: calc(16.3% - 0.25em) !important; } +/* sample-article sec 5 */ +/* +.mathbook-content ul.cols2 > li p, .mathbook-content ol.cols2 > li p { + padding-right: 0.5em; +} +*/ +.mathbook-content ul.cols2 > li, .mathbook-content ol.cols2 > li { + padding-right: 1.5em; +} + +/* see http://bob.cs.sonoma.edu/IntroCompOrg-RPi/exercises-10.html + for examples of an odd number of items in a cols2, followed by + a hint */ +.mathbook-content .cols2 > li:last-child:nth-child(odd) { + float: none !important; + padding-top: 0.5em; +} + /* http://spot.pcc.edu/math/APEXCalculus/sec_prod_quot_rules.html * solution to Example 2.4.14 */ .mathbook-content .solution ol li { margin-top: 1em; + padding-left: 0.5em; } -.mathbook-content .solution ol li p { + +/* solution to Example 4.2.12 in http://spot.pcc.edu/math/orcca-draft/orcca/section-radical-expressions-and-rational-exponents.html +*/ +.mathbook-content .solution ol li > p:first-child, .mathbook-content .solution ol li > .displaymath:first-child { vertical-align: top; display: inline-block; margin-top: 0; - margin-left: 0.5em; } +.mathbook-content .solution ol li > .displaymath:first-child .MJXc-display { + margin-top: 0; +} + + .mathbook-content .exercise-like ol li { margin-top: 1em; + padding-left: 0.5em; +} +/* The !important is to over-ride legacy inline widths */ +.mathbook-content .exercise-like .cols2 > li { width: calc(49% - 0.5em) !important; } +.mathbook-content .exercise-like .cols3 > li { width: calc(33% - 0.5em) !important; } +.mathbook-content .exercise-like .cols4 > li { width: calc(24.5% - 0.5em) !important; } +.mathbook-content .exercise-like .cols5 > li { width: calc(19.5% - 0.5em) !important; } +.mathbook-content .exercise-like .cols6 > li { width: calc(16.3% - 0.5em) !important; } + +.mathbook-content .exercisegroup .cols2 > article > ol > li:first-child { + margin-top: 0; } + .mathbook-content .exercise-like ol li p { vertical-align: top; display: inline-block; margin-top: 0; - margin-left: 0.5em; } /* http://mathbook.pugetsound.edu/beta/contibutor-list-20161130/preface-2.html @@ -2664,18 +2856,6 @@ article.list .heading .codenumber + .title:before { font-style: normal; } -.mathbook-content .frontmatter > .heading .title, .mathbook-content .book > .heading .title { - font-size: 1.3em; -} -.mathbook-content .frontmatter > .heading .subtitle, .mathbook-content .book > .heading .subtitle { - display: block; - font-weight: normal; - color: #666666; - font-size: 0.875em; - line-height: 1.42857em; - margin-top: 0.35714em; -} - .searchwrapper { max-width: 900px; @@ -2770,9 +2950,11 @@ body.sidebar-left-closed .searchwrapper { /* .mathbook-content .sbspanel object { */ +/* .mathbook-content .sbspanel object:not(:last-child) { margin-bottom: 0 !important; } +*/ .mathbook-content iframe { border: none; @@ -2786,19 +2968,17 @@ body.sidebar-left-closed .searchwrapper { .mathbook-content div.knowl .posterior div a:first-child { font-style: italic; } +/* temporary for Geogebra development: replace with a more + restrictive selector for articles */ +.mathbook-content article.notranslate { + margin-top: 0; +} /* sort of a hack for proof knows in theorem knowls */ .mathbook-content div.knowl .posterior a[knowl]:first-child { padding: 0; } -.mathbook-content a[href^="mailto:"] { - font-style: normal; - font-family: monospace; -} -.mathbook-content .preface a[href^="mailto:"] { - font-size: 110%; -} /* nested tasks. see @@ -2888,7 +3068,8 @@ body.mathbook-book .MathJax_Menu, body.mathbook-article .MathJax_Menu { .mathbook-content ol li, .mathbook-content ul li { pointer-events: auto; } -div, span, button { +div, span, button, +.mathbook-content div, .mathbook-content span, .mathbook-content button { pointer-events: auto; } @@ -2915,10 +3096,145 @@ and condider having this replace line 3338 of the general code (which uses .head display: none; } +.mathbook-content .summary-links { + margin-top: 4em; +} +.mathbook-content section + .summary-links { + margin-top: 2em; +} +.mathbook-content .summary-links ul { + list-style-type:none; +} +.mathbook-content .summary-links li { + margin-top: 0; +} +.mathbook-content .summary-links a { + position: relative; + display: block; + font-size: 1.5em; + line-height: 1.25em; + padding: 0.41667em 0.83333em; + margin-top: 0.20833em; +/* + margin-bottom: 0; +*/ + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + padding-right: 2.06667em; +} +.mathbook-content .summary-links a:after { + right: 0.83333em; +} +.mathbook-content .summary-links a:after { + content: ""; + position: absolute; + /* center vertically */ + top: 50%; + margin-top: -0.4em; + width: 0; + height: 0; + border-top: 0.4em solid transparent; + border-bottom: 0.4em solid transparent; + border-left: 0.4em solid #c9c9c9; +} +.mathbook-content .summary-links a, .mathbook-content .summary-links a:link, .mathbook-content .summary-links a:visited { +/* color: #20477b; */ +/* background: #f0f0f0; */ + text-decoration: none; + cursor: pointer; +} +.mathbook-content .summary-links a:hover { +/* color: white; */ + text-decoration: none; +} +.mathbook-content .summary-links a:hover:after { + width: 0; + height: 0; + border-top: 0.4em solid transparent; + border-bottom: 0.4em solid transparent; + border-left: 0.4em solid white; +} +.mathbook-content .summary-links a { + font-family: "PT Serif", "Times New Roman", Times, serif; +} +@media screen and (max-width: 480px) { + .mathbook-content .summary-links a { + font-size: 1em; + line-height: 1.25em; + } +} +.mathbook-content .summary-links a .codenumber { +/* color: #707070; */ + margin-right: 0.41667em; +} + + +@media print { + .navbar { display:none; } + .has-sidebar-left #masthead #primary-navbar-sticky-wrapper { display:none; } + .has-sidebar-left #masthead.smallbuttons { + border:none; + } + .has-sidebar-left .page > #sidebar-left-sticky-wrapper { display:none; } + .searchwrapper { display:none; } + .has-sidebar-left.mathbook-loaded .page .main { + margin-left:0; + left:auto; + border:none; + box-shadow:none; + padding: 0; + } + .has-sidebar-left.mathbook-loaded.sidebar-left-open .page .main #content { margin-top:0 } + .has-sidebar-left.mathbook-loaded.sidebar-left-open .page .main #content.mathbook-content section { margin-top:1em } + .has-sidebar-left.mathbook-loaded.sidebar-left-open .page .main #content.mathbook-content section .heading { margin-top:0 } +/* + .has-sidebar-left.mathbook-loaded.sidebar-left-open .page .main { + font-size: 0.85em; + } +*/ +} + +/* +.has-sidebar-left.mathbook-loaded.sidebar-left-open .page .main { margin-left:0px; left:auto; } +*/ + +/* Colors for the above +.mathbook-content .summary-links a, .mathbook-content .summary-links a:link, .mathbook-content .summary-links a:visited { + color: #20477b; +} + +.mathbook-content .summary-links a:hover { + color: white; + background: #20477b; +} + +.mathbook-content .summary-links a .codenumber { + color: #707070; + +*/ + +/* COLORS */ + +/* delete the first one of both as obsolete */ +.mathbook-content a.xref, +.mathbook-content a.internal { + color: #900; +} +.mathbook-content a.url, +.mathbook-content a.external { + color: #22a; +} + /* To delete when moving to pretextbook.org: all .hidden-knowl-wrapper */ - +.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable.ui-resizable { + left: 0 !important; + top: 0 !important; +} diff --git a/scss/mathbook-content-prefixed.scss b/scss/mathbook-content-prefixed.scss index 1d51b5e..7bff995 100644 --- a/scss/mathbook-content-prefixed.scss +++ b/scss/mathbook-content-prefixed.scss @@ -18,13 +18,6 @@ @include typography-google-fonts-import-once(); -/* -.mathbook-content { - @include typography-base(); - @import "content/content"; -} -*/ - /******************************************************************************* * END MATHBOOK CONTENT PREFIXED ******************************************************************************/ diff --git a/scss/mathbook-content.scss b/scss/mathbook-content.scss index 1dcd0c1..d118fd1 100644 --- a/scss/mathbook-content.scss +++ b/scss/mathbook-content.scss @@ -17,9 +17,11 @@ // Import the google fonts @include typography-google-fonts-import-once(); +/* body { @include typography-base(); } +*/ @import "content/content"; diff --git a/scss/mathbook.scss b/scss/mathbook.scss index a168f89..1f257e4 100644 --- a/scss/mathbook.scss +++ b/scss/mathbook.scss @@ -22,17 +22,6 @@ // but it maintains separation of concerns. @include typography-google-fonts-import-once(); -/** - * Reset HTML to iron out browser inconsistencies -@include reset-html5(); - */ - -/* -body { - @include typography-base(); -} -*/ - // Import modules @import "ui/ui"; @import "mathbook-content-prefixed.scss"; diff --git a/scss/ui/mixins/_sliding-sidebars.scss b/scss/ui/mixins/_sliding-sidebars.scss index 5af490a..441bc96 100644 --- a/scss/ui/mixins/_sliding-sidebars.scss +++ b/scss/ui/mixins/_sliding-sidebars.scss @@ -82,14 +82,6 @@ $sliding-sidebars-loaded-class: "mathbook-loaded" !default; .has-sidebar-left { @include transition-property(margin-left, left); } - - .has-sidebar-right { - @include transition-property(margin-right, right); - } - - .has-sidebar-left.has-sidebar-right { - @include transition-property(margin-left, margin-right,left,right); - } } // Main side styles @@ -197,23 +189,4 @@ $sliding-sidebars-loaded-class: "mathbook-loaded" !default; @content; } } - - .sidebar-right-open & { - $breakpoint: $content-max-width - + $sidebar-right-width - + 2*$content-margin - 1; - @media screen and (max-width:$breakpoint) { - @content; - } - } - - .sidebar-right-open.sidebar-left-open & { - $breakpoint: $content-max-width - + $sidebar-left-width - + $sidebar-right-width - + 2*$content-margin - 1; - @media screen and (max-width: $breakpoint ) { - @content; - } - } } diff --git a/scss/ui/partials/_layout.scss b/scss/ui/partials/_layout.scss index bfc37f6..269b1d4 100644 --- a/scss/ui/partials/_layout.scss +++ b/scss/ui/partials/_layout.scss @@ -5,24 +5,6 @@ // This provides an overview of the layout and how the root level // elements of the page fit together. -/* -html, body { - margin:0; - padding:0; -} - -body { - background: $ui-color-bg; - @include typography-base(); - - &.centered-container { - border:1px solid darken($ui-color-bg, 10%); - border-top:none; - border-bottom:none; - } -} -*/ - /** * Containers restrict the max-width of content within elements * whose backgrounds must stretch to the width of the viewport. @@ -42,20 +24,6 @@ body { &.has-sidebar-left, .has-sidebar-left & { max-width: $content-outer-width + $ui-sidebar-left-width; } - -/* - &.has-sidebar-right, .has-sidebar-right & { - max-width:none; - } -*/ - -/* - &.layout-centered, - .layout-centered &, - .has-sidebar-left.has-sidebar-right & { - max-width: none; - } -*/ } /** @@ -147,10 +115,10 @@ body { @include sliding-sidebars-compositing-layer(); } +/* #sidebar-right { & { - /* Hide sidebar by default */ display:none; @include sliding-sidebars-sidebar( @@ -163,16 +131,15 @@ body { @include sliding-sidebars-compositing-layer(); top:0; - /* The right sidebar is not sticky, so we can use right:0;*/ right:0; } - /* Display it only if it is enabled */ .has-sidebar-right & { display:block; } } +*/ .sidebar-content { /* Extra links -- could go in either sidebar */ @@ -223,12 +190,6 @@ body { margin: $ui-content-margin; } -/* - .layout-centered & { - margin: $ui-content-margin auto; - } -*/ - &, .layout-left & { /*, .layout-centered & { */ /**