View Single Post
Old 03-01-2024, 09:37 AM   #34
xxyzz
Evangelist
xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.
 
Posts: 442
Karma: 2666666
Join Date: Nov 2020
Device: none
I have figured out how to use selenium to check if an element is displayed and get all the css rules applied to it.

I guess the text of tags in the same "block" are in the same "structure", probably by checking the "display" css rule. But I don't know which html tag creates the "container" type "structure". It seems the table tag creates the "table" type, and most tags are "text" type.

I could get all the css rules of an element but kindle previewer only uses a few rules on an element and it also change the rule type and value, for example, "padding-left: 1em;" is changed to
Code:
margin_left: {
    value: 3.7039999961853027e0,
    unit: percent
  }
I hope the original rule could work so I don't have to guess how they compute this value...
xxyzz is offline   Reply With Quote