From ee50ef99e096981c14fdbbf3910272b89dbfa5ec Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Mon, 6 Aug 2018 15:43:10 -0400 Subject: [PATCH] RTL corrections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * center the title on full screen modals. Adding the `[dir=“ltr”]` atttribute to the css rule for a child style didn’t work the way I expected. `[dir="ltr"] .full-screen .header-item-title` did not match the fullscreen title element, so the style wasn’t applied. `.full-screen [dir="ltr"] .header-item-title` did match. * fix the filter to reverse the icon and ‘x’ in the filter input * more space after the library back icon * reverse the arrow on camera -retake image and rerecord sound. --- src/components/button/button.css | 9 ++++- src/components/camera-modal/camera-modal.css | 4 +++ src/components/camera-modal/camera-modal.jsx | 2 +- src/components/filter/filter.css | 36 +++++++++++++++++-- src/components/modal/modal.css | 4 +-- src/components/record-modal/playback-step.jsx | 2 +- src/components/record-modal/record-modal.css | 4 +++ src/containers/custom-procedures.jsx | 5 ++- 8 files changed, 57 insertions(+), 9 deletions(-) diff --git a/src/components/button/button.css b/src/components/button/button.css index 9ce746c52..9ba2fbd93 100644 --- a/src/components/button/button.css +++ b/src/components/button/button.css @@ -11,10 +11,17 @@ } .icon { - margin-right: .5rem; height: 1.5rem; } +[dir="ltr"] .icon { + margin-right: .5rem; +} + +[dir="rtl"] .icon { + margin-left: .5rem; +} + .content { white-space: nowrap; } diff --git a/src/components/camera-modal/camera-modal.css b/src/components/camera-modal/camera-modal.css index 4ea962fba..7522fbb2e 100644 --- a/src/components/camera-modal/camera-modal.css +++ b/src/components/camera-modal/camera-modal.css @@ -135,6 +135,10 @@ $main-button-size: 2.75rem; color: $ui-white; } +[dir="rtl"] .retake-button img { + transform: scaleX(-1); +} + @keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } diff --git a/src/components/camera-modal/camera-modal.jsx b/src/components/camera-modal/camera-modal.jsx index 5e18661b7..8c499c362 100644 --- a/src/components/camera-modal/camera-modal.jsx +++ b/src/components/camera-modal/camera-modal.jsx @@ -79,7 +79,7 @@ const CameraModal = ({intl, ...props}) => ( {props.capture ?