Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: scroll primitives #46

Open
runspired opened this issue Apr 1, 2016 · 2 comments
Open

Feat: scroll primitives #46

runspired opened this issue Apr 1, 2016 · 2 comments
Assignees

Comments

@runspired
Copy link
Collaborator

I'm thinking about adding an API for scrollable boxes. This is a first pass idea of one way this might be done.

Properties

  • scrollX
  • scrollY
  • scrollXY
  • scrollNone

Breakpoint Attributes

  • xs="scrollX"
  • sm="noScrollX"

I'm also investigating whether an element approach might be more ideal.

<scrollable scrollX scrollY>
</scrollable>

The element approach would lend itself well to situations in which custom scroll solutions are needed, or where you want to wrap occlusion/recycling based list solutions such as ember-collection or smoke-and-mirrors.

@RobbieTheWagner
Copy link
Member

Definitely interested in having some nicely defined way of ensuring things scroll or don't scroll. I always have trouble with scrolling and flexi.

@kybishop
Copy link
Collaborator

kybishop commented May 30, 2017

An example workaround currently exists here.

The trouble with implementing a scroll primitive is that we need a lot of prior knowledge about the AST: is there a parent with a statically defined height, or a chain of parents with percentage heights that eventually lead to an element with a statically defined height? If not, the scroll primitive will not work.

I don't think there is a magic way of making it work either; the user needs to somehow define the/a parent's height. I suppose we might be able to set a cascade of height: 100% if we know a page or screen exists somewhere up the tree? Will keep thinking about this.

I'm not yet sure how the CSS AST works, but hope to find out soon while hacking on the CSS optimizer. For now, the workaround will hopefully suffice for people that need this kind of scrolling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants