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

Feature: box border sides #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

edzillion
Copy link
Contributor

@edzillion edzillion commented Dec 20, 2023

Hi Potch, I really commend your work on this module - it works really well and I started playing around with it and realised it could be used for converting markdown to playdate.

In the process of getting that all working I made a few additions to the playout code - I will add them as separate PRs so that you can evaluate them separately.

  • (this one) Adding borderLeft, borderRight, borderTop and borderBottom properties to the Box element. This allows me to mimic markdown blockquote styling using a left border only. Setting border will override these props.

  • Allowing scrolling, which scrolls in the direction of the direction property of the root box node. I have this working reasonably well, it has issues with flex elements when the parent hasn't got a set or inherited width or maxWidth but that makes sense to me. I noticed you had an unused property scroll so perhaps you've thought about this already. I will clean that code up and make a separate PR for it unless you have any objections.

  • Also potentially some small changes to allow better encapsulating of modules based on playout.

@potch
Copy link
Owner

potch commented May 3, 2024

@edzillion thanks so much for the PR! sorry it's been so long since you submitted it. I've been toying with scrolling in my head (as you observed with the unused var) and your instinct for how it works more or less matches my thoughts- I'd be curious to see your approach- I'm leaning toward rendering all content naively out to an image and just grabbing a crop based on scroll offset, with possible optimizations in the future.

As for this PR- I think it's more or less right, but I'm not 100% on how it interacts with borderRadius. Do you have ideas/thoughts/screenshots?

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

Successfully merging this pull request may close these issues.

2 participants