CSS for dropcaps exporting to epub

Learn / Forums / EPUB and eBook / CSS for dropcaps exporting to epub

Tagged: , ,

Viewing 7 reply threads
  • Author
    Posts
    • #80688
      Jim Swift
      Member

      When ID exports my book to epub it creates the following CSS for drop caps
      ._idGenDropcap-1 {
      float:left;
      font-size:2.789em;
      line-height:1;
      margin-bottom:-0.439em;
      margin-right:0.05em;
      margin-top:0.113em;
      }
      But it looks bad in ADE and this looks better

      ._idGenDropcap-1 {
      float:left;
      font-size:2.789em;
      line-height: 0.7;
      margin-right:0.05em;
      margin-top:0.113em;
      }

      The question is — How do I use a custom CSS to overide the faulty settings that InDesign creates
      I’ve tried using a custom CSS file and setting tags in the export settings, but I’m not getting it to override the automated settings
      Are the values in the automated settings in idGenDropCap configurable?

      Many thanks

      Jim

    • #80690
      Aaron Troia
      Participant

      Hey Jim,

      It might depend on where InDesign is putting your CSS in the head of the HTML, if you’re gets listed first and the automated second, yours will get overridden if you are using the same style names. If you name the dropcap character style (and export tag style) something different and assign it to all your dropcaps, then attach it on export, you shouldn’t get overridden by the automated settings.

      Aaron

    • #80710
      Jim Swift
      Member

      Many thanks, Aaron. That put me on the right track and I’m getting somewhere now.

      But it would still be very helpful to know where Indesign gets the values that are used in the idGenDropCap-1 style and if those values are editable before the CSS is generated?

      Jim

    • #14323276
      Jim Swift
      Member

      Coming back to this after a 4 year break!!

      My custom css file is working fine.
      But The idGenDropCap-1 class is still being created in the idGeneratedSyles.css even through I have the same class (.dropcaps) in my custom css file and use export mapping to link the two.

      I think I read somewhere (but cannot find the references now) is that the reason that my own dropcap character style is not showing up as the .dropcaps class in the css file is that I have local overrides turned off.

      Please could someone confirm this?

      Also, a best practice question, is there any value in trying to eliminate all idGen… classes from the idGeneratedSyles.css stylesheet. I have got it down to just 5 out of the 51 classes (3 char and 2 objects) and wonder if its worth while trying to eliminate those. I think I will have to live with the dropcap style being generated.

    • #14323240
      Jim Swift
      Member

      Problem solved. The drop cap is now showing as expected after moving away from the idGeneratedSyles.css and just using my own css and tag mapping,

    • #14323072
      druparker
      Member

      if you’re gets listed first and the automated second, yours will get overridden if you are using the same style names. If you name the dropcap character style (and export tag style) something different and assign it to all your dropcaps, then attach it on export, you shouldn’t get overridden by the automated settings.

    • #14323071
      Jim Swift
      Member

      Many thanks, Fleur. I’m now using custom style sheets as you suggest and it does solve a lot of problems :-)

      Jim

    • #14323066
      druparker
      Member

      if you’re gets listed first and the automated second, yours will get overridden if you are using the same style names. If you name the dropcap character style (and export tag style) somet https://xender.vip/ https://discord.software/ https://omegle.onl/hing different and assign it to all your dropcaps, then attach it on export, you shouldn’t get overridden by the automated settings.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.
>