[Okular-devel] Regarding css in epubs

Azat Khuzhin dohardgopro at gmail.com
Mon Apr 1 19:01:45 UTC 2013


On Mon, Apr 1, 2013 at 10:38 PM, Jaydeep Solanki <jaydp17 at gmail.com> wrote:
>
>
> On Mon, Apr 1, 2013 at 11:55 PM, Azat Khuzhin <dohardgopro at gmail.com> wrote:
>>
>> Hi
>>
>> Respectfully
>> Azat Khuzhin.
>> From phone.
>>
>>
>> On Apr 1, 2013 12:22 PM, "Jaydeep Solanki" <jaydp17 at gmail.com> wrote:
>> >
>> > Hello,
>> > I remember Albert, telling me about css being ignored in epub documents,
>> > so I had a look into it.
>> > I'm not sure if we are adding the stylesheet from external css files to
>> > TextDocument. I tried to add it and it seems to work, it has some
>> > limitations, but I'm working on it.
>> >
>> > Here is something that I tried.
>> >
>> > Please have a look at it.
>>
>> Thanks!
>> I also started implementing this a few weeks ago, but I have a lot of
>> work, and I can't grab time for this.
>> I look through you code, and I have a few questions:
>> Is it really working?
>
>
> As far as I have noticed, css applied to the body, is not working.
> As css is applied to newly inserted html only, I guess TextDocument already
> has html & body tags previously inserted, so it just ignores it, thus the
> css fails to apply.
> This can be overcome by using setHtml("..."); in TextDocument, but according
> to me it wouldn't be appropriate to set html on every iteration.

Yes, I need to apply CSS for <body>.
CSS for all except <body> is works fine.

If you are interested in what I doing:
See this review request - https://git.reviewboard.kde.org/r/109364/
And this for last development patch -
https://github.com/azat/okular/compare/master...get-background-color-from-kcolorscheme.patch
(Because review request contain first version of patch)

>
> Cheers,
> Jaydeep Solanki
>
>>
>> As I remember I did something similar, and there were some problems with
>> it
>>
>> > heers,
>> > Jaydeep Solanki
>> >
>> >
>> > _______________________________________________
>> > Okular-devel mailing list
>> > Okular-devel at kde.org
>> > https://mail.kde.org/mailman/listinfo/okular-devel
>> >
>>
>>
>> _______________________________________________
>> Okular-devel mailing list
>> Okular-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/okular-devel
>>
>
>
> _______________________________________________
> Okular-devel mailing list
> Okular-devel at kde.org
> https://mail.kde.org/mailman/listinfo/okular-devel
>



--
Respectfully
Azat Khuzhin
Primary email a3at.mail at gmail.com


More information about the Okular-devel mailing list