Add default color and styles for colored trackers links, fixes #5
- introduce $tracker-default-bg and $tracker-default-text variables - move default colors to map - introduce $tracker-custom-colors-map to make adding new colors and overriding default ones easy - remove styles for issue links from mixin to avoid repetition - update styles for backlogs plugin
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -181,26 +181,41 @@ $priority-highest-link: #a03 !default;
|
|||||||
$tracker-inline-padding: 1px 5px !default;
|
$tracker-inline-padding: 1px 5px !default;
|
||||||
$tracker-list-padding: 0 6px !default;
|
$tracker-list-padding: 0 6px !default;
|
||||||
|
|
||||||
$tracker-1-bg: $brand-danger !default;
|
$tracker-default-bg: #668 !default;
|
||||||
$tracker-1-text: $brand-text !default;
|
$tracker-default-text: $brand-text !default;
|
||||||
|
|
||||||
$tracker-2-bg: $brand-info !default;
|
$tracker-default-colors-map: (
|
||||||
$tracker-2-text: $brand-text !default;
|
1: (
|
||||||
|
background: $brand-danger,
|
||||||
$tracker-3-bg: $brand-success !default;
|
color: $brand-text
|
||||||
$tracker-3-text: $brand-text !default;
|
),
|
||||||
|
2: (
|
||||||
$tracker-4-bg: $brand-primary !default;
|
background: $brand-info,
|
||||||
$tracker-4-text: $brand-text !default;
|
color: $brand-text
|
||||||
|
),
|
||||||
$tracker-5-bg: $brand-warning !default;
|
3: (
|
||||||
$tracker-5-text: $brand-text !default;
|
background: $brand-success,
|
||||||
|
color: $brand-text
|
||||||
$tracker-6-bg: mix($brand-success, $brand-info, 50%) !default;
|
),
|
||||||
$tracker-6-text: $brand-text !default;
|
4: (
|
||||||
|
background: $brand-primary,
|
||||||
$tracker-7-bg: mix($brand-primary, $brand-warning, 50%) !default;
|
color: $brand-text
|
||||||
$tracker-7-text: $brand-text !default;
|
),
|
||||||
|
5: (
|
||||||
|
background: $brand-warning,
|
||||||
|
color: $brand-text
|
||||||
|
),
|
||||||
|
6: (
|
||||||
|
background: mix($brand-success, $brand-info, 50%),
|
||||||
|
color: $brand-text
|
||||||
|
),
|
||||||
|
7: (
|
||||||
|
background: mix($brand-primary, $brand-warning, 50%),
|
||||||
|
color: $brand-text
|
||||||
|
)
|
||||||
|
) !default;
|
||||||
|
$tracker-custom-colors-map: () !default;
|
||||||
|
$tracker-colors-map: map-merge($tracker-default-colors-map, $tracker-custom-colors-map);
|
||||||
|
|
||||||
|
|
||||||
//== Diffs
|
//== Diffs
|
||||||
|
|||||||
@@ -280,13 +280,82 @@ tr.entry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@if $color-trackers {
|
@if $color-trackers {
|
||||||
@include tracker(".tracker-1", $tracker-1-bg, $tracker-1-text);
|
tr.issue .id > a,
|
||||||
@include tracker(".tracker-2", $tracker-2-bg, $tracker-2-text);
|
a.issue,
|
||||||
@include tracker(".tracker-3", $tracker-3-bg, $tracker-3-text);
|
.relations > span > a.issue,
|
||||||
@include tracker(".tracker-4", $tracker-4-bg, $tracker-4-text);
|
.parent > a.issue {
|
||||||
@include tracker(".tracker-5", $tracker-5-bg, $tracker-5-text);
|
border-radius: $border-radius-small ($border-radius-small * 3) ($border-radius-small * 3) $border-radius-small;
|
||||||
@include tracker(".tracker-6", $tracker-6-bg, $tracker-6-text);
|
background-color: $tracker-default-bg;
|
||||||
@include tracker(".tracker-7", $tracker-7-bg, $tracker-7-text);
|
color: $tracker-default-text;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: darken($tracker-default-bg, 10%);
|
||||||
|
color: $tracker-default-text;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&:active {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a.issue {
|
||||||
|
margin-right: 1px;
|
||||||
|
padding: $tracker-inline-padding;
|
||||||
|
font-weight: normal;
|
||||||
|
|
||||||
|
&.closed {
|
||||||
|
position: relative;
|
||||||
|
color: mix($tracker-default-text, $tracker-default-bg, 75%);
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
right: 5px;
|
||||||
|
bottom: 0;
|
||||||
|
left: 5px;
|
||||||
|
height: calc(50% - 2px/2);
|
||||||
|
border-top: 2px solid rgba($tracker-default-text, .95);
|
||||||
|
content: "";
|
||||||
|
@include rotate(-4deg);
|
||||||
|
@include transition(border-color .1s);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover:after {
|
||||||
|
border-top-color: rgba($tracker-default-text, .25);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.issue .id > a {
|
||||||
|
display: block;
|
||||||
|
padding: $tracker-list-padding;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
color: mix($tracker-default-text, $tracker-default-bg, 50%);
|
||||||
|
content: "#";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@if $colored-issue {
|
||||||
|
.issue.details a.issue,
|
||||||
|
.issue.details .wiki a.issue {
|
||||||
|
&,
|
||||||
|
&:hover {
|
||||||
|
color: $tracker-default-text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@each $tracker-id, $tracker-colors in $tracker-colors-map {
|
||||||
|
@include tracker(
|
||||||
|
".tracker-#{$tracker-id}",
|
||||||
|
map-get($tracker-colors, background),
|
||||||
|
map-get($tracker-colors, color)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.odd {
|
.odd {
|
||||||
|
|||||||
@@ -111,7 +111,6 @@
|
|||||||
a#{$parent},
|
a#{$parent},
|
||||||
.relations > span > a#{$parent},
|
.relations > span > a#{$parent},
|
||||||
.parent > a#{$parent} {
|
.parent > a#{$parent} {
|
||||||
border-radius: $border-radius-small ($border-radius-small * 3) ($border-radius-small * 3) $border-radius-small;
|
|
||||||
background-color: $background;
|
background-color: $background;
|
||||||
color: $color;
|
color: $color;
|
||||||
|
|
||||||
@@ -122,36 +121,15 @@
|
|||||||
background-color: darken($background, 10%);
|
background-color: darken($background, 10%);
|
||||||
}
|
}
|
||||||
color: $color;
|
color: $color;
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus,
|
|
||||||
&:active {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a#{$parent} {
|
a#{$parent} {
|
||||||
margin-right: 1px;
|
|
||||||
padding: $tracker-inline-padding;
|
|
||||||
font-weight: normal;
|
|
||||||
|
|
||||||
&.closed {
|
&.closed {
|
||||||
position: relative;
|
|
||||||
color: mix($color, $background, 75%);
|
color: mix($color, $background, 75%);
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
display: block;
|
border-top-color: rgba($color, .95);
|
||||||
position: absolute;
|
|
||||||
right: 5px;
|
|
||||||
bottom: 0;
|
|
||||||
left: 5px;
|
|
||||||
height: calc(50% - 2px/2);
|
|
||||||
border-top: 2px solid rgba($color, .95);
|
|
||||||
content: "";
|
|
||||||
@include rotate(-4deg);
|
|
||||||
@include transition(border-color .1s);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover:after {
|
&:hover:after {
|
||||||
@@ -161,12 +139,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
tr#{$parent} .id > a {
|
tr#{$parent} .id > a {
|
||||||
display: block;
|
|
||||||
padding: $tracker-list-padding;
|
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
color: mix($color, $background, 50%);
|
color: mix($color, $background, 50%);
|
||||||
content: "#";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ $story-sp-input-width: 50px;
|
|||||||
} @else {
|
} @else {
|
||||||
background-color: darken($background, 10%);
|
background-color: darken($background, 10%);
|
||||||
}
|
}
|
||||||
text-decoration: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -491,20 +490,33 @@ $story-sp-input-width: 50px;
|
|||||||
display: block;
|
display: block;
|
||||||
padding: $tracker-list-padding;
|
padding: $tracker-list-padding;
|
||||||
border-radius: $border-radius-small ($border-radius-small * 3) ($border-radius-small * 3) $border-radius-small;
|
border-radius: $border-radius-small ($border-radius-small * 3) ($border-radius-small * 3) $border-radius-small;
|
||||||
|
@if $color-trackers {
|
||||||
|
background-color: $tracker-default-bg;
|
||||||
|
color: $tracker-default-text;
|
||||||
|
} @else {
|
||||||
background-color: darken($gray-lightest, 3%);
|
background-color: darken($gray-lightest, 3%);
|
||||||
color: $gray-dark;
|
color: $gray-dark;
|
||||||
|
}
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
margin-left: -1em;
|
margin-left: -1em;
|
||||||
|
@if $color-trackers {
|
||||||
|
color: mix($tracker-default-text, $tracker-default-bg, 50%);
|
||||||
|
} @else {
|
||||||
color: $gray-light;
|
color: $gray-light;
|
||||||
|
}
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
content: "#";
|
content: "#";
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
@if $color-trackers {
|
||||||
|
background-color: darken($tracker-default-bg, 10%);
|
||||||
|
} @else {
|
||||||
background-color: $gray-lighter;
|
background-color: $gray-lighter;
|
||||||
|
}
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -684,13 +696,13 @@ $story-sp-input-width: 50px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@if $color-trackers {
|
@if $color-trackers {
|
||||||
@include rb-tracker('.tracker1', $tracker-1-bg, $tracker-1-text);
|
@each $tracker-id, $tracker-colors in $tracker-colors-map {
|
||||||
@include rb-tracker('.tracker2', $tracker-2-bg, $tracker-2-text);
|
@include rb-tracker(
|
||||||
@include rb-tracker('.tracker3', $tracker-3-bg, $tracker-3-text);
|
".tracker#{$tracker-id}",
|
||||||
@include rb-tracker('.tracker4', $tracker-4-bg, $tracker-4-text);
|
map-get($tracker-colors, background),
|
||||||
@include rb-tracker('.tracker5', $tracker-5-bg, $tracker-5-text);
|
map-get($tracker-colors, color)
|
||||||
@include rb-tracker('.tracker6', $tracker-6-bg, $tracker-6-text);
|
);
|
||||||
@include rb-tracker('.tracker7', $tracker-7-bg, $tracker-7-text);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user