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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/settings_shared_css.html
diff --git a/chrome/browser/resources/settings/settings_shared_css.html b/chrome/browser/resources/settings/settings_shared_css.html
index 545e4f0f1e5e1ca2f001df798d06b57e671ccba3..f4c526ebed218f8c74dce772a201e5eadaa824e9 100644
--- a/chrome/browser/resources/settings/settings_shared_css.html
+++ b/chrome/browser/resources/settings/settings_shared_css.html
@@ -8,19 +8,36 @@
button[is='paper-icon-button-light'] {
--paper-icon-button-light-ripple: {
/* Center the ripple on the icon button. */
- height: 36px;
+ height: var(--settings-icon-ripple-size);
left: -8px;
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.
- width: 36px;
+ width: var(--settings-icon-ripple-size);
};
- -webkit-margin-start: 16px;
+ /* 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.
+ */
+ margin-left: 16px;
background-size: cover;
flex-shrink: 0;
- height: 20px;
- width: 20px;
+ height: var(--settings-icon-size);
+ width: var(--settings-icon-size);
}
- [actionable] button[is="paper-icon-button-light"].icon-arrow-right {
+ :host-context([dir=rtl]) button[is='paper-icon-button-light'] {
+ --paper-icon-button-light-ripple: {
+ /* Center the ripple on the icon button. */
+ height: var(--settings-icon-ripple-size);
+ right: -8px;
+ top: -8px;
+ width: var(--settings-icon-ripple-size);
+ };
+ transform: scaleX(-1); /* Flip on the X axis (aka mirror). */
+ /* -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.
+ * the margin. */
+ margin-left: 0;
+ margin-right: 16px;
+ }
+
+ [actionable] button[is="paper-icon-button-light"].icon-arrow-forward {
background-image: url(images/arrow_right.svg);
}

Powered by Google App Engine
This is Rietveld 408576698