Click here to Skip to main content
15,031,162 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: CCC 20201-07-27 Pin
pkfox26-Jul-21 22:24
professionalpkfox26-Jul-21 22:24 
GeneralRe: CCC 20201-07-27 Pin
Greg Utas27-Jul-21 0:15
mvaGreg Utas27-Jul-21 0:15 
GeneralRe: CCC 20201-07-27 Pin
jsc4227-Jul-21 0:20
professionaljsc4227-Jul-21 0:20 
GeneralRe: CCC 20201-07-27 Pin
Greg Utas27-Jul-21 0:30
mvaGreg Utas27-Jul-21 0:30 
GeneralRe: CCC 20201-07-27 Pin
pkfox27-Jul-21 0:31
professionalpkfox27-Jul-21 0:31 
GeneralRe: CCC 20201-07-27 Pin
Greg Utas27-Jul-21 0:32
mvaGreg Utas27-Jul-21 0:32 
GeneralRe: CCC 20201-07-27 Pin
pkfox27-Jul-21 0:54
professionalpkfox27-Jul-21 0:54 
GeneralWishing I was a web developer suddenly Pin
honey the codewitch26-Jul-21 5:05
mvahoney the codewitch26-Jul-21 5:05 
I try to avoid web work. It's just not my cup of tea. I don't like duck typing. I don't like scripting. I don't really like markup - it's too much typing.

But now I'm faced with the daunting task of shoehorning a "good enough" CSS processor onto an ESP32.

The trouble is, I don't know what constitutes good enough and the internet isn't giving up the goods on that where epubs are concerned.

The trouble is this - EPUB readers are typically running on relatively "fat", android capable devices and use a webkit browser component to display content.

I can't run webkit. I just can't. It's just not going to happen in the RAM and CPU that I have.

So far, I 've gotten away with wedging everything into a 512kB system (with 200kB reserved for the system) by streaming content directly from flash wherever possible rather than using RAM. I have 4MB of NVS flash for program and data, so I lean on it.

Streaming works great when you can do it but CSS presents a challenge.
CSS Selectors Reference - this is my Everest[^]

1. Clearly, I have to load the entire CSS content into some sort of hopefully compact, normalized data structures. I won't be able to stream because of the number of times I'd have to reparse from the beginning to implement the selection.

2. Aside from the selector challenges I have the issue of styles overriding other styles (for example if you have both class and style attributes. That means maybe? a stack of hashtables. I'm not sure if I can afford that?

3. I can't find a working subset of CSS that EPUB routinely expects, I think because everything just uses webkit. That means even if I solve 1 and 2, I have to ... i don't know, somehow figure out what subset of CSS I can reasonably get away with supporting, because supporting it all just isn't going to happen on a device like this.

4. This is where I wish I was a web developer. I don't know what most of these style attributes do. I don't understand the CSS box model. I don't know for example, why you might use padding instead of margins aside from being able to venture a guess. Every single thing I have to support I'm going to have to learn first.

This is daunting. By the time I'm done I suppose if I still have any of my sanity left I could expend it on doing web development for people, because after this I'll be a CSS and HTML expert. Unsure | :~
Real programmers use butterflies

GeneralRe: Wishing I was a web developer suddenly Pin
Marc Clifton26-Jul-21 5:32
mvaMarc Clifton26-Jul-21 5:32 
GeneralRe: Wishing I was a web developer suddenly Pin
OriginalGriff26-Jul-21 6:05
mveOriginalGriff26-Jul-21 6:05 
GeneralRe: Wishing I was a web developer suddenly Pin
RickZeeland26-Jul-21 6:34
mveRickZeeland26-Jul-21 6:34 
GeneralRe: Wishing I was a web developer suddenly Pin
Greg Utas26-Jul-21 7:14
mvaGreg Utas26-Jul-21 7:14 
GeneralRe: Wishing I was a web developer suddenly Pin
Daniel Pfeffer26-Jul-21 8:01
professionalDaniel Pfeffer26-Jul-21 8:01 
QuestionRe: Wishing I was a web developer suddenly Pin
Eddy Vluggen26-Jul-21 13:28
professionalEddy Vluggen26-Jul-21 13:28 
AnswerRe: Wishing I was a web developer suddenly Pin
honey the codewitch26-Jul-21 13:29
mvahoney the codewitch26-Jul-21 13:29 
QuestionRe: Wishing I was a web developer suddenly Pin
Eddy Vluggen26-Jul-21 13:41
professionalEddy Vluggen26-Jul-21 13:41 
AnswerRe: Wishing I was a web developer suddenly Pin
honey the codewitch26-Jul-21 14:54
mvahoney the codewitch26-Jul-21 14:54 
GeneralRe: Wishing I was a web developer suddenly Pin
W Balboos, GHB27-Jul-21 3:56
mveW Balboos, GHB27-Jul-21 3:56 
GeneralThought of the Day Pin
OriginalGriff26-Jul-21 4:49
mveOriginalGriff26-Jul-21 4:49 
GeneralRe: Thought of the Day Pin
PIEBALDconsult26-Jul-21 5:00
professionalPIEBALDconsult26-Jul-21 5:00 
GeneralRe: Thought of the Day Pin
OriginalGriff26-Jul-21 5:02
mveOriginalGriff26-Jul-21 5:02 
GeneralRe: Thought of the Day Pin
W Balboos, GHB26-Jul-21 5:18
mveW Balboos, GHB26-Jul-21 5:18 
GeneralRe: Thought of the Day Pin
jeron126-Jul-21 5:31
Memberjeron126-Jul-21 5:31 
GeneralRe: Thought of the Day Pin
Slow Eddie26-Jul-21 11:06
professionalSlow Eddie26-Jul-21 11:06 
GeneralRe: Thought of the Day Pin
jeron126-Jul-21 11:13
Memberjeron126-Jul-21 11:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.