Skip to content

Commit aed1622

Browse files
authored
Simplify text color selectors and tweak arc-green colors (#21784)
Move the text color rules out of the unneeded `.ui` block, add missing colors, tweak colors on arc-green to be more readable (red was particulary bad to read). Also, this removes the previous inheritance of link colors. I think links should always be in primary color and if they are to be discolored, the color should be set on them explicitely. <img width="165" alt="Screenshot 2022-11-12 at 13 28 30" src="https://user-images.githubusercontent.com/115237/201474098-700d9fed-3133-43c7-b57e-d4cc5c2795cb.png"> <img width="152" alt="Screenshot 2022-11-12 at 13 18 48" src="https://user-images.githubusercontent.com/115237/201474156-b6de4cb5-bce8-4553-b3d4-8365aff9a3a7.png"> HTML to test with: ```html <div class="text red">some text with <a href="#foo">a link</a>.</div> <div class="text orange">some text with <a href="#foo">a link</a>.</div> <div class="text yellow">some text with <a href="#foo">a link</a>.</div> <div class="text olive">some text with <a href="#foo">a link</a>.</div> <div class="text green">some text with <a href="#foo">a link</a>.</div> <div class="text teal">some text with <a href="#foo">a link</a>.</div> <div class="text blue">some text with <a href="#foo">a link</a>.</div> <div class="text violet">some text with <a href="#foo">a link</a>.</div> <div class="text purple">some text with <a href="#foo">a link</a>.</div> <div class="text pink">some text with <a href="#foo">a link</a>.</div> <div class="text brown">some text with <a href="#foo">a link</a>.</div> <div class="text grey">some text with <a href="#foo">a link</a>.</div>
1 parent bf20786 commit aed1622

File tree

2 files changed

+35
-87
lines changed

2 files changed

+35
-87
lines changed

web_src/less/_base.less

+16-68
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,22 @@ a.ui.card:hover,
13011301
visibility: hidden;
13021302
}
13031303

1304+
.text.red { color: var(--color-red) !important; }
1305+
.text.orange { color: var(--color-orange) !important; }
1306+
.text.yellow { color: var(--color-yellow) !important; }
1307+
.text.olive { color: var(--color-olive) !important; }
1308+
.text.green { color: var(--color-green) !important; }
1309+
.text.teal { color: var(--color-teal) !important; }
1310+
.text.blue { color: var(--color-blue) !important; }
1311+
.text.violet { color: var(--color-violet) !important; }
1312+
.text.purple { color: var(--color-purple) !important; }
1313+
.text.pink { color: var(--color-pink) !important; }
1314+
.text.brown { color: var(--color-brown) !important; }
1315+
.text.black { color: var(--color-text) !important; }
1316+
.text.grey { color: var(--color-text-light) !important; }
1317+
.text.light.grey { color: var(--color-grey-light) !important; }
1318+
.text.gold { color: var(--color-gold) !important; }
1319+
13041320
.ui {
13051321
&.left:not(.action) {
13061322
float: left;
@@ -1370,74 +1386,6 @@ a.ui.card:hover,
13701386
}
13711387

13721388
.text {
1373-
&.red {
1374-
color: var(--color-red) !important;
1375-
1376-
a {
1377-
color: inherit !important;
1378-
1379-
&:hover {
1380-
color: var(--color-red-light) !important;
1381-
}
1382-
}
1383-
}
1384-
1385-
&.blue {
1386-
color: var(--color-blue) !important;
1387-
1388-
a {
1389-
color: inherit !important;
1390-
1391-
&:hover {
1392-
color: var(--color-blue-light) !important;
1393-
}
1394-
}
1395-
}
1396-
1397-
&.black {
1398-
color: var(--color-text);
1399-
1400-
&:hover {
1401-
color: var(--color-text-dark);
1402-
}
1403-
}
1404-
1405-
&.grey {
1406-
color: var(--color-text-light) !important;
1407-
1408-
a {
1409-
color: var(--color-text) !important;
1410-
1411-
&:hover {
1412-
color: var(--color-primary) !important;
1413-
}
1414-
}
1415-
}
1416-
1417-
&.light.grey {
1418-
color: var(--color-text-light-2) !important;
1419-
}
1420-
1421-
&.green {
1422-
color: var(--color-green) !important;
1423-
}
1424-
1425-
&.purple {
1426-
color: var(--color-purple) !important;
1427-
}
1428-
1429-
&.yellow {
1430-
color: var(--color-yellow) !important;
1431-
}
1432-
1433-
&.orange {
1434-
color: var(--color-orange) !important;
1435-
}
1436-
1437-
&.gold {
1438-
color: var(--color-gold) !important;
1439-
}
1440-
14411389
&.left {
14421390
text-align: left !important;
14431391
}

web_src/less/themes/theme-arc-green.less

+19-19
Original file line numberDiff line numberDiff line change
@@ -56,34 +56,34 @@
5656
--color-secondary-alpha-80: #454a57cc;
5757
--color-secondary-alpha-90: #454a57e1;
5858
/* colors */
59-
--color-red: #7d3434;
59+
--color-red: #cc4848;
6060
--color-orange: #cc580c;
6161
--color-yellow: #cc9903;
6262
--color-olive: #91a313;
6363
--color-green: #87ab63;
6464
--color-teal: #00918a;
65-
--color-blue: #1a6aa6;
66-
--color-violet: #502aa1;
67-
--color-purple: #8229a0;
68-
--color-pink: #c21e7b;
69-
--color-brown: #845232;
65+
--color-blue: #3a8ac6;
66+
--color-violet: #906ae1;
67+
--color-purple: #b259d0;
68+
--color-pink: #d22e8b;
69+
--color-brown: #a47252;
7070
--color-grey: #5e626a;
7171
/* light variants */
72-
--color-red-light: #984646;
73-
--color-orange-light: #e6630d;
74-
--color-yellow-light: #e5ac04;
75-
--color-olive-light: #a3b816;
76-
--color-green-light: #9fbc82;
77-
--color-teal-light: #00a39c;
78-
--color-blue-light: #1e78bb;
79-
--color-violet-light: #5a30b5;
80-
--color-purple-light: #932eb4;
81-
--color-pink-light: #db228a;
82-
--color-brown-light: #955d39;
83-
--color-grey-light: #6a6e78;
72+
--color-red-light: #c23636;
73+
--color-orange-light: #b84f0b;
74+
--color-yellow-light: #b88a03;
75+
--color-olive-light: #839311;
76+
--color-green-light: #7a9e55;
77+
--color-teal-light: #00837c;
78+
--color-blue-light: #347cb3;
79+
--color-violet-light: #7b4edb;
80+
--color-purple-light: #a742c9;
81+
--color-pink-light: #be297d;
82+
--color-brown-light: #94674a;
83+
--color-grey-light: #55585f;
8484
/* other colors */
8585
--color-black: #1e222e;
86-
--color-gold: #a1882b;
86+
--color-gold: #b1983b;
8787
--color-white: #ffffff;
8888
--color-diff-removed-word-bg: #6f3333;
8989
--color-diff-added-word-bg: #3c653c;

0 commit comments

Comments
 (0)