I have just migrated from 0.18 to 0.19 and I noticed that we are no longer able to set inline styles on DOM elements. After some digging I believe it’s related to this commit:
I have a small piece of code that adds a inline style of a negative
text-indent with a positive
padding-left to soft-wrap indented lists like this:
Since the 0.19 update, it seems that the inline style gets wiped as soon as it’s added, and the DOM is reverted back looking like this:
What I’m doing right now, which previously worked in 0.18, is to use
view.requestMeasure in an
In the read phase, I read all the lines from
view.viewportLines for whether they’re a list with indentation, and if so, compute the pixel value using
coordsAtPos. Then in the write phase, I’m adding both style rules.
What would be the recommended way in 0.19? The goal is to add varying levels of
text-indent (and matching
padding-left to each line individually, depending on the text.