passes the page_text_direction into the govspeak html publication component to ensure that lists display properly in right to left content
govspeak html publication is used as a wrapper for the govspeak component, with some additional styles included
it still accepts and passes through to govspeak a direction parameter
in this case, pages had the the correct direction class applied to the top of the page, which seems to work for most of the styles on the page, but the govspeak CSS for RTL is written specifically assuming that the direction class is applied to the govspeak component (wrapping element) rather than any higher element, so the styles weren't being used properly
this resulted in a very subtle problem where lists had a margin applied to the wrong side (the default left side, for LTR content) instead of the right, which looks fine in most situations (because there's a gap between the right edge of the content and the left edge of the right hand column) unless the screen is shorter than the contents of the right hand column, forcing a scrollbar, which overlapped the bullets of the list
passing the govspeak html publication a direction option (that already existed, but wasn't being used for this purpose) fixes the problem, as the govspeak component now applies correct RTL styling to lists
consequence is that for LTR content this parameter is now explicitly passed, instead of previously assumed, but a quick visual/sense check suggests that this should be fine
⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️
What / why
page_text_direction
into the govspeak html publication component to ensure that lists display properly in right to left contentdirection
parameterdirection
class applied to the top of the page, which seems to work for most of the styles on the page, but the govspeak CSS for RTL is written specifically assuming that thedirection
class is applied to the govspeak component (wrapping element) rather than any higher element, so the styles weren't being used properlydirection
option (that already existed, but wasn't being used for this purpose) fixes the problem, as the govspeak component now applies correct RTL styling to listsExample HTML publication pages:
Visual changes
First, here's the problem.
Now, with the
.direction-rtl
class applied to the govspeak component, it looks like this:Trello card: https://trello.com/c/HXiajSKv/183-bullet-points-cut-off-in-html-attachments-in-rtl-languages