├── .DS_Store
├── 1-1-1-3.png
├── fluid.scss
├── fluid.css
├── LICENSE
├── semantic.html
├── README.md
├── fluid.html
└── fluid1.html
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vladocar/Flex-One/HEAD/.DS_Store
--------------------------------------------------------------------------------
/1-1-1-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vladocar/Flex-One/HEAD/1-1-1-3.png
--------------------------------------------------------------------------------
/fluid.scss:
--------------------------------------------------------------------------------
1 | $m: 15px;
2 | $n: 11;
3 |
4 | * {box-sizing: border-box}
5 |
6 | .main{display: flex; flex-flow: row wrap; width: 94%; margin: 0 auto}
7 |
8 | .fluid{flex:1; margin: 0 0 0 $m}
9 |
10 | @for $i from 2 through $n {
11 | .merge#{$i} {
12 | flex:#{$i}; margin:0 0 0 $m}
13 | }
14 |
15 | .clear,.columns{width: 100%}
16 |
17 | .nested,.columns{display: flex; flex-flow: row wrap; padding:0 !important; margin:0 !important; border: 0 !important}
18 |
--------------------------------------------------------------------------------
/fluid.css:
--------------------------------------------------------------------------------
1 | * {box-sizing: border-box}
2 |
3 | .main{display: flex; flex-flow: row wrap; width: 80%; margin: 0 auto}
4 |
5 | .fluid{flex:1}
6 |
7 | .merge2{flex:2}
8 | .merge3{flex:3}
9 | .merge4{flex:4}
10 | /* add more .merge classes if you need to */
11 |
12 | .fluid,.merge2,.merge3,.merge4 {margin:0 0 0 15px} /* optional gutter */
13 |
14 | .clear,.columns{width: 100%}
15 |
16 | .nested,.columns{display: flex; flex-flow: row wrap; padding:0 !important; margin:0 !important; border: 0 !important}
17 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Vladimir Carrer
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/semantic.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Flex One - 1 CSS Class System
8 |
37 |
38 |
39 |
40 |
41 |
Complete version of the CSS code is included in fluid.css and fluid.scss file
114 |
115 |
Conclusion
116 |
117 |
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.
118 |
119 |
License
120 |
This project is licensed under the MIT License
121 |
122 |
P.S
123 |
124 |
We can push the system even further and use only 2 classes .column and .row and make it more semantic.
125 |
126 | ```shell
127 |
128 | // Just 2 classes for the layout
129 |
130 | .column{display: flex; flex-flow: row wrap; width: 80%; margin: 0 auto}
131 | .row{flex:1}
132 |
133 | // Use the HTML like this:
134 |
135 |