Select to view content in your preferred language

Gallery Card Border Red in ArcGIS Hub Initiative

676
12
Jump to solution
08-07-2024 11:58 AM
SarahRadel
Occasional Contributor

Hello, 

I was working in my hub, and I noticed that all of my gallery cards have a red border. I did not do this. Before, my cards did not have a border. Is there any way to fix this?

 

Thank you,

 

Sarah

12 Replies
SarahRadel
Occasional Contributor

@KlaraSchmitt The North Carolina Community Information Portal Team (www.nccip.org) has figured out how to fix this issue.  The issue was that all of the gallery card borders in our initiative had changed to red. Upon inspection @RobHoward found the following: It computes the border accent color from other values on the page. In this case, it computes the borderAccent using the following code:

</> JavaScript

setBorderAccent: (e,t)=>(0,
n.default)(e).isLight() ? (0,
n.default)(t.body.text).lighten(40) : (0,
n.default)(t.body.text).darken(50)

The problem was in the body text color, which was set to a very dark red color, almost black. When the theme generator processed it, it made it 40% lighter since the call to isLight was false.

Solving this was an endeavor!  If I could make a recommendation: expose the border accent as a setting instead of computing it from text color.

Thank you to everyone who stepped in to help us fix this issue.

KlaraSchmitt
Esri Regular Contributor

Good job figuring it out! I appreciate your feedback and yes, we do run that function because previously we were hardcoded to a mid-level gray, but that couldn't been seen in dark themes, so then we switched to using a lightened version of the text color to try to account for theme variation. But I will pass along the feedback about exposing a method to set border-color and sorry it caused such mayhem for you.

howardro
Emerging Contributor

You tagged to wrong Rob Howard 😁

Adding to Sarah's suggestion, I'd like to at least see the computed colors shown on the settings form even if they're read only. We've dealt with a lot of groups who lack the technical expertise to debug an issue like this and having the computed colors listed would give them a starting point that doesn't involve attaching a debugger.