Forum How do I...?

Resetting CSS

_savage
For web content and to ensure cross-browser compatibility, several reset scrips have emerged over time, namely reset.css or normalize.css.

Does it make sense to use such a script for Prince?
mikeday
Hmm, it really depends on what you are doing. If you are making a document that has to work in Prince and across multiple browsers, then it might make sense.
_savage
No, it's for use by Prince only. I thought more along the lines of establishing a "clean slate" since I don't know what presets are being used. (CSS has always felt like dabbling in the fog to me... :-))
mikeday
With Prince you can tell exactly which properties are in use, just check style/xhtml.css. :)
_savage
Hello, little fella! Thanks Mike :)
arthurattwell
I'd be curious to see others' CSS resets for Prince. I've posted mine (early, not properly tested yet) here:

https://gist.github.com/arthurattwell/2b98a21e9567727ea19d9ea495347be5

We're creating Sass templates that others can tweak for their book designs, especially non-technical designers without Prince experience. By resetting CSS we're aiming to reduce unexpected results.
mikeday
You can also run Prince with the --no-default-style option, although you will then need to ensure that you provide your own style sheet to specify display values for block elements and other vital tasks.
arthurattwell
Thanks, Mike. I didn't know about that option. Neat! For now I don't reset everything, and still rely on many basic block element and other rules from the default styles.

Edited by arthurattwell