Commit 2c8d005d authored by dschuyler's avatar dschuyler Committed by Commit bot

[MD settings] removing secondary-button class

This CL removes the global .secondary-button class. At one point we had
several types of buttons, but we eventually narrowed down to two buttons:
.primary-button and .secondary-button; though some buttons were not
specified as either. That meant we effectively had three button classes.

Rather than add .secondary-button to each paper-button that isn't
explicitly secondary already, I've removed that class. Now there are
.primary-buttons and normal buttons; i.e. any non-primary-button is a
secondary button (aka normal) button.

Note: The references to .secondary-button are still in place (based on
Steven's review comment below) and there are a couple places where a
.secondary-button is used locally within a dom-module; those have been
left unchanged.

BUG=721268
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2889493002
Cr-Commit-Position: refs/heads/master@{#472301}
parent e876159e
...@@ -35,7 +35,20 @@ ...@@ -35,7 +35,20 @@
--iron-icon-fill-color: var(--google-green-500); --iron-icon-fill-color: var(--google-green-500);
} }
/* See notes in .primary-button.
* TODO(dschuyler): Remove unnecessary .secondary-button references. */
paper-button { paper-button {
--paper-button: {
-webkit-padding-end: var(--settings-button-edge-spacing);
-webkit-padding-start: var(--settings-button-edge-spacing);
color: var(--paper-grey-600);
font-weight: 500;
min-width: 1em; /* A tighter fit than 5.14em for short buttons. */
text-decoration: none;
};
--paper-button-flat-keyboard-focus: {
background: rgba(0, 0, 0, .12);
};
flex-shrink: 0; flex-shrink: 0;
height: 36px; height: 36px;
margin: 0; margin: 0;
...@@ -45,6 +58,27 @@ ...@@ -45,6 +58,27 @@
background-color: var(--paper-grey-300); background-color: var(--paper-grey-300);
} }
.settings-box paper-button {
-webkit-margin-end: calc(var(--settings-button-edge-spacing) * -1);
-webkit-margin-start: calc(var(--settings-button-edge-spacing) * -1);
}
/* There are two settings button styles, .primary-button and normal
* buttons. The primary is the action button (e.g. "edit", "delete")
* while the normal (secondary-button) is often a "Cancel" button. */
.primary-button {
--paper-button: {
-webkit-padding-end: var(--settings-button-edge-spacing);
-webkit-padding-start: var(--settings-button-edge-spacing);
font-weight: 500;
text-align: start;
};
--paper-button-flat-keyboard-focus: {
background: rgba(51, 103, 214, .12); /* --google-blue-700 */
};
color: var(--google-blue-500);
}
paper-toggle-button { paper-toggle-button {
@apply(--settings-actionable); @apply(--settings-actionable);
height: var(--settings-row-min-height); height: var(--settings-row-min-height);
...@@ -55,20 +89,10 @@ ...@@ -55,20 +89,10 @@
-webkit-margin-start: 4px; -webkit-margin-start: 4px;
} }
.primary-button {
color: var(--google-blue-500);
}
a[href] { a[href] {
color: var(--google-blue-700); color: var(--google-blue-700);
} }
.primary-button {
--paper-button-flat-keyboard-focus: {
background: rgba(51, 103, 214, .12); /* --google-blue-700 */
};
}
a[href] { a[href] {
text-decoration: none; text-decoration: none;
} }
...@@ -78,20 +102,6 @@ ...@@ -78,20 +102,6 @@
color: inherit !important; color: inherit !important;
} }
/* There are three main button styles, .primary-button, .secondary-button,
* and .tertiary-button. The primary is the action button (e.g. "edit",
* "delete") while the secondary is often a "Cancel" button. A tertiary
* button may be used to get more information or similar, that we expect
* most users will not need. */
.primary-button {
--paper-button: {
-webkit-padding-end: var(--settings-button-edge-spacing);
-webkit-padding-start: var(--settings-button-edge-spacing);
font-weight: 500;
text-align: start;
};
}
.primary-toggle { .primary-toggle {
color: var(--paper-grey-600); color: var(--paper-grey-600);
font-weight: 500; font-weight: 500;
...@@ -101,27 +111,6 @@ ...@@ -101,27 +111,6 @@
color: var(--google-blue-500); color: var(--google-blue-500);
} }
/* See notes in .primary-button. */
.secondary-button {
--paper-button: {
-webkit-padding-end: var(--settings-button-edge-spacing);
-webkit-padding-start: var(--settings-button-edge-spacing);
color: var(--paper-grey-600);
font-weight: 500;
min-width: 1em; /* A tighter fit than 5.14em for short buttons. */
text-decoration: none;
};
--paper-button-flat-keyboard-focus: {
background: rgba(0, 0, 0, .12);
};
}
.settings-box .primary-button,
.settings-box .secondary-button {
-webkit-margin-end: calc(var(--settings-button-edge-spacing) * -1);
-webkit-margin-start: calc(var(--settings-button-edge-spacing) * -1);
}
paper-checkbox { paper-checkbox {
--paper-checkbox-checked-color: var(--google-blue-500); --paper-checkbox-checked-color: var(--google-blue-500);
--paper-checkbox-label-spacing: var(--settings-control-label-spacing); --paper-checkbox-label-spacing: var(--settings-control-label-spacing);
......
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