Closed rbeezer closed 6 years ago
Sample article, with "kohere" work rebased on dev
. I have not investigated questions, and can refresh if there are obvious shortcomings when I do.
Coming from discussion at:
https://groups.google.com/d/msg/pretext-support/B2Cp5IV5M8I/LxL9e7VWAQAJ
I made a lot of CSS changes, and the styling of hidden knowls should look okay now, except for the Hint/Answer/Solution, as at the end of Sample Article section 16.
Note that the new CSS makes use of .hiddenproof, but not of .knowl-container, and not of .kohere . I could make use of .knowl-container to style the Hint/Answer/Solution, but I think I prefer something like the old way where the div surrounding H/A/S had class="solutions", and each of the a's in it had class="solution". If you wanted to be less heavy-handed, I guess the outer .solutions would be the one to keep.
I can imagine that the .knowl-container around hints and answers will be useful some day, so we should keep it, but it does not seem like we will use it now.
We will use .kohere when we find a place that the knowl is inline, yet we still want to open immediately after that.
To slightly change the subject, can you enlighten me about the use of "header"? Some places we have .heading as a child of a header element, and others not. Does that only happen for sections? For all sections? When is a case where we actually need the header surrounding the .heading?
To slightly change the subject, can you enlighten me about the use of "header"? Some places we have .heading as a child of a header element, and others not. Does that only happen for sections? For all sections? When is a case where we actually need the header surrounding the .heading?
"heading" occurs 267 times in mathbook-html.xsl
in a variety of non-CSS uses. So nothing here is set in stone. Much dates to Michael DuBois' time, so I have no good reasons, except mimicry. Doubt anything I write if it seems wrong.
header.heading
seems exclusively for divisions: chapter, etc, introduction/conclusion as children of divisions, preface, index, etc Can often have optional .hide-type
.
There are plain header
in the masthead, etc, surrounding content. Perhaps explains the necessity of the .heading
class?
exercises/h1.heading
in backmatter looks clearly wrong.
h6.heading
is on lots of blocks: theorem, example, etc. h5 for paragraphs
, I think. Probably inside an article
most of the time.
A single side-by-side is 3 rows: heading, panel, caption. In other each panel can be surmounted by some text (a title
usually, like a poem), and below has a caption. Possible some .heading
crept in here.
Progress. Sample for review, discussion.
http://mathbook.pugetsound.edu/beta/20171216-hidden-knowl
div.solutions
. There is still a div.knowl-container
around a <note>
hanging off a bibliographic entry. See "References" in the back matter. We should not work too hard on this (or not at all), since I plan to really overhaul citations in the spring.article.hiddenproof
. This is status quo, not new. Looks good, behaves, etc.a
element for a hidden knowl is wrapped in some sort of element typical of what is used to wrap it if it was born visible. For example article.example-like
.span.foo
now wrapping the exceptions (so they are no longer exceptional). foo
is solution
for H/A/S. Seems to work well, and in particular was necessary to get parentheses around titles of H/A/S in Exercise 16.3.b. Footnotes seem to behave just fine (early in Section 4).You asked for class="solution"
on the a
for the solution hidden knowls. That would be an exception to my general scheme, and thus lead to messy code. Two alternatives to propose.
A. Handle hidden knowls as current changes implement.
B. Move class information onto every hidden knowl a
element, and drop surrounding element/class. This would lead to cleaner HTML, and maybe make styling easier?
I might be able to mockup (B) on a branch of a branch (which becomes complicated fast).
I adjusted the CSS and it looks and behaves okay now.
http://mathbook.pugetsound.edu/beta/20171216-hidden-knowl
You asked for class="solution" on the a for the solution hidden knowls. That would be an exception to my general scheme, and thus lead to messy code. Two alternatives to propose.
A. Handle hidden knowls as current changes implement.
B. Move class information onto every hidden knowl a element, and drop surrounding element/class. This would lead to cleaner HTML, and maybe make styling easier?
Things seem to be working properly, so let's not do anything else unless we find an actual problem.
Can close now?
Changes at 12cc513934e51d5b91e3cdb54b6446c1eb6053f4
Some of the CSS changes had not made it into the knowl content itself (in particular, a knowl inside a knowl). I've got that straight so everything is consistent. So yes, we can (finally!) close this one. Much better - and should encourage further improvements (once I find the time). Thanks.
A place to discuss this CSS work, maybe some commits when all done.