Skip to main content
Participant
November 12, 2021
Question

Export Paragraph/character styles as css

  • November 12, 2021
  • 2 replies
  • 1161 views

Hi there,

I'm new to Indesign scripting development.

I have batch of grouping paragraph styles in my indd file. Is there anyway to export these existing styles into css?

After surfacing discussion, the first approach is directly export my indd file from Indesign console. Yet, the idGeneratedStyles.css doesn't cover all styles shown in indd file. 

The result shows as below:

 

 

Any thought will be appreciated

2 replies

Community Expert
November 16, 2021

Hm. A huge task.

There are about 330 property/value pairs for formatting text.

You have to write your own routines to do that.

The real problems come with nested formatting like nested line styles, nested styles and especially GREP styles.

Perhaps it could help to see into the XML code of snippet files and IDML files.

 

Regards,
Uwe Laubender

( ACP )

Participant
November 23, 2021

Thanks for hint. For now, my solution is graping HTML style from IDML files.

On the other hand, nested line styles, nested styles might be faced in the future. 

Willi Adelberger
Community Expert
Community Expert
November 12, 2021

Export as HTML or as EPUB, you will find your exported CSS there.

Participant
November 13, 2021

Thanks for response. 

I might not clearly describe my question. Besides we export css from Indesign, we have to ensure every paragraph/character style in Indd file will be retained.

Willi Adelberger
Community Expert
Community Expert
November 13, 2021

CSS is not the mean to retain character and paragraph style to remain. Only InDesign and InCopy themselves will do it.

Tell us, what you want to accomplish?