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

[Enhancement] Support CSS values for defaultSize, maxSize & minSize #277

Closed
11xdeveloper opened this issue Jan 31, 2024 · 1 comment
Closed

Comments

@11xdeveloper
Copy link

The Panel component should be able to take CSS values for defaultSize, maxSize & minSize

e.g.

// ...
<Panel
    defaultSize='10svw'
    {/* ... */}
>
// ...

Much more convenient not having to use window.innerWidth / window.innerHeight.

As well as more accurate when it comes to newer values such as dvw, dvh, swv, svh, etc.

@11xdeveloper 11xdeveloper changed the title Support CSS values for defaultSize, maxSize & minSize [Enhancement] Support CSS values for defaultSize, maxSize & minSize Jan 31, 2024
@bvaughn
Copy link
Owner

bvaughn commented Jan 31, 2024

Panel size constraints are exclusively percentages. No CSS unites– pixel or otherwise– are supported.

The FAQ mentions this:

Can panel sizes be specified in pixels?

No. Pixel-based constraints added significant complexity to the initialization and validation logic and so I've decided not to support them. You may be able to implement a version of this yourself following a pattern like this but it is not officially supported by this library.

@bvaughn bvaughn closed this as completed Jan 31, 2024
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

No branches or pull requests

2 participants