dvschultz / 99problems

99 Problems and e-reader rendering are all of them
60 stars 3 forks source link

Legacy RMSDK will ignore the entire stylesheet if you use calc() #53

Open JayPanoz opened 8 years ago

JayPanoz commented 8 years ago

Easy one which apply to every app/device using the legacy RMSDK (the one which doesn’t support EPUB 3).

element {
   padding-left: 5%;  /* fallback */
   padding-left: calc(5% - 2px);
}

And you’re whole CSS is gone.

Workarounds.

1) Put it in another CSS

2) Use an emoji class but well, that could go wrong.

element {
   padding-left: 5%;  /* fallback */
}
.💩 {
   padding-left: calc(5% - 2px);
}

3) Use @supports but well, it means some EPUB 3 RS like Google Play Books won’t take the declaration into account because they don't support @supports

element {
   padding-left: 5%;  /* fallback */
}
@supports (width: calc(100% - 5px)) {
element {
   padding-left: calc(5% - 2px);
}
}

4) annex RMSDK to #eprdctn country then destroy it so that nobody can keep on using dat shit.