From 4103f1ee9d56969331fd25d2fc9c8f01f4c02130 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Fri, 7 Jun 2024 11:57:33 -0500 Subject: [PATCH] Allow changing colors of the collapse/expand Without having to change the navbar color --- .../hierarchy_and_online_contents.scss | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss b/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss index 878f555d..b1f922d2 100644 --- a/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +++ b/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss @@ -1,24 +1,23 @@ -//< !-- ! Font Awesome Pro 6.2.0 by @fontawesome - https: //fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> -$hierarchy-view-expand-icon: url("data:image/svg+xml,") !default; -$hierarchy-view-collapse-icon: url("data:image/svg+xml,") !default; +:root { + --al-toggle-icon-color: #{$navbar-light-color}; + /* Font Awesome Free 6.5.2 by @fontawesome - https: //fontawesome.com License - https://fontawesome.com/license/free (CC BY 4.0 License) Copyright 2024 Fonticons, Inc. */ + --al-hierarchy-view-expand-icon: url("data:image/svg+xml,"); + --al-hierarchy-view-collapse-icon: url("data:image/svg+xml,"); +} // Collapse +/- indicators .al-toggle-view-children { - background-image: escape-svg($hierarchy-view-expand-icon); - background-repeat: no-repeat; - background-position: center; - background-size: 100%; - display: inline-block; + background-color: var(--al-toggle-icon-color); flex-shrink: 0; height: 1.25rem; margin-left: -1.25rem; margin-right: 0.25 * $spacer; margin-top: 0.1 * $spacer; - vertical-align: middle; - width: 1rem; + mask: var(--al-hierarchy-view-expand-icon); + width: 1.1rem; &:not(.collapsed) { - background-image: escape-svg($hierarchy-view-collapse-icon); + mask: var(--al-hierarchy-view-collapse-icon); } }