Famous / Famous/engine

Engine does not compute child node dimensions properly if scene selector element has padding

Open
#411 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.7k
Forks
249
PR merge metrics
No merged PRs in 30d

Description

When a scene selector element has padding, the engine uses the content size _plus_ padding as the default size for child nodes.

An example may be seen at:
https://github.com/peacechen/famous-carousel

I've worked around the issue by wrapping the scene selector div within another container div. The container div has padding, while the inner scene selector div does not. To more easily see the issue, change the selector in `example/index.js` from `.slideshow` to `.slideshow-container`. Run `npm run example` to build and run the server.

Notice how `.famous-dom-renderer` is correctly sized to the container dimensions (sans padding), but the `.famous-dom-element` slide nodes are sized to the container dimensions _with_ padding.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.