For epubs most of the device settings are set in the body element (using !important). If you have a stylesheet like this:
Code:
body {line-height: 1.5;}
p {text-indent: 1em;}
then the line spacing set from the device will override the one set in the body, and the paragraph p will inherit its line-height from body, and everything will work as you expect.
But there is a problem with the way that Calibre creates epubs. When Calibre converts a book with the stylesheet above, it creates class for body like:
Code:
.calibre {line-height: 1.5;}
and then uses it in the html like this:
Code:
<body class="calibre">
which then overrides the device setting in body because Calibre has increased the specificity of the styles.
What you need to do with Calibre-created/converted books is to remove the settings such as line-height from the .calibre class and specify them directly in body as the first example above.
Edit: The above applies to the EPUB reader, which interprets !important differently than the KEPUB reader.