Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1121)

Side by Side Diff: chrome/browser/resources/settings/settings_shared_css.html

Issue 2390053002: [MD settings] use arrow-forward to switch direction in rtl (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> 1 <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
2 <link rel="import" href="/settings_vars_css.html"> 2 <link rel="import" href="/settings_vars_css.html">
3 3
4 <!-- Common styles for Material Design settings. --> 4 <!-- Common styles for Material Design settings. -->
5 <dom-module id="settings-shared"> 5 <dom-module id="settings-shared">
6 <template> 6 <template>
7 <style include="cr-shared-style"> 7 <style include="cr-shared-style">
8 button[is='paper-icon-button-light'] { 8 button[is='paper-icon-button-light'] {
9 --paper-icon-button-light-ripple: { 9 --paper-icon-button-light-ripple: {
10 /* Center the ripple on the icon button. */ 10 /* Center the ripple on the icon button. */
11 height: 36px; 11 height: var(--settings-icon-ripple-size);
12 left: -8px; 12 left: -8px;
13 top: -8px; 13 top: -8px;
Dan Beam 2016/10/03 23:42:06 why can't we just write the code in a direction-ag
dschuyler 2016/10/04 00:56:27 Acknowledged.
14 width: 36px; 14 width: var(--settings-icon-ripple-size);
15 }; 15 };
16 -webkit-margin-start: 16px; 16 /* Not using -webkit-margin-start because we mirror the control in rtl.
Dan Beam 2016/10/03 23:42:06 why not? it'd be one less rule you have to duplic
dschuyler 2016/10/04 00:56:27 Acknowledged.
17 */
18 margin-left: 16px;
17 background-size: cover; 19 background-size: cover;
18 flex-shrink: 0; 20 flex-shrink: 0;
19 height: 20px; 21 height: var(--settings-icon-size);
20 width: 20px; 22 width: var(--settings-icon-size);
21 } 23 }
22 24
23 [actionable] button[is="paper-icon-button-light"].icon-arrow-right { 25 :host-context([dir=rtl]) button[is='paper-icon-button-light'] {
26 --paper-icon-button-light-ripple: {
27 /* Center the ripple on the icon button. */
28 height: var(--settings-icon-ripple-size);
29 right: -8px;
30 top: -8px;
31 width: var(--settings-icon-ripple-size);
32 };
33 transform: scaleX(-1); /* Flip on the X axis (aka mirror). */
34 /* -webkit-margin-start can be upset by the transform; manually control
Dan Beam 2016/10/03 23:42:06 wait, what? is this a transform-origin issue?
dschuyler 2016/10/04 00:56:27 Acknowledged.
35 * the margin. */
36 margin-left: 0;
37 margin-right: 16px;
38 }
39
40 [actionable] button[is="paper-icon-button-light"].icon-arrow-forward {
24 background-image: url(images/arrow_right.svg); 41 background-image: url(images/arrow_right.svg);
25 } 42 }
26 43
27 [actionable] button[is="paper-icon-button-light"].icon-external { 44 [actionable] button[is="paper-icon-button-light"].icon-external {
28 background-image: url(images/open_in_new.svg); 45 background-image: url(images/open_in_new.svg);
29 } 46 }
30 47
31 /* Use <h2> as the "sub-header" mentioned in the UX design docs. */ 48 /* Use <h2> as the "sub-header" mentioned in the UX design docs. */
32 h2 { 49 h2 {
33 align-items: center; 50 align-items: center;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 /* Turns the arrow direction downwards, when the bubble is placed above 441 /* Turns the arrow direction downwards, when the bubble is placed above
425 * the anchor element */ 442 * the anchor element */
426 .search-bubble-innards.above::after { 443 .search-bubble-innards.above::after {
427 -webkit-transform: rotate(-135deg); 444 -webkit-transform: rotate(-135deg);
428 bottom: -5px; 445 bottom: -5px;
429 top: auto; 446 top: auto;
430 } 447 }
431 </style> 448 </style>
432 </template> 449 </template>
433 </dom-module> 450 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698