Merge "Revert "Update light/dark detection."" into tm-dev