| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
flex-grow-based panel resizing tool for flexbox.
install with npm:
npm install --save flexize
and include the main script ( from local or cdn if available ):
<script src="index.min.js"></script>
create a flexize object with the flexbox you'd like to resize:
fx = new flexize({root: 'selector or the node instance'})
Constructor options:
flexize is used to support resizing of your panes inside a flexbox. To resize, you need something to drag called gutter. Simply add any number of gutters between panes you'd like to resize:
div(style="display:flex;align-items:stretch") div Adjustable by A .flexize-gutter(style="width:5px;background:#000") A div Adjustable by A .flexize-fixed Fixed Size div Adjustable by B .flexize-gutter(style="width:5px;background:#000") B div Adjustable by B
flexize uses flex-grow to resize panes so you should:
Here is another example with flex provided:
div(style="display:flex;align-items:stretch") div(style="flex:1 0 100px") .gutter(style="width:5px;background:#000") div(style="flex:0 0 100px")
Fixed nodes and Hidden nodes (with display set to none) will be ignored and all gutters will automatically look up for the next visible panes to resize.
You can place gutters inside a cell element:
.container
.cell
.gutter
.cell
.gutter
span content
.gutter
.cell
.gutter
flexize determines inner gutters based on their position within a cell:
Note that based on the selector you used, a gutter may affect grandparent nodes. use explicit selector to only select a desired child as gutter if necessary. See web/src/pug/nested for a live example.
MIT License
| Back | FazBrowse Home | New Git URL |