Sizes.width uses root width
See original GitHub issueSizes sets the width as Components.Html.root.offsetWidth
, is that right or should it be using Components.Html.track.offsetWidth
? Sizes.width
is used to calculate Sizes.slideWidth
, in my case my track isn’t the same width as the root container, so it’s messing up the slide widths.
By the way, awesome work, the components have made it really easy to extend and fit my use case 🎉
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:10 (2 by maintainers)
Top Results From Across the Web
width | CSS-Tricks
The width property in CSS specifies the width of the element's content area. This “content” area is the portion inside the padding, border,...
Read more >width - CSS: Cascading Style Sheets - MDN Web Docs
The width CSS property sets an element's width. By default, it sets the width of the content area, but if box-sizing is set...
Read more >Android: Get Screen size for the root Layout only
This both the methods/ways gives me same height and width i.e. size of full screen. What I am looking for is to get...
Read more >Responsive Images, The sizes Attribute, and Unexpected ...
For browsers that support it, we've now got responsive images. The sizes attribute tells browsers to assume the image fills the entire browser...
Read more >Rem in CSS: Understanding and Using rem Units - SitePoint
We begin with the 62.5% trick to show that the modified root font size does not have any effect on the values used...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This seems to be working!
I was running into this issue also and thanks to the suggestion of manually triggering
go()
I was able to fix it. My code is below. Note that I needed support for multiple glides on a given page, so I iterated through every glide. I then used a somewhat hackishparentnode.parentnode.parentnode
to select the correct parent of the glide which has an ID. This works in my case because all these glides will have the same DOM structure, but you will probably want a different way to uniquely refer to the individual glide, so that you can ensure that the bullets are controlling the correct glide.markup: