All Projects → vladocar → Flex One

vladocar / Flex One

Licence: mit
1 CSS Class Layout System made with Flex

Projects that are alternatives of or similar to Flex One

strawberry
A new flexbox based CSS micro-framework.
Stars: ✭ 71 (+51.06%)
Mutual labels:  css3, css-framework
unitscss
UNITS is a simple and beautiful CSS component set.
Stars: ✭ 13 (-72.34%)
Mutual labels:  css3, css-framework
Stylizer
Stylizer is a flexible Css framework based on the visual aspect, the framework offers you a clean and easy work.
Stars: ✭ 44 (-6.38%)
Mutual labels:  css3, css-framework
Shorthand
Feature rich CSS framework for the new decade https://shorthandcss.com
Stars: ✭ 230 (+389.36%)
Mutual labels:  css-framework, css3
H5ui
Lightweight, elegant open source mobile UI style library.
Stars: ✭ 44 (-6.38%)
Mutual labels:  css-framework, css3
swatch
A lightweight, modern theming library based on CSS variables and the setter/getter pattern.
Stars: ✭ 14 (-70.21%)
Mutual labels:  css3, css-framework
atomize
A library of atomic CSS classes.
Stars: ✭ 51 (+8.51%)
Mutual labels:  css3, css-framework
Bootstrap4 Website
Website built with bootstrap 4 Framework
Stars: ✭ 124 (+163.83%)
Mutual labels:  css-framework, css3
Filters.css
CSS only library to apply color filters.
Stars: ✭ 318 (+576.6%)
Mutual labels:  css-framework, css3
Pattern.css
CSS only library to fill empty background with beautiful patterns.
Stars: ✭ 3,481 (+7306.38%)
Mutual labels:  css-framework, css3
Bahunya
10KB classless CSS framework with responsive typography, navbar, syntax highlighting, etc.
Stars: ✭ 170 (+261.7%)
Mutual labels:  css-framework, css3
Hartija Css Print Framework
Universal CSS for web printing
Stars: ✭ 509 (+982.98%)
Mutual labels:  css-framework, css3
Lazy
Kule Lazy4 / CSS Framework
Stars: ✭ 147 (+212.77%)
Mutual labels:  css-framework, css3
sass-structure
Sass folder structure => organizing project files.
Stars: ✭ 32 (-31.91%)
Mutual labels:  css3, css-framework
Box Css Framework
Box - CSS Framework
Stars: ✭ 138 (+193.62%)
Mutual labels:  css-framework, css3
Katana
Katana is CSS Layout System made with Flexbox
Stars: ✭ 57 (+21.28%)
Mutual labels:  css3, css-framework
Tacit
CSS Framework for Dummies, Without Classes
Stars: ✭ 1,344 (+2759.57%)
Mutual labels:  css-framework, css3
Snack
🍱 A minimal CSS framework for web.
Stars: ✭ 117 (+148.94%)
Mutual labels:  css-framework, css3
Smart Css Grid
SMART CSS GRID - CSS Framework
Stars: ✭ 291 (+519.15%)
Mutual labels:  css-framework, css3
Agilejs
AgileJS - The Css3 Creation Engine 🍖🌭🍔
Stars: ✭ 489 (+940.43%)
Mutual labels:  css-framework, css3

Flex One - 1 CSS Class System

Flex One is CSS Layout system based on one CSS class. This class: .fluid {flex:1}


With this .fluid {flex:1} you can build entire CSS grid system.

Let me show you how it works:

.main{display: flex; flex-flow: row wrap;  width: 80%; margin: 0 auto}

.fluid{flex:1}

.clear{width: 100%}

This CSS is the base for everything. With this CSS you can build solid Grid System.

<div class="fluid">33,3%</div>
<div class="fluid">33,3%</div>
<div class="fluid">33,3%</div>
<div class="clear"></div>

<div class="fluid">25%</div>
<div class="fluid">25%</div>
<div class="fluid">25%</div>
<div class="fluid">25%</div>
<div class="clear"></div>

Super simple, just add the number of columns you need. You can have infinite number of columns. Plus is fluid with natural responsiveness.

When you are finished add the .clear class.

Here is the Demo Grid

Here is clear dynamic example on how .fluid {flex:1} works

Limitations? Yes, many.

One of the biggest limitation is: you must use identical size columns. You can't have 1-1-1-3 or 1-2-1 grid.

We can fix these limitations by adding some CSS code:

.merge2 {flex:2}
.merge3 {flex:3}

Now we can have this 1-1-1-3:

<div class="fluid">1</div>
<div class="fluid">1</div>
<div class="fluid">1</div>
<div class="merge3">Merge 3</div>
<div class="clear"></div>

What about nested columns?

We can use this code for the nested columns:

.nested{display: flex; flex-flow: row wrap; padding:0 !important; margin:0 !important; border: 0 !important}
<div class="fluid nested">
    <div class="fluid">Nested column</div>
    <div class="fluid">Nested column</div>
</div>

Inside any fluid column we can insert any number of other fluid columns by adding the .nested class.

Ok. What about gutter?

The Gutter is optional. If you need it you can use something like this:

.fluid,.merge2,.merge3 {margin:0 0 0 15px}

// or maybe

.fluid,.merge2,.merge3,.merge4 {padding:0 10px}

Some other tweaks.

Here is also alternative to the .clear class:

<div class="fluid"></div>
<div class="fluid"></div>
<div class="fluid"></div>
<div class="clear"></div>

// Alternative columns class:

<div class="columns">
<div class="fluid"></div>
<div class="fluid"></div>
<div class="fluid"></div>
</div>

Demo Complete Grid

Complete version of the CSS code is included in fluid.css and fluid.scss file

Conclusion

Starting with the .fluid{flex:1} class and by adding few other CSS classes we can build infinite column grid system that is fluid and responsive. You need just few lines of CSS to build solid layout system.

License

This project is licensed under the MIT License

P.S

We can push the system even further and use only 2 classes .column and .row and make it more semantic.

// Just 2 classes for the layout

.column{display: flex; flex-flow: row wrap;  width: 80%; margin: 0 auto}
.row{flex:1}

// Use the HTML like this:

<div class="column">
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>
....
</div>

Demo Semantic Grid

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].