diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Follow the theme in the external tab icon
-rw-r--r--assets/cgit.css16
1 file changed, 13 insertions, 3 deletions
diff --git a/assets/cgit.css b/assets/cgit.css
index 619e46c..3ff2513 100644
--- a/assets/cgit.css
+++ b/assets/cgit.css
@@ -339,10 +339,20 @@ div#cgit .tabs a.active {
background-color: var(--tab-active-bg);
}
+/* Outbound-link marker on tabs that leave the site. Drawn through a
+ * mask filled with currentColor, so it follows the tab's text colour
+ * in both themes instead of staying a fixed-colour image. */
div#cgit .tabs a.external:after {
- content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfgAhcJDQY+gm2TAAAAHWlUWHRDb21tZW50AAAAAABDcmVhdGVkIHdpdGggR0lNUGQuZQcAAABbSURBVAhbY2BABs4MU4CwhYHBh2Erww4wrGFQZHjI8B8IgUIscJWyDHcggltQhI4zGDCcRwhChPggHIggP1QoAVmQkSETrGoHsiAEsACtBYN0oDAMbgU6EBcAAL2eHUt4XUU4AAAAAElFTkSuQmCC);
- opacity: 0.5;
- margin: 0 0 0 5px;
+ content: "";
+ display: inline-block;
+ width: 0.7em;
+ height: 0.7em;
+ margin-left: 5px;
+ vertical-align: -0.02em;
+ background-color: currentColor;
+ opacity: 0.6;
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 5h5v5M19 5l-8 8M19 14v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h4' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 5h5v5M19 5l-8 8M19 14v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h4' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
div#cgit .tabs .search {