I have a list which is rendering images (horizontally with scroll):
<div id="my-cool-wrapper">
...
// My cool wrapper has more elements (apart from list)
<ul id="the-list" style="display: flex; flex-direction: row; overflow-x: scroll;">
<li>
<img src="https://image.shutterstock.com/image-vector/sample-stamp-grunge-texture-vector-260nw-1389188336.jpg" />
</li>
<li>
<img src="https://image.shutterstock.com/image-vector/sample-stamp-grunge-texture-vector-260nw-1389188336.jpg" />
</li>
<li>
<img src="https://image.shutterstock.com/image-vector/sample-stamp-grunge-texture-vector-260nw-1389188336.jpg" />
</li>
</ul>
</div>
I would like to transform: scale(1.5) the images on user interaction (e.g. click, hover, etc).
The problem:
- The images do not overflow outside the parent. I want the images to be fully visible when growing (even if it's outside the list's height).
I thought I could achieve this by setting overflow-y: visible to #the-list. However, according to the CSS overflow-x: visible; and overflow-y: hidden; causing scrollbar issue thread this is not possible.
Is there any alternative to achieving what I want?
Update: A JSFiddle is available to demonstrate the issue: http://jsfiddle.net/f7vdebt2/
I would like for the content of the <ul> to be able to scale beyond its parent boundaries.
<ul>.transformis only cosmetic, doesn't affect DOM sizes actually. If you switch to usingwidthinstead ofscale()you would be able to do this. Although in that case, the list will expand with its content on hover.scale()? If I setoverflow: visibleto both the<ul>and<div>elements, the scale works perfectly for me but it just messes up the horizontal scroll which I want to preserve - which is basically what my problem is as of now.widthroute, if you transform thewidthinstead, you won't get this problem. The only issue with this approach is, instead of the content overflowing theul, theulnow expands with its contents on hover.