foundation / foundation/yeti

Off Canvas + Wrapper: Documentation tells incorrect way to use?

Open
#12,451 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
29.8k
Forks
5.4k
Avg merge
25m
Merged PRs (30d)
1

Description

Hi,

I tried to use a sticky css element on a page (https://www.w3schools.com/howto/howto_css_sticky_element.asp) and hit a wall at first as nothing was working. It took some time till I found out it was because I use foundations off-canvas for my navigation (https://get.foundation/sites/docs/off-canvas.html).
The reason is that to not have unnessecary scrollbars I used the .off-canvas-wrapper around like the doc specified: https://get.foundation/sites/docs/off-canvas.html#wrapper

However, this prohibits any usage of position: sticky down the flow as it sets overflow: hidden; and in case this is above in any element of the position sticky, sticky wont work (see: https://www.terluinwebdesign.nl/en/css/position-sticky-not-working-try-overflow-clip-not-overflow-hidden/); clip is not used enough so I took a deeper look at the code....

The doc says:
```








```

Now, the .off-canvas position-left above is the part that overlows as your content under .off-canvas-content never does this. So I changed it to this structure:

```








```

And everything worked as expected, no bars and you also can use position sticky in your content. So I wonder if either the Doc is wrong/outdated or if I missed something yet to be seen by me?

Contributor guide

Open the contributing guide

Research direction

Compare the Off-Canvas wrapper documentation and examples linked in the report with the two markup structures shown. Verify how the wrapper's overflow behavior affects CSS position: sticky, then update the documentation if the alternative structure is supported; done when the docs accurately explain the limitation and recommended structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.