Open humitos opened 4 months ago
@davidfischer is probably better to answer this one.
The stickybox only floats at >1300px wide. Otherwise, it's supposed to collapse back to a static placement wherever you put the div (sidebar?). The stickybox can be used with the horizontal
class, but I don't think that's what you're doing here, right?
I'm not using the horizontal
class by default because I don't want it to be horizontal all the time. I want to be vertical
when the stickybox is floating on >1300px wide and horizontal
in the other scenario. Is that possible? Does it make sense?
In the tests I've done, I found that it display nicer and that's why I opened this issue here (look the example from the description)
The sticky box is only intended to be used at widths >1300px. On widths less than that, it collapses into a static placement.
Yes, my question is: when it collapses into a static placement, can it use the horizontal
CSS class style?
Yes, my question is: when it collapses into a static placement, can it use the
horizontal
CSS class style?
That isn't automatic and if you just set horizontal
on it it would apply whether it is collapsed or not.
Yeah, that's what I realized while doing my tests. I'd like to change that behavior that's why I opened this issue here. Would that be a feature you accept in the client?
Another approach could be the ad client to trigger an event when it collapses. That way, I can subscribe to that event and add horizontal
CSS class when it happens.
Does this make sense?
I don't like magically making something not horizontal (or making it horizontal) when there's a class that says the opposite. It seems not explicit.
Sounds like an event is perhaps the best option? But I think in general most folks aren't resizing windows, and we just need to default the right styles based on page width 🤔
While working with stickybox I found that I'd like to have the vertical ad when it's floating in the bottom right (wide screen), but horizontal when it's injected at the bottom of the main content (narrow screen):
I think it makes the ad to display nicer and more adapted to the content itself. Is this be a good idea? Would it be possible to communicate this to the ad client?