From cb9158579f795348b8732f37d885fe2929ce3633 Mon Sep 17 00:00:00 2001 From: Conrad Chan Date: Mon, 4 Nov 2019 16:20:02 -0800 Subject: [PATCH 1/2] style(doc-find-bar): misaligned in chrome --- src/lib/viewers/doc/DocFindBar.scss | 36 ++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/lib/viewers/doc/DocFindBar.scss b/src/lib/viewers/doc/DocFindBar.scss index 8d03c75d3..31809dae0 100644 --- a/src/lib/viewers/doc/DocFindBar.scss +++ b/src/lib/viewers/doc/DocFindBar.scss @@ -3,15 +3,18 @@ $moon-yellow: #ffba1a !default; $blue: #00f !default; .bp-find-bar { + $bdlGray10: #e8e8e8; + position: absolute; top: 0; right: 17px; // Prevents overlap with scroll-bar + display: flex; + align-items: center; padding: 6px; font-size: 12px; font-family: Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif; background: $white; - border: 1px solid fade-out($black, .95); - box-shadow: 0 1px 0 fade-out($white, .95) fade-out($black, .95); + border: 1px solid $bdlGray10; // Removes "clear field" x at the end of input fields in IE10+ on Windows 8+ ::-ms-clear { @@ -24,13 +27,12 @@ $blue: #00f !default; padding: 6px 6px 6px 25px; color: $better-black; line-height: 20px; - border: 1px solid fade-out($black, .95); + border: 1px solid $bdlGray10; border-radius: 2px 0 0 2px; outline-style: none; - box-shadow: 0 1px 0 fade-out($white, .95) fade-out($black, .95); transition-timing-function: ease; transition-duration: 150ms; - transition-property: background-color, border-color, box-shadow; + transition-property: border-color; &:focus, &:hover { @@ -55,14 +57,21 @@ $blue: #00f !default; .bp-doc-find-prev, .bp-doc-find-next, .bp-doc-find-close { - display: inline-block; + display: flex; + align-items: center; + justify-content: center; width: 34px; height: 34px; - margin-top: -1px; + padding: 0; line-height: 1; vertical-align: middle; background: none; border: 1px solid $off-white; + border-left: 0; + + svg { + width: 17px; + } .icon { fill: fade-out($better-black, .25); @@ -78,12 +87,19 @@ $blue: #00f !default; line-height: 1; text-align: left; border: 0; + + svg { + width: 22px; + } } .bp-doc-find-close { - padding: 6px; border: 0; + svg { + width: 22px; + } + &:hover .icon { fill: $better-black; } @@ -94,6 +110,10 @@ $blue: #00f !default; .bp-find-match-not-found:focus { border-color: fade-out($great-balls-of-fire, .5); } + + .bp-doc-find-controls { + display: flex; + } } .textLayer { From 3b7761b300dc6fb66383a0764192380cd03442d4 Mon Sep 17 00:00:00 2001 From: Conrad Chan Date: Mon, 4 Nov 2019 16:33:12 -0800 Subject: [PATCH 2/2] chore: address PR comments --- src/lib/viewers/doc/DocFindBar.scss | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/lib/viewers/doc/DocFindBar.scss b/src/lib/viewers/doc/DocFindBar.scss index 31809dae0..adfd2dea8 100644 --- a/src/lib/viewers/doc/DocFindBar.scss +++ b/src/lib/viewers/doc/DocFindBar.scss @@ -83,26 +83,23 @@ $blue: #00f !default; top: 15%; left: 5px; margin: 0; - padding: 6px; line-height: 1; text-align: left; - border: 0; + } - svg { - width: 22px; + .bp-doc-find-close { + &:hover .icon { + fill: $better-black; } } + .bp-doc-find-search, .bp-doc-find-close { border: 0; svg { width: 22px; } - - &:hover .icon { - fill: $better-black; - } } .bp-find-match-not-found,