Chromium Code Reviews| Index: chrome/browser/resources/settings/appearance_page/appearance_page.html |
| diff --git a/chrome/browser/resources/settings/appearance_page/appearance_page.html b/chrome/browser/resources/settings/appearance_page/appearance_page.html |
| index fcc30552e0f7c06a18b6a4641c156b9c1bab9162..b50842c80bb4db9d5d382773ea83e1ba741adff0 100644 |
| --- a/chrome/browser/resources/settings/appearance_page/appearance_page.html |
| +++ b/chrome/browser/resources/settings/appearance_page/appearance_page.html |
| @@ -22,6 +22,12 @@ |
| <dom-module id="settings-appearance-page"> |
| <template> |
| <style include="settings-shared md-select iron-flex"> |
| + /* Conditional logic makes identifying the first settings-box complicated |
| + so use first-of-type here. */ |
| + settings-box:first-of-type { |
|
dpapad
2017/05/03 23:02:24
I don't think this works at all. :first-of-type ca
stevenjb
2017/05/03 23:31:43
Ugh, you're right. It's super subtle when at the t
stevenjb
2017/05/03 23:33:16
Oh, ugh, I need to check [hidden] also... one mome
stevenjb
2017/05/03 23:36:51
aaaaand this only works with dom-if, right. Which
|
| + border-top: none; |
| + } |
| + |
| .secondary-button ~ .secondary-button { |
| -webkit-margin-start: 12px; |
| } |
| @@ -41,9 +47,9 @@ |
| focus-config="[[focusConfig_]]"> |
| <neon-animatable route-path="default"> |
| <if expr="chromeos"> |
| - <div class="settings-box first two-line" id="wallpaperButton" |
| + <div class="settings-box two-line" id="setWallpaper" |
| on-tap="openWallpaperManager_" actionable |
| - hidden="[[!pageVisibility.setWallpaper]]"> |
| + hidden="[[!showPage_(pageVisibility.setWallpaper)]]"> |
|
dpapad
2017/05/03 23:02:24
Isn't this equivalent to what is already on the le
stevenjb
2017/05/03 23:31:43
The change makes this more robust and, imho, more
|
| <div class="start"> |
| $i18n{setWallpaper} |
| <div class="secondary" id="wallpaperSecondary"> |
| @@ -54,13 +60,9 @@ |
| aria-label="$i18n{setWallpaper}" |
| aria-describedby="wallpaperSecondary"></button> |
| </div> |
| - <div class="settings-box two-line" |
| - hidden="[[!pageVisibility.setTheme]]"> |
| -</if> |
| -<if expr="not chromeos"> |
| - <div class="settings-box two-line first" |
| - hidden="[[!pageVisibility.setTheme]]"> |
| </if> |
| + <div id="setTheme" class="settings-box two-line" |
| + hidden="[[!showPage_(pageVisibility.setTheme)]]"> |
| <a class="start two-line inherit-color no-outline" tabindex="-1" |
| target="_blank" href$="[[getThemeHref_(themeUrl_)]]"> |
| <div class="flex"> |
| @@ -104,8 +106,8 @@ |
| </div> |
| </if> |
| </div> |
| - <div class="settings-box" |
| - hidden="[[!pageVisibility.homeButton]]"> |
| + <div id="homeButton" class="settings-box" |
| + hidden="[[!showPage_(pageVisibility.homeButton)]]"> |
| <settings-toggle-button class="start" elide-label |
| pref="{{prefs.browser.show_home_button}}" |
| label="$i18n{showHomeButton}" |
| @@ -116,7 +118,8 @@ |
| </settings-toggle-button> |
| </div> |
| <template is="dom-if" if="[[prefs.browser.show_home_button.value]]"> |
| - <div class="list-frame" hidden="[[!pageVisibility.homeButton]]"> |
| + <div class="list-frame" |
| + hidden="[[!showPage_(pageVisibility.homeButton)]]"> |
| <settings-radio-group pref="{{prefs.homepage_is_newtabpage}}"> |
| <controlled-radio-button class="list-item" name="true" |
| pref="[[prefs.homepage_is_newtabpage]]" |
| @@ -144,23 +147,23 @@ |
| </settings-radio-group> |
| </div> |
| </template> |
| - <div class="settings-box" |
| - hidden="[[!pageVisibility.bookmarksBar]]"> |
| + <div id="bookmarksBar" class="settings-box" |
| + hidden="[[!showPage_(pageVisibility.bookmarksBar)]]"> |
| <settings-toggle-button class="start" |
| pref="{{prefs.bookmark_bar.show_on_all_tabs}}" |
| label="$i18n{showBookmarksBar}"> |
| </settings-toggle-button> |
| </div> |
| - <div class$="settings-box [[getFirst_(pageVisibility.bookmarksBar)]]"> |
|
dpapad
2017/05/03 23:02:24
Isn't this addressing the problem of determining w
stevenjb
2017/05/03 23:31:43
The new CSS does the right thing now, always, rega
|
| <if expr="is_linux and not chromeos"> |
| + <div class$="settings-box"> |
| <settings-toggle-button class="start" |
| pref="{{prefs.browser.custom_chrome_frame}}" |
| label="$i18n{showWindowDecorations}" |
| inverted> |
| </settings-toggle-button> |
| </div> |
| - <div class="settings-box"> |
| </if> |
| + <div class="settings-box"> |
| <div class="start">$i18n{fontSize}</div> |
| <settings-dropdown-menu id="defaultFontSize" label="$i18n{fontSize}" |
| pref="{{prefs.webkit.webprefs.default_font_size}}" |
| @@ -175,7 +178,8 @@ |
| <button class="subpage-arrow" is="paper-icon-button-light" |
| aria-label="$i18n{customizeFonts}"></button> |
| </div> |
| - <div class="settings-box" hidden="[[!pageVisibility.pageZoom]]"> |
| + <div class="settings-box" |
| + hidden="[[!showPage_(pageVisibility.pageZoom)]]"> |
| <div id="pageZoom" class="start">$i18n{pageZoom}</div> |
| <div class="md-select-wrapper"> |
| <select id="zoomLevel" class="md-select" aria-labelledby="pageZoom" |