Text size enactor calculates initial size based on .container, should be using .root
Description
As part of its initialization, the text size enactor calculates the initial pixel size and hard-codes that onto the root element to ensure that rems in the CSS will work. Incorrectly, the initial calculation is not using the root but rather the container. This causes problems if the root and container don't have the same initial font size. The calculation should be based on root.
This problem was discovered when adding UIO to a Wordpress child theme. Without UIO, the html element (the root) and the body element (the container) had different font sizes initially (10px and 18px respectively). When 18px was added to the html element, everything on the page expanded to enormous size.
As part of its initialization, the text size enactor calculates the initial pixel size and hard-codes that onto the root element to ensure that rems in the CSS will work. Incorrectly, the initial calculation is not using the root but rather the container. This causes problems if the root and container don't have the same initial font size. The calculation should be based on root.
This problem was discovered when adding UIO to a Wordpress child theme. Without UIO, the html element (the root) and the body element (the container) had different font sizes initially (10px and 18px respectively). When 18px was added to the html element, everything on the page expanded to enormous size.