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
@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.
Have you tried the Hub site on another browser and/or another computer?
Hi Ed,
Thank you 🙂 I have tried the Hub site on other browsers and other computers, and I am still getting the same result 😞
Best,
Hmm that's interesting yeah because I don't see this on my end. Maybe @KlaraSchmitt from the ESRI Hub Team might be able to help you on this 🙂
@SarahRadel Do you have any custom CSS used in your Hub site? Sometimes if you use a CSS selector that is too generic, your CSS will leak out of wherever you put it on the page and affect other elements. This is why we typically recommend at least setting a custom row class and then using that class in front of generic selectors..my-special-row .card {border-color: red}
@KlaraSchmitt I do have a custom header, but I have never had this issue before with it. When inspecting the page, I can see where the issue is, but it will not accept my changes. Is there any way that you can help me with this?
@Ed_ Thank you 😊
No worries, I am glad that I was able to point you in the right direction and @KlaraSchmitt is an excellent resource 🙂 Good luck! 👍
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.
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.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.