openlilylib / scholarly

ScholarLY, a library for annotating LilyPond scores
GNU General Public License v3.0
24 stars 6 forks source link

CSS options for html #54

Open jefferyshivers opened 7 years ago

jefferyshivers commented 7 years ago

This continues the discussion in #52 re: option to generate/include CSS in any of:

Generated

  1. directly in the header (if full html doc is rendered)
  2. in a new .css file, linked in the header (if full html doc is rendered)
  3. inline with the annotations (regardless of rendering full doc or just annotations div)

The css for this part is generated from a group of additional options; that in itself will probably need another thread for discussion, so for the time being I say we assume a generally simple set of options will handle that part (at least at first, then maybe getting more complex later).

Default (provided with the repo)

1 - 3 = same as Generated options, with the implication that it will be first read from the default provided css, then printed.

One potentially weird part about this will be that for option 2, it will basically be a duplication from the file included in repo. Alternatively, if the default css is brief enough, we can simply code in into export-html.ily. I would lean towards doing it that way (which would also minimize Guile's payload in opening/reading that stuff, right?).

User-provided External

The options here could go a number of ways. Perhaps the user just wants to link in the header to a css file. Or perhaps the want to code it into their document as a string. In any case, printing inline won't really be an option (or will be a very advanced future option anyway..).


Before we get too far with these matters in the html export, let's make sure it's clear whether this is what we agree we want, or what needs to be handled differently.

jefferyshivers commented 7 years ago

1 - 3 = same as Generated options, with the implication that it will be first read from the default provided css, then printed.

For clarification, this means the default-css file (or block, embedded into export-html.ily) will actually be written in Scheme, be presumably using \setOption ... hooks in the same manner as the user for their generated settings.