Layout Modes

Magnet position items depending on a layout mode. A layout mode, follows its own layout logic.

Grid

Magnet lays out items using a bin-packing algorithm, creating gapless layouts. By default, this is the layout mode used.

Hydrogenium 1 H 1.008
Helium 2 He 4.002
Lithium 3 Li 6.94
Beryllium 4 Be 9.012
Borium 5 B 10.81
Carbonium 6 C 12.011
Nitrogenium 7 N 14.007
Oxygenium 8 O 15.999
Fluorum 9 F 18.998
Neon 10 Ne 20.179
Natrium 11 Na 22.989
Magnesium 12 Mg 24.305
Aluminium 13 Al 26.981
Silicium 14 Si 28.085
Phosphorus 15 P 30.973
Sulphur 16 S 32.06
Chlorum 17 Cl 35.45
Argon 18 Ar 39.948
Kalium 19 K 39.098
Calcium 20 Ca 40.078
Scandium 21 Sc 44.955
Titanium 22 Ti 47.867
Vanadium 23 V 50.941
Chromium 24 Cr 51.996
Manganum 25 Mn 54.938
Ferrum 26 Fe 55.845
Cobaltum 27 Co 58.933
Niccolum 28 Ni 58.693
Cuprum 29 Cu 63.546
Zincum 30 Zn 65.38
Gallium 31 Ga 69.723
Germanium 32 Ge 72.63
Arsenicum 33 As 74.921
Selenium 34 Se 78.971
Bromum 35 Br 79.904
Krypton 36 Kr 83.798

Rows

Magnet lays out items into rows. Rows progress vertically when a row is completed. Arranges items similar to a grid using CSS floats.

Hydrogenium 1 H 1.008
Helium 2 He 4.002
Lithium 3 Li 6.94
Beryllium 4 Be 9.012
Borium 5 B 10.81
Carbonium 6 C 12.011
Nitrogenium 7 N 14.007
Oxygenium 8 O 15.999
Fluorum 9 F 18.998
Neon 10 Ne 20.179
Natrium 11 Na 22.989
Magnesium 12 Mg 24.305
Aluminium 13 Al 26.981
Silicium 14 Si 28.085
Phosphorus 15 P 30.973
Sulphur 16 S 32.06
Chlorum 17 Cl 35.45
Argon 18 Ar 39.948
Kalium 19 K 39.098
Calcium 20 Ca 40.078
Scandium 21 Sc 44.955
Titanium 22 Ti 47.867
Vanadium 23 V 50.941
Chromium 24 Cr 51.996
Manganum 25 Mn 54.938
Ferrum 26 Fe 55.845
Cobaltum 27 Co 58.933
Niccolum 28 Ni 58.693
Cuprum 29 Cu 63.546
Zincum 30 Zn 65.38
Gallium 31 Ga 69.723
Germanium 32 Ge 72.63
Arsenicum 33 As 74.921
Selenium 34 Se 78.971
Bromum 35 Br 79.904
Krypton 36 Kr 83.798

Columns

Magnet lays out items into columns. Columns progress horizontally when a column is completed.

Hydrogenium 1 H 1.008
Helium 2 He 4.002
Lithium 3 Li 6.94
Beryllium 4 Be 9.012
Borium 5 B 10.81
Carbonium 6 C 12.011
Nitrogenium 7 N 14.007
Oxygenium 8 O 15.999
Fluorum 9 F 18.998
Neon 10 Ne 20.179
Natrium 11 Na 22.989
Magnesium 12 Mg 24.305
Aluminium 13 Al 26.981
Silicium 14 Si 28.085
Phosphorus 15 P 30.973
Sulphur 16 S 32.06
Chlorum 17 Cl 35.45
Argon 18 Ar 39.948
Kalium 19 K 39.098
Calcium 20 Ca 40.078
Scandium 21 Sc 44.955
Titanium 22 Ti 47.867
Vanadium 23 V 50.941
Chromium 24 Cr 51.996
Manganum 25 Mn 54.938
Ferrum 26 Fe 55.845
Cobaltum 27 Co 58.933
Niccolum 28 Ni 58.693
Cuprum 29 Cu 63.546
Zincum 30 Zn 65.38
Gallium 31 Ga 69.723
Germanium 32 Ge 72.63
Arsenicum 33 As 74.921
Selenium 34 Se 78.971
Bromum 35 Br 79.904
Krypton 36 Kr 83.798

Horizontal

Magnet lays out items horizontally. Horizontal layout modes need the container to have a height value:

//Both are valid values
.grid { height: 50%; }
.grid { height: 500px; }
Hydrogenium 1 H 1.008
Helium 2 He 4.002
Lithium 3 Li 6.94
Beryllium 4 Be 9.012
Borium 5 B 10.81
Carbonium 6 C 12.011
Nitrogenium 7 N 14.007
Oxygenium 8 O 15.999
Fluorum 9 F 18.998
Neon 10 Ne 20.179

Vertical

Magnet lays out items vertically.

Hydrogenium 1 H 1.008
Helium 2 He 4.002
Lithium 3 Li 6.94
Beryllium 4 Be 9.012
Borium 5 B 10.81
Carbonium 6 C 12.011
Nitrogenium 7 N 14.007
Oxygenium 8 O 15.999
Fluorum 9 F 18.998
Neon 10 Ne 20.179