UX: Make button icons use lighter color instead of opacity
This commit is contained in:
parent
886ba9dff9
commit
94f16ba931
|
@ -78,11 +78,10 @@
|
||||||
<td class="col actions">
|
<td class="col actions">
|
||||||
{{#unless item.editing}}
|
{{#unless item.editing}}
|
||||||
{{d-button
|
{{d-button
|
||||||
class="btn-default"
|
class="btn-default btn-danger"
|
||||||
action=(action "destroy")
|
action=(action "destroy")
|
||||||
actionParam=item
|
actionParam=item
|
||||||
icon="far-trash-alt"
|
icon="far-trash-alt"}}
|
||||||
class="btn-danger"}}
|
|
||||||
{{d-button
|
{{d-button
|
||||||
class="btn-default"
|
class="btn-default"
|
||||||
action=(action "edit")
|
action=(action "edit")
|
||||||
|
|
|
@ -199,17 +199,17 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
||||||
|
|
||||||
@computed("displayingInline")
|
@computed("displayingInline")
|
||||||
inlineClass(displayingInline) {
|
inlineClass(displayingInline) {
|
||||||
return displayingInline ? "btn-primary" : "";
|
return displayingInline ? "btn-danger" : "btn-flat";
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed("displayingSideBySide")
|
@computed("displayingSideBySide")
|
||||||
sideBySideClass(displayingSideBySide) {
|
sideBySideClass(displayingSideBySide) {
|
||||||
return displayingSideBySide ? "btn-primary" : "";
|
return displayingSideBySide ? "btn-danger" : "btn-flat";
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed("displayingSideBySideMarkdown")
|
@computed("displayingSideBySideMarkdown")
|
||||||
sideBySideMarkdownClass(displayingSideBySideMarkdown) {
|
sideBySideMarkdownClass(displayingSideBySideMarkdown) {
|
||||||
return displayingSideBySideMarkdown ? "btn-primary" : "";
|
return displayingSideBySideMarkdown ? "btn-danger" : "btn-flat";
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed("model.category_id_changes")
|
@computed("model.category_id_changes")
|
||||||
|
|
|
@ -137,6 +137,10 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
line-height: $line-height-medium; // Temporary button-height fix
|
||||||
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: $font-up-4;
|
font-size: $font-up-4;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.d-icon {
|
.d-icon {
|
||||||
color: $primary-high;
|
color: $primary-medium;
|
||||||
}
|
}
|
||||||
.reply-details {
|
.reply-details {
|
||||||
max-width: calc(100% - 175px);
|
max-width: calc(100% - 175px);
|
||||||
|
|
|
@ -100,10 +100,6 @@
|
||||||
width: 2.2857em;
|
width: 2.2857em;
|
||||||
height: 2.2857em;
|
height: 2.2857em;
|
||||||
padding: 0.2143em;
|
padding: 0.2143em;
|
||||||
color: dark-light-choose(
|
|
||||||
scale-color($header_primary, $lightness: 50%),
|
|
||||||
$header_primary
|
|
||||||
);
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-top: 1px solid transparent;
|
border-top: 1px solid transparent;
|
||||||
|
@ -117,7 +113,6 @@
|
||||||
}
|
}
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: $primary;
|
|
||||||
background-color: $primary-low;
|
background-color: $primary-low;
|
||||||
border-top: 1px solid transparent;
|
border-top: 1px solid transparent;
|
||||||
border-left: 1px solid transparent;
|
border-left: 1px solid transparent;
|
||||||
|
@ -131,13 +126,14 @@
|
||||||
.drop-down-mode & {
|
.drop-down-mode & {
|
||||||
.active .icon {
|
.active .icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #7b7b7b;
|
|
||||||
background-color: $secondary;
|
background-color: $secondary;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
border-top: 1px solid $primary-low;
|
border-top: 1px solid $primary-low;
|
||||||
border-left: 1px solid $primary-low;
|
border-left: 1px solid $primary-low;
|
||||||
border-right: 1px solid $primary-low;
|
border-right: 1px solid $primary-low;
|
||||||
|
.d-icon {
|
||||||
|
color: $primary-medium;
|
||||||
|
}
|
||||||
&:after {
|
&:after {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -160,6 +156,7 @@
|
||||||
font-size: $font-up-4;
|
font-size: $font-up-4;
|
||||||
line-height: $line-height-large;
|
line-height: $line-height-large;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
color: $header_primary-low-mid;
|
||||||
}
|
}
|
||||||
.notifications {
|
.notifications {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -153,11 +153,12 @@
|
||||||
margin: 0.5em 0;
|
margin: 0.5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa {
|
.d-icon,
|
||||||
color: dark-light-choose($primary-medium, $secondary-medium);
|
&:hover .d-icon {
|
||||||
|
color: $primary-medium;
|
||||||
}
|
}
|
||||||
.icon {
|
.icon {
|
||||||
color: dark-light-choose($primary-high, $secondary-low);
|
color: $primary-high;
|
||||||
}
|
}
|
||||||
li {
|
li {
|
||||||
background-color: $tertiary-low;
|
background-color: $tertiary-low;
|
||||||
|
|
|
@ -318,6 +318,9 @@
|
||||||
.d-modal-cancel {
|
.d-modal-cancel {
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
color: $primary-medium;
|
color: $primary-medium;
|
||||||
|
&:hover {
|
||||||
|
color: $danger;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete-user-modal {
|
.delete-user-modal {
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
transition: all 0.25s;
|
transition: all 0.25s;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
|
.d-icon {
|
||||||
|
transition: color 0.25s;
|
||||||
|
}
|
||||||
&:active,
|
&:active,
|
||||||
&.btn-active {
|
&.btn-active {
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
|
@ -49,6 +51,9 @@
|
||||||
color: $primary;
|
color: $primary;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
background: $primary-low;
|
background: $primary-low;
|
||||||
|
.d-icon {
|
||||||
|
color: $primary-high;
|
||||||
|
}
|
||||||
|
|
||||||
&[href] {
|
&[href] {
|
||||||
color: $primary;
|
color: $primary;
|
||||||
|
@ -60,24 +65,29 @@
|
||||||
&.btn-hover {
|
&.btn-hover {
|
||||||
background: $primary-medium;
|
background: $primary-medium;
|
||||||
color: $secondary;
|
color: $secondary;
|
||||||
|
.d-icon {
|
||||||
|
color: $secondary-very-high;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&[disabled],
|
&[disabled],
|
||||||
&.disabled {
|
&.disabled {
|
||||||
background: $primary-low;
|
background: $primary-low;
|
||||||
|
.d-icon {
|
||||||
|
color: $primary-medium;
|
||||||
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
color: dark-light-choose($primary-low-mid, $secondary-high);
|
color: dark-light-choose($primary-low-mid, $secondary-high);
|
||||||
|
.d-icon {
|
||||||
|
color: $primary-low-mid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.d-icon {
|
.d-icon {
|
||||||
opacity: 0.7;
|
|
||||||
line-height: $line-height-medium; // Match button text line-height
|
line-height: $line-height-medium; // Match button text line-height
|
||||||
}
|
}
|
||||||
&.btn-primary .d-icon {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Primary button
|
// Primary button
|
||||||
|
@ -88,7 +98,9 @@
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: $secondary;
|
color: $secondary;
|
||||||
background: $tertiary;
|
background: $tertiary;
|
||||||
|
.d-icon {
|
||||||
|
color: currentColor;
|
||||||
|
}
|
||||||
&[href] {
|
&[href] {
|
||||||
color: $secondary;
|
color: $secondary;
|
||||||
}
|
}
|
||||||
|
@ -100,6 +112,9 @@
|
||||||
scale-color($tertiary, $lightness: -20%),
|
scale-color($tertiary, $lightness: -20%),
|
||||||
scale-color($tertiary, $lightness: 20%)
|
scale-color($tertiary, $lightness: 20%)
|
||||||
);
|
);
|
||||||
|
.d-icon {
|
||||||
|
color: currentColor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:active,
|
&:active,
|
||||||
|
@ -112,6 +127,9 @@
|
||||||
&[disabled],
|
&[disabled],
|
||||||
&.disabled {
|
&.disabled {
|
||||||
background: $tertiary;
|
background: $tertiary;
|
||||||
|
.d-icon {
|
||||||
|
color: currentColor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +140,9 @@
|
||||||
color: $secondary;
|
color: $secondary;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
background: $danger;
|
background: $danger;
|
||||||
|
.d-icon {
|
||||||
|
color: $danger-low;
|
||||||
|
}
|
||||||
&[href] {
|
&[href] {
|
||||||
color: $secondary;
|
color: $secondary;
|
||||||
}
|
}
|
||||||
|
@ -133,6 +154,9 @@
|
||||||
scale-color($danger, $lightness: -20%),
|
scale-color($danger, $lightness: -20%),
|
||||||
scale-color($danger, $lightness: 20%)
|
scale-color($danger, $lightness: 20%)
|
||||||
);
|
);
|
||||||
|
.d-icon {
|
||||||
|
color: $danger-low;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:active,
|
&:active,
|
||||||
|
@ -142,6 +166,9 @@
|
||||||
&[disabled],
|
&[disabled],
|
||||||
&.disabled {
|
&.disabled {
|
||||||
background: $danger;
|
background: $danger;
|
||||||
|
.d-icon {
|
||||||
|
color: $danger-low;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +241,13 @@
|
||||||
border: 0;
|
border: 0;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
line-height: $line-height-small;
|
line-height: $line-height-small;
|
||||||
|
transition: color .25s, background .25s;
|
||||||
.d-icon {
|
.d-icon {
|
||||||
opacity: 0.7;
|
color: $primary-low-mid;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
.d-icon {
|
||||||
|
color: $primary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,9 +82,11 @@
|
||||||
.btn,
|
.btn,
|
||||||
.btn-default {
|
.btn-default {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: $primary-high;
|
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
.d-icon {
|
||||||
|
color: $primary-medium;
|
||||||
|
}
|
||||||
@media all and (max-width: 800px) {
|
@media all and (max-width: 800px) {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,9 +203,12 @@ $primary-low: dark-light-diff($primary, $secondary, 90%, -78%);
|
||||||
$primary-low-mid: dark-light-diff($primary, $secondary, 70%, -45%);
|
$primary-low-mid: dark-light-diff($primary, $secondary, 70%, -45%);
|
||||||
$primary-medium: dark-light-diff($primary, $secondary, 50%, -35%);
|
$primary-medium: dark-light-diff($primary, $secondary, 50%, -35%);
|
||||||
$primary-high: dark-light-diff($primary, $secondary, 30%, -25%);
|
$primary-high: dark-light-diff($primary, $secondary, 30%, -25%);
|
||||||
|
$primary-very-high: dark-light-diff($primary, $secondary, 15%, -10%);
|
||||||
|
|
||||||
//header_primary
|
//header_primary
|
||||||
$header_primary-low: dark-light-diff($header_primary, $secondary, 90%, -78%);
|
$header_primary-low: dark-light-diff($header_primary, $secondary, 90%, -78%);
|
||||||
|
$header_primary-low-mid: dark-light-diff($primary, $secondary, 70%, -45%);
|
||||||
|
|
||||||
$header_primary-medium: dark-light-diff($header_primary, $secondary, 50%, -35%);
|
$header_primary-medium: dark-light-diff($header_primary, $secondary, 50%, -35%);
|
||||||
$header_primary-high: dark-light-diff(
|
$header_primary-high: dark-light-diff(
|
||||||
$header_primary,
|
$header_primary,
|
||||||
|
@ -213,11 +216,18 @@ $header_primary-high: dark-light-diff(
|
||||||
30%,
|
30%,
|
||||||
-25%
|
-25%
|
||||||
);
|
);
|
||||||
|
$header_primary-very-high: dark-light-diff(
|
||||||
|
$header_primary,
|
||||||
|
$header_background,
|
||||||
|
15%,
|
||||||
|
-10%
|
||||||
|
);
|
||||||
|
|
||||||
//secondary
|
//secondary
|
||||||
$secondary-low: dark-light-diff($secondary, $primary, 70%, -70%);
|
$secondary-low: dark-light-diff($secondary, $primary, 70%, -70%);
|
||||||
$secondary-medium: dark-light-diff($secondary, $primary, 50%, -50%);
|
$secondary-medium: dark-light-diff($secondary, $primary, 50%, -50%);
|
||||||
$secondary-high: dark-light-diff($secondary, $primary, 30%, -35%);
|
$secondary-high: dark-light-diff($secondary, $primary, 30%, -35%);
|
||||||
|
$secondary-very-high: dark-light-diff($secondary, $primary, 7%, -7%);
|
||||||
|
|
||||||
//tertiary
|
//tertiary
|
||||||
$tertiary-low: dark-light-diff($tertiary, $secondary, 85%, -65%);
|
$tertiary-low: dark-light-diff($tertiary, $secondary, 85%, -65%);
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.d-icon {
|
.d-icon {
|
||||||
opacity: 0.7;
|
color: $primary-high;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-kit-header {
|
.select-kit-header {
|
||||||
|
|
|
@ -20,15 +20,6 @@
|
||||||
text-align: right;
|
text-align: right;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
.btn {
|
|
||||||
background-color: inherit;
|
|
||||||
color: blend-primary-secondary(50%);
|
|
||||||
}
|
|
||||||
.btn-primary {
|
|
||||||
color: $primary;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#revisions {
|
#revisions {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
.actions .fade-out {
|
.actions .fade-out {
|
||||||
.discourse-no-touch & {
|
.discourse-no-touch & {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
transition: opacity 0.7s ease-in-out;
|
transition: background 0.25s, opacity 0.7s ease-in-out;
|
||||||
}
|
}
|
||||||
.discourse-touch & {
|
.discourse-touch & {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -65,6 +65,9 @@ nav.post-controls {
|
||||||
.d-hover {
|
.d-hover {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
.d-icon {
|
||||||
|
color: $love;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&:active {
|
&:active {
|
||||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
|
||||||
|
@ -146,6 +149,9 @@ nav.post-controls {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
color: dark-light-choose($primary-high, $secondary-low);
|
color: dark-light-choose($primary-high, $secondary-low);
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
.d-icon {
|
||||||
|
color: dark-light-choose($primary-high, $secondary-low);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.create .d-icon {
|
.create .d-icon {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
@ -172,16 +178,23 @@ nav.post-controls {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
&.delete.d-hover,
|
&.delete.d-hover,
|
||||||
|
&.delete:hover,
|
||||||
&.delete:focus {
|
&.delete:focus {
|
||||||
background: $danger;
|
background: $danger;
|
||||||
color: $secondary;
|
color: $secondary;
|
||||||
|
.d-icon {
|
||||||
|
color: $secondary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.like.d-hover,
|
&.like.d-hover,
|
||||||
&.like:focus {
|
&.like:focus {
|
||||||
color: $love;
|
color: $love;
|
||||||
background: $love-low;
|
background: $love-low;
|
||||||
|
.d-icon {
|
||||||
|
color: $love;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.has-like {
|
&.has-like .d-icon {
|
||||||
color: $love;
|
color: $love;
|
||||||
}
|
}
|
||||||
&.has-like[disabled]:hover {
|
&.has-like[disabled]:hover {
|
||||||
|
@ -192,7 +205,7 @@ nav.post-controls {
|
||||||
}
|
}
|
||||||
&.bookmark {
|
&.bookmark {
|
||||||
padding: 8px 11px;
|
padding: 8px 11px;
|
||||||
&.bookmarked {
|
&.bookmarked .d-icon {
|
||||||
color: $tertiary;
|
color: $tertiary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -364,7 +377,8 @@ nav.post-controls {
|
||||||
font-size: $font-up-2;
|
font-size: $font-up-2;
|
||||||
line-height: $line-height-medium;
|
line-height: $line-height-medium;
|
||||||
}
|
}
|
||||||
button .d-icon {
|
button .d-icon,
|
||||||
|
button:hover .d-icon {
|
||||||
color: $primary-high;
|
color: $primary-high;
|
||||||
}
|
}
|
||||||
.avatar a {
|
.avatar a {
|
||||||
|
|
Loading…
Reference in New Issue