-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Css bundling #2291
base: master
Are you sure you want to change the base?
Css bundling #2291
Conversation
XSL review, as requested:
"Only for used for"
Everything involving This looks suspect to me: - extension-element-prefixes="exsl str dyn"
+ xmlns:func="http://exslt.org/functions"
+ extension-element-prefixes="exsl str dyn func" does
--- a/xsl/utilities/report-publisher-variables.xsl
+++ b/xsl/utilities/report-publisher-variables.xsl
@@ -43,6 +43,8 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
<!-- into output unnecessarily -->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:exsl="http://exslt.org/common"
+ extension-element-prefixes="exsl"
>
<!-- DEBUGGING -->
@@ -51,6 +53,7 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
<!-- Standard conversion groundwork -->
<xsl:import href="../publisher-variables.xsl"/>
<xsl:import href="../pretext-assembly.xsl"/>
+<xsl:import href="../pretext-common.xsl"/> Importing -common here is a red flag. |
Thanks for the review and tips. Just added a series of commits to fix the issues listed. One issue per commit.
I did make progress on the |
Thanks for all the fixups, I'll look again at teh key() stuff soon.
I really don't want existing changes repeated. You are always welcome to rebase on the HEAD to get whatever you need and force-push here. And anyway, I'd prefer that once things are ready-to-go in any event. |
@ascholerChemeketa - The runestone side is merged and I just published runestone-7.4.5 with your changes. |
bf343a7
to
84e7775
Compare
7b73b76
to
1ae6b0d
Compare
@rbeezer Oscar might have some minor tweaks, but I think this is ready to go. The rebased commits are arranged in logical chunks of content. They are NOT atomic and usable changes to the code. Aside from the documentation, you pretty much need all of them for it to work. There will be some minor work to reconcile this with #2298 and #2299. If those go first I will update this. If this goes first I will update them. If you (or anyone else) wants to take a test drive of end product, check out the PR and build the sample book or article. They should work fine without Node.js. To test out other themes, you will need Node.js installed. Then install the needed dependencies by switching to the Then change the |
1ae6b0d
to
7a645b2
Compare
Yes, the CLI is all ready for this and will automatically run an There are a few minor tweaks I'd like to make to the |
32a8470
to
6ed8caa
Compare
Warning - after rebasing I tested out various builds. Sample book no parts did not build, but I think this might be another instance of versioning interacting poorly with a special purpose template that weeps the document. I get:
Somehow when I can try doing some more debugging if needed. But it doesn't look like this is based on anything I changed and I am sure you have a much better idea what might be going on than I do. |
~/mathbook/mathbook/pretext/pretext -vv -c all -f html -p ~/mathbook/mathbook/examples/sample-book/publication-noparts.xml ~/mathbook/mathbook/examples/sample-book/sample-book.xml runs for me with no errors. Without this PR, and with it (fetched, no rebase, no edits, no etc). The "noparts" source file is orphaned and will be removed any day now, just there while Runeestone Saturday builds transitioned. Is that the problem? |
Ahh, yes, that is the problem, I used the |
OK, making progress on this one. Lots to like: dark mode, and I like the sharper boxes on Runestone stuff.
|
2694cc9
to
09be670
Compare
Done with requested changes. Did a force push that integrated all the changes into existing commits. I kept a backup copy with the changes in separate commits in case that is what you prefer.
The removed inline styles were never emitted when part of a sidebyside - the sidebyside manages the layout in that case. (See https://pretextbook.org/examples/sample-article/html/section-side-by-side.html#subsection-sbs-other-panels) I don't think I realized that a program could have a width outside that context (should have checked the schema!). The logic behind removing them was in case a theme is trying to override the default styling (e.g. widening programs). Added back logic to add the inline styles when the author has set a width other than 100%. I believe this is the best way to honor author intent first and theme intent if the author does not specify anything.
Cleaned up a potential issue with the fonts. Confirmed that preformatted blocks are using Inconsolata.
Yes, that should have turned into a question for -dev or a separate PR. I encountered it while testing CSS for ebooks. Removed from here.
|
Draft for @rbeezer to poke at the XSL.
Look for
@Rob
inpublisher-variables.xml
for my failed attempt to set anhtml-theme
variable via key(). The workaround version is right below.The
publication-structural.xml
file is set to build the newdefault-modern
themes via<css theme="...">
. Anything that has<css style="...">
will be built using old CSS with a warning. It can be used without node, including changing the palette (seepretext.py
for test palette options). Any other theme (salem
,denver
,tacoma
) will require node is installed and doingnpm install
one time from thescript/cssbuilder
directory.You can rebuild just the theme with
-c theme
on the pretext script.This RS PR is related:
RunestoneInteractive/rs#575
It is not required, but it enables dark mode on RS components and other minor adjustments to make RS components look more like the PTX around them.
Needs: