Commit f9e734f9 authored by kevers@chromium.org's avatar kevers@chromium.org

Standardize size of WebUI controls for touch and non-touch.

BUG=139834


Review URL: https://chromiumcodereview.appspot.com/10837190

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151698 0039d316-1c4b-4281-b951-d872f2087c98
parent 0cb0c0b6
...@@ -22,6 +22,7 @@ list > * { ...@@ -22,6 +22,7 @@ list > * {
-webkit-padding-start: 3px; -webkit-padding-start: 3px;
color: hsl(0, 0%, 70%); color: hsl(0, 0%, 70%);
display: -webkit-box; display: -webkit-box;
line-height: 30px;
padding-bottom: 0; padding-bottom: 0;
padding-top: 0; padding-top: 0;
text-decoration: none; text-decoration: none;
......
...@@ -414,3 +414,12 @@ html[dir=rtl] .network-menu-item { ...@@ -414,3 +414,12 @@ html[dir=rtl] .network-menu-item {
-webkit-transition: height 200ms; -webkit-transition: height 200ms;
overflow-y: hidden; overflow-y: hidden;
} }
#keyboard-overlay .option-value > select {
width: 100%;
}
#keyboard-overlay table {
/* Same as .settings-row {margin}. */
-webkit-border-vertical-spacing: 0.65em;
}
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</if> </if>
<section> <section>
<h3 i18n-content="sectionTitleAppearance"></h3> <h3 i18n-content="sectionTitleAppearance"></h3>
<div> <div class="settings-row">
<if expr="pp_ifdef('chromeos') and pp_ifdef('use_ash')"> <if expr="pp_ifdef('chromeos') and pp_ifdef('use_ash')">
<button id="set-wallpaper" i18n-content="setWallpaper" <button id="set-wallpaper" i18n-content="setWallpaper"
guest-visibility="disabled"></button> guest-visibility="disabled"></button>
...@@ -199,12 +199,12 @@ ...@@ -199,12 +199,12 @@
<button id="privacyClearDataButton" <button id="privacyClearDataButton"
i18n-content="privacyClearDataButton"></button> i18n-content="privacyClearDataButton"></button>
</div> </div>
<div id="privacy-explanation" class="settings-row"> <p id="privacy-explanation" class="settings-row">
<span i18n-content="improveBrowsingExperience"></span> <span i18n-content="improveBrowsingExperience"></span>
<span i18n-content="disableWebServices"></span> <span i18n-content="disableWebServices"></span>
<a target="_blank" i18n-content="learnMore" <a target="_blank" i18n-content="learnMore"
i18n-values="href:privacyLearnMoreURL"></a> i18n-values="href:privacyLearnMoreURL"></a>
</div> </p>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input id="alternateErrorPagesEnabled" <input id="alternateErrorPagesEnabled"
...@@ -385,8 +385,10 @@ ...@@ -385,8 +385,10 @@
<section> <section>
<h3 i18n-content="advancedSectionTitleLanguages"></h3> <h3 i18n-content="advancedSectionTitleLanguages"></h3>
<span class="settings-row" i18n-content="languageSectionLabel"></span> <span class="settings-row" i18n-content="languageSectionLabel"></span>
<button id="language-button" <div class="settings-row">
i18n-content="languageAndSpellCheckSettingsButton"></button> <button id="language-button"
i18n-content="languageAndSpellCheckSettingsButton"></button>
</div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input id="enableTranslate" pref="translate.enabled" <input id="enableTranslate" pref="translate.enabled"
...@@ -459,8 +461,8 @@ ...@@ -459,8 +461,8 @@
<section id="cloud-print-connector-section"> <section id="cloud-print-connector-section">
<h3 i18n-content="advancedSectionTitleCloudPrint"></h3> <h3 i18n-content="advancedSectionTitleCloudPrint"></h3>
<div> <div>
<span id="cloudPrintConnectorLabel" class="settings-row" <p id="cloudPrintConnectorLabel" class="settings-row"
i18n-content="cloudPrintConnectorDisabledLabel"></span> i18n-content="cloudPrintConnectorDisabledLabel"></p>
<div class="settings-row"> <div class="settings-row">
<button id="cloudPrintConnectorSetupButton" <button id="cloudPrintConnectorSetupButton"
i18n-content="cloudPrintConnectorDisabledButton"></button> i18n-content="cloudPrintConnectorDisabledButton"></button>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<tr> <tr>
<td class="option-name" colspan="2"> <td class="option-name" colspan="2">
<div class="checkbox"> <div class="checkbox">
<labl> <label>
<input id="pinyin-correct-pinyin" <input id="pinyin-correct-pinyin"
pref="settings.language.pinyin_correct_pinyin" pref="settings.language.pinyin_correct_pinyin"
type="checkbox"> type="checkbox">
......
...@@ -53,7 +53,9 @@ select.exception-setting { ...@@ -53,7 +53,9 @@ select.exception-setting {
} }
#disable-plugins-container { #disable-plugins-container {
margin: 7px 0; /* Same as .checkbox and .radio padding. Using padding instead of margin
* to ensure minimum height for tap target. */
padding: 7px 0;
} }
div[role='listitem'][managedby] { div[role='listitem'][managedby] {
......
...@@ -42,12 +42,14 @@ ...@@ -42,12 +42,14 @@
class="clear-plugin-lso-data-disabled"></span> class="clear-plugin-lso-data-disabled"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" contentType="cookies" <div class="settings-row">
i18n-content="manage_exceptions"></button> <button class="exceptions-list-button" contentType="cookies"
<button id="show-cookies-button" i18n-content="manage_exceptions"></button>
i18n-content="cookies_show_cookies"></button> <button id="show-cookies-button"
<button id="show-app-cookies-button" i18n-content="cookies_show_cookies"></button>
i18n-content="cookies_show_app_cookies"></button> <button id="show-app-cookies-button"
i18n-content="cookies_show_app_cookies"></button>
</div>
</div> </div>
</section> </section>
<!-- Image filter --> <!-- Image filter -->
...@@ -66,8 +68,10 @@ ...@@ -66,8 +68,10 @@
<span i18n-content="images_block"></span> <span i18n-content="images_block"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" contentType="images" <div class="settings-row">
i18n-content="manage_exceptions"></button> <button class="exceptions-list-button" contentType="images"
i18n-content="manage_exceptions"></button>
</div>
</div> </div>
</section> </section>
<!-- JavaScript filter --> <!-- JavaScript filter -->
...@@ -86,8 +90,10 @@ ...@@ -86,8 +90,10 @@
<span i18n-content="javascript_block"></span> <span i18n-content="javascript_block"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" contentType="javascript" <div class="settings-row">
i18n-content="manage_exceptions"></button> <button class="exceptions-list-button" contentType="javascript"
i18n-content="manage_exceptions"></button>
</div>
</div> </div>
</section> </section>
<!-- Handlers settings --> <!-- Handlers settings -->
...@@ -108,8 +114,10 @@ ...@@ -108,8 +114,10 @@
<span i18n-content="handlers_block"></span> <span i18n-content="handlers_block"></span>
</label> </label>
</div> </div>
<button id="manage-handlers-button" contentType="handlers" <div class="settings-row">
i18n-content="manage_handlers"></button> <button id="manage-handlers-button" contentType="handlers"
i18n-content="manage_handlers"></button>
</div>
</div> </div>
</section> </section>
<!-- Plug-ins filter --> <!-- Plug-ins filter -->
...@@ -134,8 +142,10 @@ ...@@ -134,8 +142,10 @@
<span i18n-content="plugins_block"></span> <span i18n-content="plugins_block"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" contentType="plugins" <div class="settings-row">
i18n-content="manage_exceptions"></button> <button class="exceptions-list-button" contentType="plugins"
i18n-content="manage_exceptions"></button>
</div>
<div id="disable-plugins-container"> <div id="disable-plugins-container">
<a href="chrome://plugins" i18n-content="disableIndividualPlugins" <a href="chrome://plugins" i18n-content="disableIndividualPlugins"
target="_blank"></a> target="_blank"></a>
...@@ -158,8 +168,10 @@ ...@@ -158,8 +168,10 @@
<span i18n-content="popups_block"></span> <span i18n-content="popups_block"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" contentType="popups" <div class="settings-row">
i18n-content="manage_exceptions"></button> <button class="exceptions-list-button" contentType="popups"
i18n-content="manage_exceptions"></button>
</div>
</div> </div>
</section> </section>
<!-- Location filter --> <!-- Location filter -->
...@@ -184,8 +196,10 @@ ...@@ -184,8 +196,10 @@
<span i18n-content="location_block"></span> <span i18n-content="location_block"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" contentType="location" <div class="settings-row">
i18n-content="manage_exceptions"></button> <button class="exceptions-list-button" contentType="location"
i18n-content="manage_exceptions"></button>
</div>
</div> </div>
</section> </section>
<!-- Notifications filter tab contents --> <!-- Notifications filter tab contents -->
...@@ -210,14 +224,16 @@ ...@@ -210,14 +224,16 @@
<span i18n-content="notifications_block"></span> <span i18n-content="notifications_block"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" contentType="notifications" <div class="settings-row">
i18n-content="manage_exceptions"></button> <button class="exceptions-list-button" contentType="notifications"
i18n-content="manage_exceptions"></button>
</div>
</div> </div>
</section> </section>
<!-- Fullscreen filter --> <!-- Fullscreen filter -->
<section> <section>
<h3 i18n-content="fullscreen_tab_label"></h3> <h3 i18n-content="fullscreen_tab_label"></h3>
<div> <div class="settings-row">
<button class="exceptions-list-button" contentType="fullscreen" <button class="exceptions-list-button" contentType="fullscreen"
i18n-content="manage_exceptions"></button> i18n-content="manage_exceptions"></button>
</div> </div>
...@@ -244,8 +260,10 @@ ...@@ -244,8 +260,10 @@
<span i18n-content="mouselock_block"></span> <span i18n-content="mouselock_block"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" contentType="mouselock" <div class="settings-row">
i18n-content="manage_exceptions"></button> <button class="exceptions-list-button" contentType="mouselock"
i18n-content="manage_exceptions"></button>
</div>
</div> </div>
</section> </section>
<!-- Intent registration filter --> <!-- Intent registration filter -->
...@@ -275,9 +293,11 @@ ...@@ -275,9 +293,11 @@
<span i18n-content="pepperFlashCameramicBlock"></span> <span i18n-content="pepperFlashCameramicBlock"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" <div class="settings-row">
contentType="pepper-flash-cameramic" <button class="exceptions-list-button"
i18n-content="manage_exceptions"></button> contentType="pepper-flash-cameramic"
i18n-content="manage_exceptions"></button>
</div>
</div> </div>
</section> </section>
<if expr="pp_ifdef('chromeos')"> <if expr="pp_ifdef('chromeos')">
...@@ -314,13 +334,15 @@ ...@@ -314,13 +334,15 @@
<span i18n-content="mediaStreamBlock"></span> <span i18n-content="mediaStreamBlock"></span>
</label> </label>
</div> </div>
<button class="exceptions-list-button" contentType="media-stream" <div class="settings-row">
i18n-content="manage_exceptions"></button> <button class="exceptions-list-button" contentType="media-stream"
i18n-content="manage_exceptions"></button>
</div>
</div> </div>
</section> </section>
<section id="media-galleries-section" hidden> <section id="media-galleries-section" hidden>
<h3 i18n-content="mediaGalleriesSectionLabel"></h3> <h3 i18n-content="mediaGalleriesSectionLabel"></h3>
<div> <div class="settings-row">
<button id="manage-galleries-button" <button id="manage-galleries-button"
i18n-content="manageGalleriesButton"></button> i18n-content="manageGalleriesButton"></button>
</div> </div>
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
.language-options-header, .language-options-header,
.language-options-footer { .language-options-footer {
line-height: 1.2em;
margin: 10px 0; margin: 10px 0;
} }
...@@ -81,6 +82,9 @@ ...@@ -81,6 +82,9 @@
#language-options-input-method-list button { #language-options-input-method-list button {
-webkit-margin-start: 20px; -webkit-margin-start: 20px;
display: block; display: block;
/* Same margin as .settings-row. */
margin-bottom: 0.65em;
margin-top: 0.65em;
} }
#language-options-list { #language-options-list {
...@@ -130,6 +134,11 @@ ...@@ -130,6 +134,11 @@
-webkit-column-gap: 20px; -webkit-column-gap: 20px;
} }
#add-language-overlay-language-list > li > button.link-button {
padding-bottom: 8px;
padding-top: 8px;
}
#add-language-overlay-page { #add-language-overlay-page {
width: 800px; width: 800px;
} }
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
.search-engine-list .favicon { .search-engine-list .favicon {
height: 16px; height: 16px;
padding: 1px 7px 0 7px; line-height: 16px;
padding: 0 7px;
width: 16px; width: 16px;
} }
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
.search-engine-list .url-column .list-inline-button { .search-engine-list .url-column .list-inline-button {
margin-top: 0; margin-top: 0;
padding: 1px 6px; padding: 1px 6px 2px 6px;
} }
.search-engine-list > :not(:hover):not([editing]) .url-column .search-engine-list > :not(:hover):not([editing]) .url-column
......
...@@ -104,53 +104,3 @@ html[dir='rtl'] input.weakrtl::-webkit-input-placeholder, ...@@ -104,53 +104,3 @@ html[dir='rtl'] input.weakrtl::-webkit-input-placeholder,
html[dir='rtl'] .weakrtl input::-webkit-input-placeholder { html[dir='rtl'] .weakrtl input::-webkit-input-placeholder {
direction: rtl; direction: rtl;
} }
/* Rules to make it easier to hit targets when using a coarse pointer like
* a touch screen.
*/
@media (pointer:coarse) {
list input[type='input'],
list input[type='password'],
list input[type='search'],
list input[type='text'],
list input[type='url'] {
margin: 0;
padding: 3px 3px 2px 3px;
}
/* Margins are not touchable. Use padding on the inner label instead to
increase the size of the touch target. */
.checkbox,
.radio {
margin: 0;
}
.checkbox label,
.radio label {
padding-bottom: 7px;
padding-top: 7px;
}
li > button.link-button {
padding-bottom: 8px;
padding-top: 8px;
}
:-webkit-any(button,
input[type='button'],
input[type='submit'],
select):not(.custom-appearance):not(.link-button) {
margin-bottom: 6px;
margin-top: 6px;
}
list :-webkit-any(
button,
input[type='button'],
input[type='submit'],
select):not(.custom-appearance):not(.link-button) {
margin: 0;
padding-bottom: 0;
padding-top: 3px;
}
}
...@@ -91,6 +91,22 @@ grid > .spacer { ...@@ -91,6 +91,22 @@ grid > .spacer {
visibility: hidden; visibility: hidden;
} }
list :-webkit-any(
input[type='input'],
input[type='password'],
input[type='search'],
input[type='text'],
input[type='url']),
list :-webkit-any(
button,
input[type='button'],
input[type='submit'],
select):not(.custom-appearance):not(.link-button) {
line-height: normal;
margin: 0;
vertical-align: middle;
}
list > [hidden], list > [hidden],
grid > [hidden] { grid > [hidden] {
display: none; display: none;
......
...@@ -16,18 +16,12 @@ tree { ...@@ -16,18 +16,12 @@ tree {
border-radius: 2px; border-radius: 2px;
color: black; color: black;
cursor: default; cursor: default;
line-height: 20px; line-height: 28px;
padding: 0 3px; padding: 0 3px;
position: relative; position: relative;
white-space: nowrap; white-space: nowrap;
} }
@media (pointer:coarse) {
.tree-item > .tree-row {
line-height: 40px;
}
}
.expand-icon { .expand-icon {
-webkit-transform: rotate(-90deg); -webkit-transform: rotate(-90deg);
-webkit-transition: all 150ms; -webkit-transition: all 150ms;
...@@ -38,17 +32,11 @@ tree { ...@@ -38,17 +32,11 @@ tree {
height: 16px; height: 16px;
opacity: .6; opacity: .6;
position: relative; position: relative;
top: 2px; top: 6px;
vertical-align: top; vertical-align: top;
width: 16px; width: 16px;
} }
@media (pointer:coarse) {
.expand-icon {
vertical-align: text-top;
}
}
html[dir=rtl] .expand-icon { html[dir=rtl] .expand-icon {
-webkit-transform: rotate(90deg); -webkit-transform: rotate(90deg);
} }
......
...@@ -35,10 +35,6 @@ input[type='radio'] { ...@@ -35,10 +35,6 @@ input[type='radio'] {
select { select {
min-height: 2em; min-height: 2em;
min-width: 4em; min-width: 4em;
<if expr="pp_ifdef('chromeos')">
/* Without this rule, chromeos button text is too high on the button. */
padding-top: 3px;
</if>
<if expr="is_win"> <if expr="is_win">
/* The following platform-specific rule is necessary to get adjacent /* The following platform-specific rule is necessary to get adjacent
* buttons, text inputs, and so forth to align on their borders while also * buttons, text inputs, and so forth to align on their borders while also
...@@ -107,10 +103,6 @@ textarea { ...@@ -107,10 +103,6 @@ textarea {
/* For better alignment between adjacent buttons and inputs. */ /* For better alignment between adjacent buttons and inputs. */
padding-bottom: 4px; padding-bottom: 4px;
</if> </if>
<if expr="pp_ifdef('chromeos')">
/* For better alignment between adjacent buttons and inputs. */
padding-bottom: 2px;
</if>
} }
input[type='search'] { input[type='search'] {
...@@ -291,14 +283,11 @@ input:disabled:-webkit-any([type='password'], ...@@ -291,14 +283,11 @@ input:disabled:-webkit-any([type='password'],
* </div> * </div>
*/ */
.checkbox,
.radio {
margin: 0.65em 0;
}
:-webkit-any(.checkbox, .radio) label { :-webkit-any(.checkbox, .radio) label {
/* Don't expand horizontally: <http://crbug.com/112091>. */ /* Don't expand horizontally: <http://crbug.com/112091>. */
display: -webkit-inline-box; display: -webkit-inline-box;
padding-bottom: 7px;
padding-top: 7px;
} }
:-webkit-any(.checkbox, .radio) label input ~ span { :-webkit-any(.checkbox, .radio) label input ~ span {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment