[UNDER DEVELOPMENT]
This is a Flexbox library to structure html templates easily!
I like the Angular Material library and the approach using directives based on Flexbox, is amazing really. But sometimes we can't to use Angular Material, because sometimes we should to use another library or template. Thinking about that, I have created this library to independently which template we've to use, we'll can to use Flexbox semanticly and easily, into any project. \o/
- Writes all using just css classes
- Support to
flex-direction
,justify-content
,align-items
,flex-wrap
andflex-basis
.- support to other properties is under development.
- Support to responsive classes
npm install --save flex-boy
<div class="green flex-column flex-15 flex-center">
<span>Sidenav</span>
</div>
<div class="flex-column flex-85">
<div class="coral flex-10 flex-center">
<span>Toolbar</span>
</div>
<div class="blue flex-90 flex-center">
<span>Content</span>
</div>
</div>
The result is:
The code above you can see here.
Flexboy is purely Flexbox, then everything you can do with Flexbox, you can do with Flexboy!
The basic structure to do anything with this library is:
<div class="flex-row|flex-column">
<div class="flex-100" ></div>
</div>
All Flexboy's classes always start with flex
prefix.
flex-direction: column
flex-direction: row
flex-wrap: wrap
justify-content: flex-start
align-items: flex-start
justify-content: flex-start
align-items: center
justify-content: flex-start
align-items: flex-end
justify-content: center
align-items: flex-start
justify-content: center
align-items: center
justify-content: center
align-items: flex-end
justify-content: flex-end
align-items: flex-start
justify-content: flex-end
align-items: center
justify-content: flex-end
align-items: flex-end
The Flexboy's basis are values from 5 to 100 (Multiples of five)
For example:
flex-basis: 5
Or
flex-basis: 100
Flexboy uses prefixes to manage which classes should be used for each resolution.
Add the responsive prefix to the classes to use on specific resolution, for example:
flex-[responsive prefix]-[property]
flex-md-center
Prefix | <= 767px | >= 768px | >= 768px and <= 991px | >= 992px | >= 992px and <= 1199px | >= 1200px |
---|---|---|---|---|---|---|
xs | V | X | X | X | X | X |
sm | X | V | V | V | V | V |
smx | X | X | V | X | X | X |
md | X | X | X | V | V | V |
mdx | X | X | X | X | V | X |
lg | X | X | X | X | X | V |
To run the Flexboy at your machine:
npm install
gulp
Contributions is very welcome. If you wanto to contribute jst follow the steps:
- Fork this repository
- Create a new branch to the changes at your forked repository
- Create a branch for your changes in this repository
- Create a Pull Request to your created branch as target