[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
- Support for autoprefixer
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.
Fuux is purely Flexbox, then everything you can do with Flexbox, you can do with Fuux!
The basic structure to do anything with this library is:
<div class="flex-row|flex-column">
<div class="flex-100" ></div>
</div>
All Fuux's classes always starts 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 Fuux's basis are values from 5 to 100 (Multiples of five)
For example:
flex-basis: 5%
Or
flex-basis: 100%
Fuux 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 Fuux on your machine:
npm install
gulp
Contributions is very welcome. If you want to contribute just follow the steps:
- Fork this repository
- Make your changes :p
- Create a branch for your changes in this repository
- Create a Pull Request to your created branch as target
Enjoy!