06-12-2012, 03:33 PM | #46 | |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
06-12-2012, 04:11 PM | #47 | |
Well trained by Cats
Posts: 29,792
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:
(ADE is great at that , they Ignore the whole stylesheet) I will take that as the style has not been properly defined (orphaned) should be ignored, thus validate. |
|
Advert | |
|
06-13-2012, 02:39 AM | #48 | |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
You would have to go through every element and then compare it against every selector to see if there is a match. For finding used but undefined entries you could simplify things by restricting what's checked (ie checking only class attributes and seeing if they match a selector. Checking just for the name doesn't cover everything as a class could only be defined for certain tags...). I created an issue to track this - just reporting on classes used in the HTML. |
|
06-13-2012, 04:37 AM | #49 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
I think in this thread we are talking about "unused styles" when they are defined in the CSS stylesheet, but they never actually apply to anything. And we are using "orphaned classes" when a class is used in the XHTML file, but there's no defined style that applies to this class. The rule about ignoring unknown/unsupported styles is, as far as I know, a CSS one, and it refers to properties and values, so if you use "margin_top" instead of "margin-top", it is unknown and ignored. Again, as far as I know, there is no rule that says that an orphaned class (a class used in XHTML but with no specific style defined for it) is wrong. Maybe in XML it is, but in XHTML? How would you apply a custom stylesheet to any document if you don't know all the class names used? (An XHTML could use <p> for its paragraphs, another <p class="text"> and another <p class="normal">, all of them should work fine if you just define a style for "p" in the CSS, no need for "p.text" and "p.normal".) |
|
06-13-2012, 05:23 AM | #50 | |
Bookmaker & Cat Slave
Posts: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
It's not the elements...it's the limitless number of classes that a designer can create, particularly if they're on the fly, or, worse (for us, anyway), we get an INDD file. Man...hard for me to say enough about that. Hitch |
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Buy Broken or unused readers for the Museum | eBookLuke | Flea Market | 14 | 05-06-2012 11:30 AM |
Free Broken or unused readers for the Museum | eBookLuke | Flea Market | 0 | 05-22-2011 06:52 AM |
How often should an unused Kobo be charged? | Gary_M_Mugford | Kobo Reader | 2 | 10-30-2010 10:38 PM |
Unutterably Silly Zelda's gallery of used and unused avatars | Wetdogeared | Lounge | 40 | 05-16-2009 11:31 AM |
iLiad The six unused connections | design256 | iRex Developer's Corner | 10 | 09-13-2006 08:52 AM |