1
0
Fork 0
forked from forgejo/forgejo

CSS color variables, less bold font weight and more (#13567)

* CSS color variables, less bold font weight

- Define color variables for fully saturated colors and apply them where
  it made sense
- Add background color helper classes
- Globally reduce bold font weight from 700 to 500
- Remove border from timeline icons
- Unify dropzone styling
- Various border style consolidations

* attempt to fix test

* another attempt at tests

* fix contains
This commit is contained in:
silverwind 2020-11-15 21:58:16 +01:00 committed by GitHub
parent 7a30e97002
commit 0de546009e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 221 additions and 225 deletions

View file

@ -64,7 +64,7 @@
}
dt {
font-weight: bolder;
font-weight: 500;
float: left;
width: 285px;
clear: left;

View file

@ -57,6 +57,23 @@
--color-secondary-alpha-70: #dededeb3;
--color-secondary-alpha-80: #dededecc;
--color-secondary-alpha-90: #dededee1;
/* colors */
--color-red: #db2828;
--color-orange: #f2711c;
--color-yellow: #fbbd08;
--color-olive: #b5cc18;
--color-green: #21ba45;
--color-teal: #00b5ad;
--color-blue: #2185d0;
--color-violet: #6435c9;
--color-purple: #a333c8;
--color-pink: #e03997;
--color-brown: #a5673f;
--color-grey: #767676;
--color-black: #1b1c1d;
--color-gold: #a1882b;
--color-white: #ffffff;
/* target-based colors */
--color-body: #ffffff;
--color-text: #212121;
--color-box-header: #f7f7f7;
@ -97,7 +114,7 @@
@font-face {
font-family: "Yu Gothic";
src: local("Yu Gothic Bold");
font-weight: 700;
font-weight: 500;
}
@font-face {
@ -119,6 +136,11 @@ samp {
font-family: var(--fonts-monospace);
}
b,
strong {
font-weight: 500;
}
body {
background-color: var(--color-body);
overflow-y: auto;
@ -415,10 +437,10 @@ a:hover,
.text {
&.red {
color: #d95c5c !important;
color: var(--color-red) !important;
a {
color: #d95c5c !important;
color: var(--color-red) !important;
&:hover {
color: #e67777 !important;
@ -447,7 +469,7 @@ a:hover,
}
&.grey {
color: #767676 !important;
color: var(--color-grey) !important;
a {
color: #444444 !important;
@ -459,27 +481,27 @@ a:hover,
}
&.light.grey {
color: #888888 !important;
color: var(--color-grey) !important;
}
&.green {
color: #6cc644 !important;
color: var(--color-green) !important;
}
&.purple {
color: #6e5494 !important;
color: var(--color-purple) !important;
}
&.yellow {
color: #fbbd08 !important;
color: var(--color-yellow) !important;
}
&.orange {
color: #f2711c !important;
color: var(--color-orange) !important;
}
&.gold {
color: #a1882b !important;
color: var(--color-gold) !important;
}
&.left {
@ -499,7 +521,7 @@ a:hover,
}
&.bold {
font-weight: bold;
font-weight: 500;
}
&.italic {
@ -534,7 +556,7 @@ a:hover,
}
&.bottom.attached.message {
font-weight: bold;
font-weight: 500;
text-align: left;
color: black;
@ -544,7 +566,7 @@ a:hover,
& > span,
.pull-right > span {
color: #21ba45;
color: var(--color-green);
}
}
@ -556,22 +578,22 @@ a:hover,
.error {
&.header {
background-color: #ffe8e6 !important;
border-color: #db2828;
border-color: var(--color-red);
}
&.segment {
border-color: #db2828;
border-color: var(--color-red);
}
}
.warning {
&.header {
background-color: #f9edbe !important;
border-color: #efc16b;
border-color: var(--color-yellow);
}
&.segment {
border-color: #efc16b;
border-color: var(--color-yellow);
}
}
@ -652,7 +674,7 @@ a:hover,
.background {
&.red {
background-color: #d95c5c !important;
background-color: var(--color-red) !important;
}
&.blue {
@ -664,31 +686,31 @@ a:hover,
}
&.grey {
background-color: #767676 !important;
background-color: var(--color-grey) !important;
}
&.light.grey {
background-color: #888888 !important;
background-color: var(--color-grey) !important;
}
&.green {
background-color: #6cc644 !important;
background-color: var(--color-green) !important;
}
&.purple {
background-color: #6e5494 !important;
background-color: var(--color-purple) !important;
}
&.yellow {
background-color: #fbbf09 !important;
background-color: var(--color-yellow) !important;
}
&.orange {
background-color: #f2711c !important;
background-color: var(--color-orange) !important;
}
&.gold {
background-color: #a1882b !important;
background-color: var(--color-gold) !important;
}
}
@ -707,7 +729,7 @@ a:hover,
.border {
border: 1px solid;
&.red {
border-color: #d95c5c !important;
border-color: var(--color-red) !important;
}
&.blue {
@ -719,31 +741,31 @@ a:hover,
}
&.grey {
border-color: #767676 !important;
border-color: var(--color-grey) !important;
}
&.light.grey {
border-color: #888888 !important;
border-color: var(--color-grey) !important;
}
&.green {
border-color: #6cc644 !important;
border-color: var(--color-green) !important;
}
&.purple {
border-color: #6e5494 !important;
border-color: var(--color-purple) !important;
}
&.yellow {
border-color: #fbbd08 !important;
border-color: var(--color-yellow) !important;
}
&.orange {
border-color: #f2711c !important;
border-color: var(--color-orange) !important;
}
&.gold {
border-color: #a1882b !important;
border-color: var(--color-gold) !important;
}
}
@ -804,7 +826,7 @@ a:hover,
.scrolling.menu {
.item.selected {
font-weight: 700 !important;
font-weight: 500 !important;
}
}
@ -1056,7 +1078,7 @@ i.icon.centerlock {
span {
&.bottom-line {
&::after {
border-bottom: 1px solid #eaecef;
border-bottom: 1px solid var(--color-secondary);
}
}
@ -1171,7 +1193,7 @@ i.icon.centerlock {
.lines-code,
.lines-commit {
.bottom-line {
border-bottom: 1px solid #eaecef;
border-bottom: 1px solid var(--color-secondary);
}
}
.code-view {
@ -1268,13 +1290,13 @@ i.icon.centerlock {
.svg {
span.green & {
color: #21ba45;
color: var(--color-green);
}
span.red & {
color: #db2828;
color: var(--color-red);
}
span.purple & {
color: #a333c8;
color: var(--color-purple);
}
}

View file

@ -353,7 +353,7 @@
/* GenericStrong */
.chroma .gs {
font-weight: bold;
font-weight: 500;
}
/* GenericSubheading */

View file

@ -61,7 +61,7 @@
}
.right.stackable.menu > .item.active {
color: #d9453d;
color: var(--color-red);
}
}

View file

@ -25,7 +25,7 @@
}
.svg {
color: #5aa509;
color: var(--color-green);
height: 40px;
width: 50px;
vertical-align: bottom;
@ -45,7 +45,7 @@
}
a {
color: #5aa509;
color: var(--color-green);
}
}

View file

@ -26,7 +26,7 @@
}
.absent {
color: #cc0000;
color: var(--color-red);
}
.anchor {
@ -77,7 +77,7 @@
h6 {
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
font-weight: 500;
line-height: 1.4;
&:first-of-type {
@ -193,7 +193,7 @@
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
font-weight: 500;
}
dl dd {
@ -224,7 +224,7 @@
}
table th {
font-weight: bold;
font-weight: 500;
}
table th,
@ -450,7 +450,7 @@
}
.csv-data th {
font-weight: bold;
font-weight: 500;
background: #f8f8f8;
border-top: 0;
}

View file

@ -117,7 +117,7 @@
.item {
margin-left: 0;
margin-right: 0;
border-bottom: 1px solid #eeeeee;
border-bottom: 1px solid var(--color-secondary);
.ui.avatar {
width: 48px;
@ -137,7 +137,7 @@
padding: 10px 15px;
&:not(:last-child) {
border-bottom: 1px solid #eeeeee;
border-bottom: 1px solid var(--color-secondary);
}
}
}
@ -149,7 +149,7 @@
line-height: 32px;
&:not(:last-child) {
border-bottom: 1px solid #dddddd;
border-bottom: 1px solid var(--color-secondary);
}
.button {
@ -186,7 +186,7 @@
margin-right: -14px;
margin-left: -14px !important;
padding: 10px;
border-bottom: 1px solid #e1e4e8;
border-bottom: 1px solid var(--color-secondary);
border-top: none;
a {

View file

@ -432,7 +432,7 @@
}
.btn-octicon:hover {
color: #4078c0;
color: var(--color-primary);
}
.btn-octicon-danger:hover {
@ -859,14 +859,13 @@
}
.badge {
width: 32px;
height: 32px;
width: 34px;
height: 34px;
background-color: var(--color-timeline);
border: 2px solid var(--color-timeline);
border-radius: 50%;
display: flex;
float: left;
margin-left: -32px;
margin-left: -34px;
margin-right: 8px;
color: #666;
align-items: center;
@ -877,14 +876,6 @@
height: 22px;
padding: 3px;
&.octicon-circle-slash {
color: #bd2c00;
}
&.octicon-dot-fill {
color: #6cc644;
}
&.octicon-comment {
margin-top: 2px;
}
@ -983,7 +974,7 @@
}
.author {
font-weight: 700;
font-weight: 500;
}
.comment-form-reply .footer {
@ -1056,7 +1047,7 @@
}
> .bottom.segment {
background: #f3f4f5;
background: var(--color-box-body);
.ui.images::after {
clear: both;
@ -1250,7 +1241,7 @@
margin-right: -14px;
margin-left: -14px;
padding: 10px;
border-bottom: 1px solid #e1e4e8;
border-bottom: 1px solid var(--color-secondary);
border-top: none;
a {
@ -1299,7 +1290,7 @@
color: #000000;
&:hover {
color: #4078c0;
color: var(--color-primary);
}
}
@ -1323,7 +1314,7 @@
}
.overdue {
color: red;
color: var(--color-red);
}
}
@ -1398,7 +1389,7 @@
max-width: 90px;
&:last-child {
border-left: 1px solid #b4b4b4;
border-left: 1px solid var(--color-secondary);
}
}
@ -1658,7 +1649,7 @@
flex: 0 0 auto;
.bar {
background-color: #bd2c00;
background-color: var(--color-red);
height: 12px;
width: 40px;
display: inline-block;
@ -1666,7 +1657,7 @@
vertical-align: text-top;
.add {
background-color: #55a532;
background-color: var(--color-green);
height: 12px;
}
}
@ -1862,10 +1853,10 @@
margin-right: 15px;
.del {
color: red;
color: var(--color-red);
}
.add {
color: green;
color: var(--color-green);
}
}
}
@ -1907,7 +1898,7 @@
&.release {
#release-list {
border-top: 1px solid #dddddd;
border-top: 1px solid var(--color-secondary);
margin-top: 20px;
padding-top: 15px;
@ -1942,7 +1933,7 @@
}
.detail {
border-left: 2px solid #dddddd;
border-left: 2px solid var(--color-secondary);
.author {
img {
@ -2049,7 +2040,7 @@
.item {
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #dddddd;
border-bottom: 1px solid var(--color-secondary);
.ui.avatar {
float: left;
@ -2138,7 +2129,7 @@
line-height: 2em;
&:not(:last-child) {
border-bottom: 1px solid #dddddd;
border-bottom: 1px solid var(--color-secondary);
}
}
}
@ -2619,7 +2610,7 @@
.title {
color: #444444;
font-size: 15px;
font-weight: bold;
font-weight: 500;
margin: 0 6px;
&:hover {
@ -2699,7 +2690,7 @@
}
.overdue {
color: red;
color: var(--color-red);
}
}
}
@ -2711,7 +2702,8 @@
.ui.form {
.dropzone {
border: 2px dashed #0087f5;
border: 2px dashed var(--color-secondary);
background: none;
box-shadow: none !important;
padding: 0;
min-height: 5rem;
@ -2744,7 +2736,7 @@
.list {
> .item {
.green:not(.ui.button) {
color: #21ba45;
color: var(--color-green);
}
&:not(:first-child) {

View file

@ -82,7 +82,7 @@
}
.footer {
border-top: 1px solid #f1f1f1;
border-top: 1px solid var(--color-secondary);
padding: 10px 0;
.markdown-info {

View file

@ -7,7 +7,7 @@
.tribute-container ul {
margin-top: 0 !important;
background: #ffffff !important;
background: var(--color-body) !important;
}
.tribute-container li {
@ -22,7 +22,7 @@
.tribute-container li.highlight,
.tribute-container li:hover {
background: #2185d0 !important;
background: var(--color-primary) !important;
color: #ffffff !important;
}

View file

@ -11,7 +11,7 @@
}
.header {
font-weight: 700;
font-weight: 500;
font-size: 1.3rem;
margin-top: -.2rem;
line-height: 1.3rem;
@ -99,19 +99,19 @@
font-size: 2em;
&.green {
color: #21ba45;
color: var(--color-green);
}
&.red {
color: #d01919;
color: var(--color-red);
}
&.purple {
color: #a333c8;
color: var(--color-purple);
}
&.blue {
color: #2185d0;
color: var(--color-blue);
}
}

View file

@ -15,7 +15,6 @@
.total-contributions {
text-align: left;
font-weight: 500;
margin-top: 0;
}
}

View file

@ -23,6 +23,22 @@
.rounded-left { border-radius: var(--border-radius) 0 0 var(--border-radius) !important; }
.rounded-right { border-radius: 0 var(--border-radius) var(--border-radius) 0 !important; }
.bg-red { background: var(--color-red) !important; }
.bg-orange { background: var(--color-orange) !important; }
.bg-yellow { background: var(--color-yellow) !important; }
.bg-olive { background: var(--color-olive) !important; }
.bg-green { background: var(--color-green) !important; }
.bg-teal { background: var(--color-teal) !important; }
.bg-blue { background: var(--color-blue) !important; }
.bg-violet { background: var(--color-violet) !important; }
.bg-purple { background: var(--color-purple) !important; }
.bg-pink { background: var(--color-pink) !important; }
.bg-brown { background: var(--color-brown) !important; }
.bg-grey { background: var(--color-grey) !important; }
.bg-gold { background: var(--color-gold) !important; }
.text-white { color: var(--color-white) !important; }
.m-0 { margin: 0 !important; }
.m-1 { margin: .125rem !important; }
.m-2 { margin: .25rem !important; }

View file

@ -50,11 +50,28 @@
--color-secondary-alpha-70: #454a57b3;
--color-secondary-alpha-80: #454a57cc;
--color-secondary-alpha-90: #454a57e1;
/* colors */
--color-red: #db2828;
--color-orange: #f2711c;
--color-yellow: #fbbd08;
--color-olive: #b5cc18;
--color-green: #21ba45;
--color-teal: #00b5ad;
--color-blue: #2185d0;
--color-violet: #6435c9;
--color-purple: #a333c8;
--color-pink: #e03997;
--color-brown: #a5673f;
--color-grey: #767676;
--color-black: #1b1c1d;
--color-gold: #a1882b;
--color-white: #ffffff;
/* target-based colors */
--color-body: #383c4a;
--color-box-header: #454a57;
--color-box-body: #353945;
--color-text: #b6bac5;
--color-timeline: #454a57;
--color-timeline: #4a505c;
--color-input-text: #dcdcdc;
--color-input-background: #2e323e;
--color-input-border: #454a57;
@ -416,7 +433,7 @@
/* GenericStrong */
.chroma .gs {
font-weight: bold;
font-weight: 500;
}
/* GenericSubheading */
@ -459,10 +476,6 @@
background: #6a737d;
}
.repository.branches .commit-divergence .bar-group:last-child {
border-color: #6a737d;
}
.ui.horizontal.segments > .segment {
background-color: #383c4a;
}
@ -532,10 +545,6 @@ body {
color: #a0cc75;
}
.repository.release #release-list {
border-top-color: var(--color-secondary);
}
.repository .milestone.list > .item .operate > a {
color: #87ab63;
}
@ -624,6 +633,17 @@ footer {
color: #dbdbdb;
}
.ui.labels a.label:hover,
a.ui.label:hover {
background: #454b5a;
color: #dbdbdb;
}
.ui.basic.labels a.label:hover,
a.ui.basic.label:hover {
background: var(--color-body);
}
.ui.red.label,
.ui.red.labels .label {
background-color: #7d3434 !important;
@ -1017,10 +1037,6 @@ a.ui.basic.green.label:hover {
}
.repository.view.issue .comment-list .comment .content {
> .bottom.segment {
background: #353945;
}
.header {
color: #dbdbdb;
background-color: var(--color-secondary);
@ -1044,14 +1060,6 @@ a.ui.basic.green.label:hover {
}
}
.repository.new.issue .comment.form .content::after {
border-right-color: #353945;
}
.repository.new.issue .comment.form .content::before {
border-right-color: #353945;
}
.repository.view.issue .comment-list .timeline-item .badge {
color: #ccc;
}
@ -1337,13 +1345,8 @@ td.blob-hunk {
box-shadow: 0 0 0 1px rgba(121, 71, 66, .5) inset, 0 0 0 0 transparent;
}
.ui.form .dropzone {
border: 1px dashed var(--color-secondary);
background-color: #2e323e;
.dz-button {
color: rgba(158, 158, 158, .8);
}
.ui.form .dropzone .dz-button {
color: rgba(158, 158, 158, .8);
}
.ui.form .dropzone:hover .dz-button {
@ -1380,11 +1383,6 @@ td.blob-hunk {
background: #2e323e !important;
}
.bottom-line,
.bottom-line::after {
border-color: #4e525e !important;
}
.lines-num {
color: var(--color-secondary-dark-6) !important;
border-color: var(--color-secondary) !important;
@ -1500,11 +1498,6 @@ a.blob-excerpt:hover {
border-bottom: 1px dashed var(--color-secondary);
}
.ui.text.yellow,
.yellow.icon.icon.icon {
color: #e4ac07 !important;
}
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(1),
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(2),
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(3),
@ -1531,15 +1524,6 @@ a.blob-excerpt:hover {
border-color: #634343 !important;
}
.repository .labelspage .item,
.organization.settings .labelspage .item,
.organization.teams .repositories .item:not(:last-child),
.organization.teams .members .item:not(:last-child),
.organization.teams .detail .item:not(:last-child),
.organization.members .list .item {
border-bottom-color: var(--color-secondary);
}
.repository .labelspage .item a,
.organization.settings .labelspage .item a {
color: #6a737d;
@ -1621,13 +1605,8 @@ a.blob-excerpt:hover {
border: 0;
}
.footer {
border-top-color: var(--color-secondary);
.markdown-info {
color: inherit;
}
.footer .markdown-info {
color: inherit;
}
}
@ -1790,10 +1769,6 @@ footer .container .links > * {
color: var(--color-secondary-dark-6);
}
.repository.release #release-list > li .detail {
border-left-color: var(--color-secondary);
}
.repository.release #release-list > li .detail .dot {
background-color: #505667;
border-color: #383c4a;
@ -1807,15 +1782,6 @@ footer .container .links > * {
box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .6);
}
.tribute-container ul {
background: #2d303b !important;
}
.tribute-container li.highlight,
.tribute-container li:hover {
background: #728e5e !important;
}
.repository .repo-header .ui.huge.breadcrumb.repo-title .repo-header-icon .avatar {
color: #2a2e3a;
}