8 Replies Latest reply on Aug 31, 2015 5:56 AM by erica59044543

    CSS Stylesheet Templates for EPUB?

    erica59044543 Level 1

      I’ve tried to locate this via search engine, to no avail. Thought I’d ask here. Does anyone on this forum know of a marketplace or company where one can shop CSS stylesheets for EPUBs, in the way that one might shop themes for a website?


      Thank you.

        • 1. Re: CSS Stylesheet Templates for EPUB?
          Yves Apel - IC Level 2

          Hi,

           

          even if it would be nice, I don't think "InDesign"-related ePub templates exist yet as you have described it. There are a very few existing on GraphicRiver (paid) and on Github (free). But they are far away from being ready to be used by beginners. The reason for this might be the complicated markup structure, InDesign creates.

           

          Having a stylesheet template would also mean, having an InDesign template file where every style is included and set the way it would work together with the external stylesheet. So far this would be possible to do without any greater hassle. However, this template would be linked to a specific InDesign version. ID often changes its structure on how the html/css markup will be generated. Even with small updates. And this usually breaks the template structure, since a greater part of the InDesign generated markup will be dynamically named and you can't foresee all these styles/classes/ids in the template css. Some other downsides with ID-ePub templates would be images and fonts as well as some modifications you still need to do after ePub export. This is not so easy to manage in a such template.

           

          For the moment, you need to design the ePub right within InDesign. You can add an external stylesheet with predefined styles, but it would be limited in some points so you would still need to know on how to handle InDesign styles and objects for your specific ePub export.

           

          –Yves

          • 2. Re: CSS Stylesheet Templates for EPUB?
            erica59044543 Level 1

            Thank you, much appreciated.

             

            My intention was to start with the final epub styling that I want (external stylesheet) and then map it backwards into a set of InDesign styles by mapping InDesign styles to html/css tags upon export to epub. When you state that "InDesign often changes its structure", does that mean that the software upgrades themselves would make an InDesign file containing a set of styles that are hand-mapped to a corresponding set of html/css tags upon epub export, lose that hand-configured mapping?

             

            Or, is it only those parts of the InDesign generated markup that are allowed to be dynamically named, rather than those that are hand-mapped, that could break the template structure?

             

            If the images/fonts were hand-mapped in advance, as mentioned above, would that alleviate the complications you have described?

             

            Also, I've never heard of GraphicRiver. I'll see what it offers.

             

            Thanks, again.

            • 3. Re: CSS Stylesheet Templates for EPUB?
              Yves Apel Level 2

              When you state that "InDesign often changes its structure", does that mean that the software upgrades themselves would make an InDesign file containing a set of styles that are hand-mapped to a corresponding set of html/css tags upon epub export, lose that hand-configured mapping?

               

              Or, is it only those parts of the InDesign generated markup that are allowed to be dynamically named, rather than those that are hand-mapped, that could break the template structure?

               

              Globally seen, yes this is what InDesign does and reverse engineering an InDesign ePub is very hard. But its behavior is still a little bit different from what you think. If you look by ex. at images. You can set an object style in ID. The settings will be respected as well. But InDesign uses its own name and structure on export. The class it creates for the tag name you have set in the object styles is empty or without relevant attributes on export. For character and paragraph styles it mostly keeps the names, except manual overrides or features such as small caps ... And the tag names, InDesign produces by itself are not fixed. These names change per InDesign version (including minor updates). There is no internal style mapping guide being the same for all the versions. Also InDesign uses a lot of self named ids in the markup for objects and links. As soon as you add an object, InDesign reorders the ids so that even a small modification would have impact on the DOM of the ePub. Shortly told. A framework such as Bootstrap or Foundation, ... is actually hard to create for InDesign ePub.

               

              If the images/fonts were hand-mapped in advance, as mentioned above, would that alleviate the complications you have described?

               

              Yes. It starts already with the folder naming. In earlier versions the folders have been called "images" and "fonts". In a late CC 2014 version is has become "image" and "font". Also font family naming has changed in different versions. Ex.: font-family:"Garamond-Pro"; to font-family:"GaramondPro"; to font-family:"Garamond Pro";, ... Especially the markup for images has changed a lot over time. So prepared mappings will not all being respected. Some would, but you have no guarantee that it works in all InDesign versions.

               

              –Yves

              • 4. Re: CSS Stylesheet Templates for EPUB?
                erica59044543 Level 1

                Out of respect for the forum, I was trying to ask this in as narrow and specific a way as possible. Clearly, that's not possible.

                 

                So, then, here's what I'm really trying to figure out. Over the next 4 months, I have about 30 manuscripts that need to be formatted in InDesign, and exported to EPUB. I was hoping to map the InDesign styles to the final exported EPUB HTML and CSS using InDesign's "Edit All Export Tags in the Paragraph, Character, or Object style panel menu."

                 

                I was hoping to do this in order to automate that step in the workflow that takes the manuscript from InDesign to EPUB—not 100% automation, but as much as possible.

                 

                The reason my initial question was in search of a place to "shop CSS stylesheets for EPUBs", was because I thought that if I knew what I wanted the end result to be (html/css), I could hand-map to it from InDesign ONE time, and then leverage that hand-mapping through automation the subsequent 29 times.

                 

                Is this not possible? Must every one of these 30 manuscripts be manually configured for export from InDesign to EPUB, every single time, even though their styling is 95% identical?

                 

                If that's the case, and my plan will not work as explained, what is the next best option for automating as much of this workflow step as possible, rather than having to recreate the wheel every time? Or should I just keep a checklist on hand describing how to recreate the wheel each time?

                 

                I want a clear solution for this step of the workflow BEFORE I begin all of this production work. I thought I was getting close to something sensible with the "Export Tags" functionality, but now I'm not so sure, and possibly back at square one? Hmmm…

                 

                Thanks for bringing these nuances to my attention. I'll continue researching.

                • 5. Re: CSS Stylesheet Templates for EPUB?
                  Derek Cross Level 6

                  You can create an external style sheet and use it on all of your ePubs. You connect to the external CSS in the ePub – Reflowable Layout Export Options panel

                  • 6. Re: CSS Stylesheet Templates for EPUB?
                    Yves Apel Level 2

                    I think, I answered already a lot of your retaining questions. But here is a summary:

                     

                    Your workflow sounds possible, but you need to follow some rules!

                    Stick on the same InDesign Versions the next months until your project is finished. Don't do updates! Just don't!

                    You can take an existing CSS and link it with the InDesign styles. Depending on the layout difficulty you need less or more of tweeking this master CSS. Deactivated "Emit CSS" in InDesign is your friend ;-)

                    Images have their own life on ePub export from InDesign. You can prepare things, but they often need reworking the InDesign generated stylesheet in the final ePub.

                    Beside the CSS template, create an InDesign template!

                     

                    And if the same styles are then applied in all the InDesign files again and again, the 30 books will export the same way and become 95% identical.

                     

                    Nevertheless, never skimp with time/money on makings tests BEFORE you begin a such work!

                     

                    Good luck and please let us know if it worked so far!

                    • 7. Re: CSS Stylesheet Templates for EPUB?
                      erica59044543 Level 1

                      Fantastic, thanks.

                       

                      Now to select/finalize an external style sheet I can live with x30!

                       

                      I'll check out GraphicRiver that Yves mentioned, and maybe I can locate a few other sources of style sheets that can be used as a starting point, and modified from there.

                      • 8. Re: CSS Stylesheet Templates for EPUB?
                        erica59044543 Level 1

                        Really appreciate all your help, Yves.

                         

                        I'll incorporate every one of these rules into the workflow.

                         

                        Thank you!