Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-15-2013, 08:34 PM   #16
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by travger View Post
Now it takes me whole day to check all the classes and figure out what they do.
In Sigil's Code View, if you right click a class and click "Go To Link or Style" it will jump you right into the CSS where that class is located. This really speeds things up when trying to figure out what class is doing what (especially with Calibre's "calibre01", "calibre02", "calibre03" classes.)
Tex2002ans is offline   Reply With Quote
Old 04-15-2013, 10:22 PM   #17
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
Quote:
Originally Posted by Tex2002ans View Post
In Sigil's Code View, if you right click a class and click "Go To Link or Style" it will jump you right into the CSS where that class is located. This really speeds things up when trying to figure out what class is doing what (especially with Calibre's "calibre01", "calibre02", "calibre03" classes.)
In that end I have no problems, it's mostly "do I need 'calibre32' or 'calibre55' and where are they?". Report shows the file and I can search for the classes but usually it's too much clicking and copypasting to bother.

Though I must really start using Replace All more often and get accustomed that it only feels out of control.
travger is offline   Reply With Quote
Old 04-15-2013, 10:33 PM   #18
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by travger View Post
In that end I have no problems, it's mostly "do I need 'calibre32' or 'calibre55' and where are they?". Report shows the file and I can search for the classes but usually it's too much clicking and copypasting to bother.

Though I must really start using Replace All more often and get accustomed that it only feels out of control.
The report also show 1st discovered (file) usage, makes it easy to check out usage context in many cases.
It is those crazy use of spans everywhere that drive me
theducks is online now   Reply With Quote
Old 04-16-2013, 01:17 AM   #19
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Look at the stylesheet and check out the differences between the styles. If the difference is minor (font-size: 0.993 instead of font-size: 0.995), delete the styles. Usually you can cope between 5-15 styles and that includes seperate styles for italic, bold and so on.
Toxaris is offline   Reply With Quote
Old 04-16-2013, 07:52 AM   #20
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
Quote:
Originally Posted by theducks View Post
The report also show 1st discovered (file) usage, makes it easy to check out usage context in many cases.
It is those crazy use of spans everywhere that drive me
I hear you! Right now I have a book where the only p-s are in headings Every paragraph is between spans AND divs.

It still looks very nice, but I'm curious how much smaller the file will be, so I think it's perfect to experiment on with Replace All.
travger is offline   Reply With Quote
Old 04-16-2013, 10:50 AM   #21
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by HarryT View Post
Absolutely - that's exactly the way to do it. That's why they're called cascading style sheets, because each new style modifies the previous ones. If you have a "paragraph" style, which indents paragraphs, and you want a style for "initial paragraph" with no indent, simply specify the lack of indentation as a modification to the normal paragraph style; don't duplicate the entire style.
I was just testing this in Sigil...I don't know if it's a QT bug or not but it didn't seem to work as expected. I had the following CSS/HTML:

div.fluff p {text-align:justify; font-style:italic}
p.att {text-align:right; font-style:normal}

<div class="fluff">
<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p class="att">Should be normal and right aligned</p>

<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p class="att">Should be normal and right aligned</p>
</div>

Neither the right align of the font style normal were applied in the "att" class unless I used the !important tag in the "att" declaration.

Anyone seen this before?
Turtle91 is online now   Reply With Quote
Old 04-16-2013, 11:16 AM   #22
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by Turtle91 View Post
I was just testing this in Sigil...I don't know if it's a QT bug or not but it didn't seem to work as expected. I had the following CSS/HTML:

div.fluff p {text-align:justify; font-style:italic}
p.att {text-align:right; font-style:normal}

<div class="fluff">
<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p class="att">Should be normal and right aligned</p>

<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p class="att">Should be normal and right aligned</p>
</div>

Neither the right align of the font style normal were applied in the "att" class unless I used the !important tag in the "att" declaration.

Anyone seen this before?
I'm not sure why that's doing that, but I'd suggest changing
div.fluff p {text-align:justify; font-style:italic}
to
div.fluff {text-align:justify; font-style:italic}

there's no need to specify the p — they inherit from the div anyway.
pdurrant is offline   Reply With Quote
Old 04-16-2013, 11:26 AM   #23
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by Turtle91 View Post
I was just testing this in Sigil...I don't know if it's a QT bug or not but it didn't seem to work as expected. I had the following CSS/HTML:

div.fluff p {text-align:justify; font-style:italic}
p.att {text-align:right; font-style:normal}

<div class="fluff">
<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p class="att">Should be normal and right aligned</p>

<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p>Stuff, stuff, and more stuff.</p>
<p class="att">Should be normal and right aligned</p>
</div>

Neither the right align of the font style normal were applied in the "att" class unless I used the !important tag in the "att" declaration.

Anyone seen this before?
Aha! I have it. Your problem is the selector specificity. See 6.4.3 here:

Quote:
A selector's specificity is calculated as follows:

count 1 if the declaration is from is a 'style' attribute rather than a rule with a selector, 0 otherwise (= a) (In HTML, values of an element's "style" attribute are style sheet rules. These rules have no selectors, so a=1, b=0, c=0, and d=0.)
count the number of ID attributes in the selector (= b)
count the number of other attributes and pseudo-classes in the selector (= c)
count the number of element names and pseudo-elements in the selector (= d)
for both, a=0 and b=0

but for div.fluff p, c=1 d=3
for p.att, c=1, d=2

so div.fluff p overrides p.att, unless you make it important (which you should probably not do.)
pdurrant is offline   Reply With Quote
Old 04-16-2013, 02:02 PM   #24
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
wow! I didn't realize specificity went into such detail...I thought an inline class would take priority (like an inline style) over a parent style.

Thanks for the edumacation!
Turtle91 is online now   Reply With Quote
Old 04-16-2013, 03:14 PM   #25
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by Turtle91 View Post
wow! I didn't realize specificity went into such detail...I thought an inline class would take priority (like an inline style) over a parent style.

Thanks for the edumacation!
I didn't know either, until I looked it up. It does seem an odd way to define the priority of styles, but that's the way it's done.
pdurrant is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Touch My home-made KT case made out of a real book vferdman Kobo Reader 6 02-17-2012 11:05 PM
Clovis Killer Discovery kennyc Lounge 67 03-30-2011 06:00 AM
Drift: A Novel of Discovery Drift Writers' Corner 0 09-17-2009 01:28 PM


All times are GMT -4. The time now is 09:46 AM.


MobileRead.com is a privately owned, operated and funded community.