3 Replies Latest reply: Mar 12, 2013 5:27 AM by Steve Werner RSS

    ePub Export: Several CSS-Definitions for one and the same element created

    Magnolee2 Community Member

      Hey there,

       

      I hope someone can answer my question.

      When I export an ePub (exporttags defined) and take a look at the css-file, I find at least 2000 lines of code. Most of this code ist created, because one and the same definition of an paragraph style exists several times in the css.

      e.g. this code exists at least 8 times:

       

      p.Lead {

      break-before:column;

      color:#3054a0;

      font-family:sans-serif;

      font-size:0.925em;

      font-style:normal;

      font-variant:normal;

      font-weight:300;

      line-height:1.3;

      margin-bottom:0px;

      margin-left:0px;

      margin-right:0px;

      margin-top:0px;

      text-align:justify;

      text-decoration:none;

      text-indent:0px;

      }

       

      And this of course ist not the only repetition. I guess every Definition is repeated over and over again.

       

      That does not make much sense, does it? Since the first will always be overwritten by the following and so forth, right?

       

      What can I do about this useless data?

        • 1. Re: ePub Export: Several CSS-Definitions for one and the same element created
          Steve Werner CommunityMVP

          InDesign began exporting EPUB with CS4, as I recall, but it was little used. There were minor changes in CS5. Beginning in CS5.5 and CS6, the entire export engine was rewritten and extensively changed and the code got much better and more refined. I expect this will continue in future versions.

           

          The CSS code generated by InDesign will be verbose as all machine-generated code is. However, in later versions of InDesign, you can create your own CSS file and use it. That's probably the recommended thing to do. Or, you can edit out the "useless data" in the InDesign-created code.

          • 2. Re: ePub Export: Several CSS-Definitions for one and the same element created
            Magnolee2 Community Member

            Good Morning Steve,

             

            I experienced, that it was much more useful to meticulously define the indesign export tags for each and every paragraph style, because this way the ebook looks very much alike to the typography in the printed version. I would only add  second style sheet for very few exceptions like "information boxes" or things alike.

             

            What annoys me is that InDesign creates these duplications of paragraph styles in the css, which seem senseless for me. Maybe I overlooked something in the export tags, or book synchronisation or epub export? I find it very time-consuming to delete all the duplications, and I also think it may be a source of error.

             

            Since you indicated improvement in future versions... when will there be a new version?

             

            Have a nice day

            • 3. Re: ePub Export: Several CSS-Definitions for one and the same element created
              Steve Werner CommunityMVP

              There has been no announcement for a new version of InDesign. However, Adobe announced that they are on a schedule of annual releases.