OLD | NEW |
---|---|
1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
2 <link rel="import" href="chrome://resources/polymer/v1_0/app-layout/app-drawer/a pp-drawer.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/app-layout/app-drawer/a pp-drawer.html"> |
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout.html"> | |
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele ctor.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele ctor.html"> |
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h tml"> | |
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html "> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html "> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/typography .html"> | |
6 <link rel="import" href="chrome://history/browser_service.html"> | 7 <link rel="import" href="chrome://history/browser_service.html"> |
7 <link rel="import" href="chrome://history/shared_style.html"> | 8 <link rel="import" href="chrome://history/shared_style.html"> |
8 | 9 |
9 <dom-module id="history-side-bar"> | 10 <dom-module id="history-side-bar"> |
10 <template> | 11 <template> |
11 <style include="shared-style"> | 12 <style include="shared-style"> |
12 :host { | 13 :host { |
13 display: block; | 14 display: block; |
14 padding-top: 5px; | 15 padding-top: 5px; |
15 width: var(--side-bar-width); | 16 width: var(--side-bar-width); |
(...skipping 17 matching lines...) Expand all Loading... | |
33 div.separator { | 34 div.separator { |
34 background-color: rgba(0, 0, 0, 0.08); | 35 background-color: rgba(0, 0, 0, 0.08); |
35 height: 1px; | 36 height: 1px; |
36 margin: 8px 0; | 37 margin: 8px 0; |
37 } | 38 } |
38 | 39 |
39 #clear-browsing-data { | 40 #clear-browsing-data { |
40 text-transform: uppercase; | 41 text-transform: uppercase; |
41 } | 42 } |
42 | 43 |
43 paper-item { | 44 iron-selector { |
45 -webkit-user-select: none; | |
46 background-color: transparent; | |
47 color: #5a5a5a; | |
48 } | |
49 | |
50 iron-selector a { | |
51 @apply(--paper-font-subhead); | |
44 -webkit-padding-start: 25px; | 52 -webkit-padding-start: 25px; |
53 align-items: center; | |
54 box-sizing: border-box; | |
55 color: inherit; | |
45 cursor: pointer; | 56 cursor: pointer; |
57 display: flex; | |
46 font-size: 14px; | 58 font-size: 14px; |
47 font-weight: 500; | 59 font-weight: 500; |
60 min-height: 48px; | |
61 outline: none; | |
62 position: relative; | |
63 text-decoration: none; | |
48 } | 64 } |
49 | 65 |
50 paper-item.iron-selected { | 66 iron-selector a:focus { |
67 outline: 0; | |
68 position: relative; | |
69 } | |
70 | |
71 iron-selector a:focus::before { | |
72 @apply(--layout-fit); | |
73 | |
74 background: currentColor; | |
75 content: ''; | |
76 opacity: var(--dark-divider-opacity); | |
77 pointer-events: none; | |
78 } | |
79 | |
80 iron-selector a.iron-selected { | |
51 color: var(--google-blue-500); | 81 color: var(--google-blue-500); |
52 font-weight: 500; | 82 font-weight: 500; |
53 } | 83 } |
54 | 84 |
55 iron-selector { | 85 iron-selector { |
56 -webkit-user-select: none; | 86 -webkit-user-select: none; |
57 color: #5a5a5a; | 87 color: #5a5a5a; |
58 } | 88 } |
59 </style> | 89 </style> |
60 | 90 |
61 <app-drawer id="drawer" tabindex="0" on-focus="onDrawerFocus_" swipe-open | 91 <app-drawer id="drawer" tabindex="0" on-focus="onDrawerFocus_" swipe-open |
62 align="start"> | 92 align="start"> |
63 <div id="drawer-header"> | 93 <div id="drawer-header"> |
64 <h1>$i18n{title}</h1> | 94 <h1>$i18n{title}</h1> |
65 </div> | 95 </div> |
66 <iron-selector id="menu" selected="{{selectedPage}}" | 96 <iron-selector id="menu" selected="{{selectedPage}}" |
67 selectable=".page-item" attr-for-selected="view-id" | 97 selectable=".page-item" attr-for-selected="path" |
98 fallback-selection="history" | |
68 on-iron-activate="onSelectorActivate_"> | 99 on-iron-activate="onSelectorActivate_"> |
69 <paper-item view-id="history" class="page-item"> | 100 <a href="/" class="page-item" path="history"> |
Dan Beam
2016/07/15 04:23:40
why is it worthwhile to switch to <a href> here?
calamity
2016/07/15 06:22:02
I'm not 100% sure if this is true, but it seems th
| |
70 $i18n{historyMenuItem} | 101 $i18n{historyMenuItem} |
71 </paper-item> | 102 </a> |
72 <paper-item view-id="synced-devices" class="page-item"> | 103 <a href="/syncedTabs" class="page-item" path="syncedTabs"> |
73 $i18n{openTabsMenuItem} | 104 $i18n{openTabsMenuItem} |
74 </paper-item> | 105 </a> |
75 <div class="separator"></div> | 106 <div class="separator"></div> |
76 <paper-item on-tap="onClearBrowsingDataTap_" id="clear-browsing-data"> | 107 <a on-tap="onClearBrowsingDataTap_" id="clear-browsing-data"> |
tsergeant
2016/07/15 03:56:14
An <a> without an href="" is kind of like a plain
calamity
2016/07/15 06:22:02
Ace Investigation. Done.
| |
77 $i18n{clearBrowsingData} | 108 $i18n{clearBrowsingData} |
78 </paper-item> | 109 </a> |
79 </iron-selector> | 110 </iron-selector> |
80 </app-drawer> | 111 </app-drawer> |
81 </template> | 112 </template> |
82 <script src="chrome://history/side_bar.js"></script> | 113 <script src="chrome://history/side_bar.js"></script> |
83 </dom-module> | 114 </dom-module> |
OLD | NEW |