View Single Post
Old 12-12-2014, 11:51 AM   #1
kat7
Junior Member
kat7 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2014
Device: none
Feature request: new CSS class from computed style

Hi Sigil,

I figured I'd share this idea for whatever it's worth (I'm that annoying person who isn't a programmer but has ideas that make me wish I was).

If Sigil had a tool where you could place the cursor at a particular point in the text, and then create a new CSS class based on the formatting of that text, that would be awesome for me.

So, if the particular text was in a <p class="W" id="X">, but also in a <span id="Y" style="Z">, the tool would take the ("computed") overall style expressed by the hierarchy of W, X, Y, and Z, and make a new, single CSS class with all that styling. I suppose it would have to prompt the user to name the class, and also to specify whether it should be for a block or for an inline element.

(Possibly helpful context: I routinely work on .epub files exported from InDesign, in which the layout person can create named "paragraph" and "character styles", which are directly translated to CSS classes. But the layout person can also apply "local" formatting in a haphazard manner which is not associated with their named styles. In the exported .epub, this local formatting is rendered as CSS classes called ParaOverride-15, CharOverride-107, and so forth.

The result is that some text in the epub is styled by way of three or four levels of confusingly named CSS, which makes it difficult to make a change without first untangling which CSS is overriding which other CSS. Also, text A may appear exactly the same as text B--so that in the ideal world they would be coded as the same element with the same class--however A may achieve its appearance using different classes than does text B, from unrelated "local" formatting applied in InDesign.)

Anyway just a thought in case it finds anyone else who feels similarly. And, if you have read this far, thank you for enduring my InDesign rant!

kat7 is offline   Reply With Quote