Overlay hiding stars
Hey y'all! I've run into a general CSS/design problem that I'm kinda stumped on solving. In the image the red circles are highlighting the star(s) in the constellation that are overlaid by my absolute positioned elements and therefore are uninteractable without stretching to some insane dimensions. Any suggestions?
I've thought about maybe adding a margin to the image but that just makes the scrolling even worse :(
107 Replies
Maybe add a hover zone near the top that makes the overlay appear temporarily? It could fade out after a few seconds if not interacted with.
So it's not very intuitive but the "Boons spent on Other" line also has a hover listener. Any idea if you can have nested hovers like that?
Additionally, I just thought about what if there was a button that collapsed/expanded it? Would that work?
Yeah, I think you can
Yes, I think it would also work
@arcanistzed gave LeaguePoints™ to @ethck (#19 • 90)
Unrelated, but I think you should add some padding to the left part of the overlay
Hmm, well those are certainly some ideas to work with then. Thanks @arcanistzed !
@ethck gave LeaguePoints™ to @arcanistzed (#16 • 127)
CSS is not my strong suit lol
Do you mean for the text?
here's a better picture of that
It's inside of a tidy5e sheet
I mean the entire box which has all of those labels and input fields
Even more padding???
Just around this part, yes
Wait, padding for the inside of the box or on the outside?
Padding is on the inside; margin is on the outside
🤦
With 5px? Is that good or do you recommend more?
It's good like that, but you should probably avoid using fixed values.
I usually use
em
, vh
, vw
, or just a percentage.
Try 1%
for padding, maybe?
It lets it be more dynamic when you use it on different sized screens or when resizing the window
Keep in mind that I'm also not a CSS expert, having just started development in general1%
So it looks like either way I'm going I need to make a collapsible field for this. Any advice on making things collapse? Most collapsing I've done was with summary and details lol
Yeah, that works well.
Maybe try something like this, if you want a simple alternative https://github.com/arcanistzed/toggle-banner/blob/main/scripts/module.js
The scaling and transition in the CSS make it much more dynamic https://github.com/arcanistzed/toggle-banner/blob/main/styles/module.css
Seems simple enough. Your "commands" if you will are based on the logo, what would you recommend for my use case? Add small button to display it?
You can't add that info on its own panel outside the image frame?
I'm not entirely sure what you mean... I'll post a more full picture for reference though
(ignore the health value lol)
I meant something like this
Ooooh, I like that... Let me see if I can pull it off easily.
Oh man, that's so much easier! Thanks @mclemente !
@ethck gave LeaguePoints™ to @mclemente (#48 • 32)
btw, that's the Constellation idea that's been on the Trello board, right?
are you using Cytoscape by any chance?
Recommendations? Definitely need to change the colors but I'm still thinking it might be cool to do the collapsing section.
No, this was actually for a commission. No clue what Cytoscape is.
Cytoscape is lib for graphs like that (https://js.cytoscape.org/), but if you managed to do it without it, you're probably fine lol
it's just that I found it being used on Foundry on Moerill's Mindmap module (RIP)
Hmm, flexrow isn't what I was looking for apparently. I want the big section to be left aligned but the right section (level, cost) to be aligned to the right, just like in the original. Any ideas?
This makes me wish I had found it sooner... I've done crude approximations based on percentages...
does
<details><summary>Info</summary> CONTENT HERE </details>
work on that sheet?Turns out details/summary makes that trivial...
changed the color to make it visible while messing with it, but align-items: end gets closer.
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
So the big box on the left should be on the left (basically where it is) and the Level/Cost should be on the right and it should be tiny (like 15% width)
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Man, I wish I could do CSS while still waking up 🤣
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Can it do Chrome & Firefox?
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Awesome!
And Voila!
Thanks tons @nekrodarkmoon ! Now I just need to find color choices...
@ethck gave LeaguePoints™ to @nekrodarkmoon (#22 • 75)
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Wait, the right side or the left side?
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Okay, just making sure lol
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
You never really know with the dark magic that is CSS...
I swear I've built data pipelines for billions of records in less time than it took me to solve this lol
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
With the collapsing?
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
I had it that way originally, but no collapsing :(
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Close, but not what I intended lol
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
I semi reverted back to position absolute and got this :)
Yeah, idk why that happened
🤷
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
So, here's a bit of a code dump but maybe you can help me figure out that last row...
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Man, there's just so much here that I don't know...
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
So I've determined it's not because of the row itself, but rather probably the container. Each row is exactly 26px tall.
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
oh
I'm dumb
It's the 1% padding I put in on every side
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
It's changing the size of the box it's all in, yes.
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
?
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Honestly I don't even know where that highlight is coming from lol
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Oh, found it
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Oh, and it definitely is because of that
For this table specifically?
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
It's pretty general except for the fact that I'm forced to use some other classes (that I didn't really need except for some selectors...)
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
It's ugly af
The commission was very specific and wanted me to use tidy5e's popout structure for some of the additional details, and that requires it to have a very nested selector chain :(
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
So the issue here is that the "other boons" has the
item
class... which sets the background and center aligns (via flex!)Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
I don't understand the black magic
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
And voila!
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Yeah, I'm sure there are.
Thanks so much @arcanistzed @mclemente and @nekrodarkmoon for your input and expertise!
@ethck gave LeaguePoints™ to @arcanistzed (#15 • 129), @mclemente (#45 • 34), and @nekrodarkmoon (#21 • 76)
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Cheating is bad 🤌
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
It moves other elements around too and it looks weird
slowmo
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
It's good practice to not use JQuery tho
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Same energy:
That doesn't jump at least