From c79e5b3f173f001a85b95edae96e0fb3d34cafd3 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 8 Mar 2017 23:53:59 +0100 Subject: [PATCH 1/3] Viewer: replace find label with placeholder/tooltip This is common in the rest of the UI and helps us prevent responsiveness issues for different length strings in different locales. --- l10n/en-US/viewer.properties | 3 ++- l10n/nl/viewer.properties | 3 ++- l10n/sv-SE/viewer.properties | 3 ++- web/viewer.css | 15 +++++++++++++++ web/viewer.html | 3 +-- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/l10n/en-US/viewer.properties b/l10n/en-US/viewer.properties index da5442c68bda6..27939c13bb644 100644 --- a/l10n/en-US/viewer.properties +++ b/l10n/en-US/viewer.properties @@ -121,7 +121,8 @@ thumb_page_title=Page {{page}} thumb_page_canvas=Thumbnail of Page {{page}} # Find panel button title and messages -find_label=Find: +find_input.title=Find +find_input.placeholder=Find in document… find_previous.title=Find the previous occurrence of the phrase find_previous_label=Previous find_next.title=Find the next occurrence of the phrase diff --git a/l10n/nl/viewer.properties b/l10n/nl/viewer.properties index fedc5fa593471..ad254db048d44 100644 --- a/l10n/nl/viewer.properties +++ b/l10n/nl/viewer.properties @@ -120,7 +120,8 @@ thumb_page_title=Pagina {{page}} thumb_page_canvas=Miniatuur van pagina {{page}} # Find panel button title and messages -find_label=Zoeken: +find_input.title=Zoeken +find_input.placeholder=Zoeken in document… find_previous.title=De vorige overeenkomst van de tekst zoeken find_previous_label=Vorige find_next.title=De volgende overeenkomst van de tekst zoeken diff --git a/l10n/sv-SE/viewer.properties b/l10n/sv-SE/viewer.properties index c1ff607c0cd85..229c4a358c4c8 100644 --- a/l10n/sv-SE/viewer.properties +++ b/l10n/sv-SE/viewer.properties @@ -121,7 +121,8 @@ thumb_page_title=Sida {{page}} thumb_page_canvas=Miniatyr av sida {{page}} # Find panel button title and messages -find_label=Sök: +find_input.title=Sök +find_input.placeholder=Sök i dokumentet… find_previous.title=Hitta föregående förekomst av frasen find_previous_label=Föregående find_next.title=Hitta nästa förekomst av frasen diff --git a/web/viewer.css b/web/viewer.css index 612172e0c5389..b6e567521a735 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -372,6 +372,21 @@ html[dir='rtl'] .findbar { -moz-user-select: none; } +#findInput { + width: 200px; +} +#findInput::-webkit-input-placeholder { + font-style: italic; +} +#findInput::-moz-placeholder { + font-style: italic; +} +#findInput:-ms-input-placeholder { + font-style: italic; +} +#findInput::placeholder { + font-style: italic; +} #findInput[data-status="pending"] { background-image: url(images/loading-small.png); background-repeat: no-repeat; diff --git a/web/viewer.html b/web/viewer.html index 26af8f44744bb..ea357475e1fe3 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -98,8 +98,7 @@