π π flexbox library to create amazing layouts
- 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 fuux
<div class="green fx-column fx-15 fx-center">
<span>Sidenav</span>
</div>
<div class="fx-column fx-85">
<div class="coral fx-10 fx-center">
<span>Toolbar</span>
</div>
<div class="blue fx-90 fx-center">
<span>Content</span>
</div>
</div>
The result is:
The code above you can see here.
Fuux is purely Flexbox, so everything you can do with Flexbox, you can do with Fuux!
The basic structure to do anything:
<div class="fx-row|fx-column">
<div class="fx-100" ></div>
</div>
All Fuux's classes always starts with fx
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:
fx-[responsive prefix]-[property]
fx-md-center
Prefix | Media |
---|---|
xs | (max-width: 599px) |
gt-xs | (min-width: 600px) |
sm | (min-width: 600px) and (max-width: 959px) |
gt-sm | (min-width: 960px) |
md | (min-width: 960px) and (max-width: 1279px) |
gt-md | (min-width: 1280px) |
lg | (min-width: 1280px) and (max-width: 1919px) |
gt-lg | (min-width: 1920px) |
xl | (min-width: 1920px) and (max-width: 5000px) |
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!