CSS: Common vs Individual Stylesheets #106
Unanswered
tajmone
asked this question in
Format » HTML
Replies: 1 comment
-
I'm assuming the weight of the final HTML is not a big deal, and might not even be highly impacted if we have embedded images etc.? If so, the choice seems easy, I agree, go with the more general solution 2. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@thoni56,
Soon more HTML documents will use Highlight, which also means that they will need the dedicated custom CSS to embedded in their
docinfo.html
files.Some documents use some dedicated styles which may or maybe not used by other docs (usually, these are additional block styles or alternative Highlight themes to distinguish a tutorial's ALAN code from library code or generic example, etx.).
Currently I was thinking of using the same Sass source to generated a common stylesheet and
docinfo.html
file for documents in this project.I'm not sure what the best strategy is in this respect, should we:
Solution 1 leads to lighter documents, in case there are many unused styles that can be left out, but requires more maintenance work when there are updates to the Sass source — although the Sass sources are modular, we'd need to keep track of which document uses which modules.
Solution 2 leads to bigger documents, due to the presence of styles definitions which might not be used by some documents, but has the advantage of having a unified stylesheet for all documents, at the cost of some extra bloat.
I'm tempted to adopt solution 2, which isn't after all different from they way the Fopub templates work for the PDF format (in this case, because it would be just to complicate to handle different templates).
Beta Was this translation helpful? Give feedback.
All reactions