Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-21-2010, 03:10 PM   #1
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
css pseudo elements and adjacent combinators in extra css?

Does extra_css support pseudo elements, adjacent combinators, etc, or is it supposed to? I did some testing of things like this:
Code:
blockquote p {font-size: 85%; margin-top: 0em; margin-bottom: 0em}
p.initial {text-indent: 0;}
p.initial + p {clear: left;}
blockquote + blockquote {padding 5em}
'blockquote p' is applied - I don't know if this is technically considered an adjacent combinator or not - I think not.

'p.initial + p's clear left does not appear in the final css, and neither are the settings for 'blockquote + blockquote'. I've tried the nested blockquotes without the plus sign '+', but no luck there either.

Not sure if I'm dealing with a bug, a feature request, or if I'm just doing something wrong.
ldolse is offline   Reply With Quote
Old 12-21-2010, 03:36 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,744
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Have a look at the table in http://www.w3.org/TR/CSS2/selector.html to clear up your confusions.

Adjacent, descendant and child selectors are supported. The :first-letter pseudo selector is supported (it is basically converted into a <span> around the first letter.

No other pseudo selectors are supported.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-21-2010, 05:09 PM   #3
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
That table is extremely helpful, thanks! Hadn't been able to find a tutorial/info that documented all the different types in one place. That rocks that this is all supported.

I see now I was mixing up adjacent and child selectors. If anyone reads this and needs an answer, I should have been using this for my blockquotes (which were nested):
Code:
blockquote > blockquote {padding-left: 20%}

The 'p.initial + p' didn't work because of my workflow - I forgot the <p> tag and initial class hadn't created yet because I'd been using markdown.
ldolse is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
a few extra css questions marbs Recipes 12 11-20-2010 10:15 AM
Styling Elements in CSS - ADE and Sony toskpro Sony Reader 0 07-19-2010 01:55 PM
using "Extra CSS" box RedRoverJ Calibre 4 06-25-2010 07:08 PM
help with css bobcdy ePub 2 02-13-2010 11:59 AM
Help with CSS, anyone? rogue_ronin Workshop 36 08-14-2009 09:28 PM


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


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