Debian Codegraph @

owner-site/site/css/gridism.css

raw symbols SCIP
1 /*
2 * Gridism
3 * A simple, responsive, and handy CSS grid by @cobyism
4 * https://github.com/cobyism/gridism
5 */
6
7 /* Preserve some sanity */
8 .grid,
9 .unit {
10 -webkit-box-sizing: border-box;
11 -moz-box-sizing: border-box;
12 box-sizing: border-box;
13 }
14
15 /* Set up some rules to govern the grid */
16 .grid {
17 display: block;
18 clear: both;
19 }
20 .grid .unit {
21 float: left;
22 width: 100%;
23 padding: 10px;
24 }
25
26 /* This ensures the outer gutters are equal to the (doubled) inner gutters. */
27 .grid .unit:first-child { padding-left: 20px; }
28 .grid .unit:last-child { padding-right: 20px; }
29
30 /* Nested grids already have padding though, so let’s nuke it */
31 .unit .unit:first-child { padding-left: 0; }
32 .unit .unit:last-child { padding-right: 0; }
33 .unit .grid:first-child > .unit { padding-top: 0; }
34 .unit .grid:last-child > .unit { padding-bottom: 0; }
35
36 /* Let people nuke the gutters/padding completely in a couple of ways */
37 .no-gutters .unit,
38 .unit.no-gutters {
39 padding: 0 !important;
40 }
41
42 /* Wrapping at a maximum width is optional */
43 .wrap .grid,
44 .grid.wrap {
45 max-width: 978px;
46 margin: 0 auto;
47 }
48
49 /* Width classes also have shorthand versions numbered as fractions
50 * For example: for a grid unit 1/3 (one third) of the parent width,
51 * simply apply class="w-1-3" to the element. */
52 .grid .whole, .grid .w-1-1 { width: 100%; }
53 .grid .half, .grid .w-1-2 { width: 50%; }
54 .grid .one-third, .grid .w-1-3 { width: 33.3332%; }
55 .grid .two-thirds, .grid .w-2-3 { width: 66.6665%; }
56 .grid .one-quarter, .grid .w-1-4 { width: 25%; }
57 .grid .three-quarters, .grid .w-3-4 { width: 75%; }
58 .grid .one-fifth, .grid .w-1-5 { width: 20%; }
59 .grid .two-fifths, .grid .w-2-5 { width: 40%; }
60 .grid .three-fifths, .grid .w-3-5 { width: 60%; }
61 .grid .four-fifths, .grid .w-4-5 { width: 80%; }
62 .grid .golden-small, .grid .w-g-s { width: 38.2716%; } /* Golden section: smaller piece */
63 .grid .golden-large, .grid .w-g-l { width: 61.7283%; } /* Golden section: larger piece */
64
65 /* Utility classes */
66 .align-center { text-align: center; }
67 .align-left { text-align: left; }
68 .align-right { text-align: right; }
69 .pull-left { float: left; }
70 .pull-right { float: right; }
71
72 .show-on-mobiles {
73 display: none;
74 }
75
76 /* Responsive Stuff */
77 @media screen and (max-width: 568px) {
78 /* Stack anything that isn’t full-width on smaller screens */
79 .grid .unit {
80 width: 100% !important;
81 padding-left: 20px;
82 padding-right: 20px;
83 }
84 .unit .grid .unit {
85 padding-left: 0px;
86 padding-right: 0px;
87 }
88
89 /* Sometimes, you just want to be different on small screens */
90 .center-on-mobiles {
91 text-align: center !important;
92 }
93 .hide-on-mobiles {
94 display: none !important;
95 }
96 .show-on-mobiles {
97 display: block !important;
98 }
99 a .show-on-mobiles {
100 display: inline !important;
101 }
102 }
103
104 /* Expand the wrap a bit further on larger screens */
105 /*@media screen and (min-width: 1180px) {
106 .wrap .grid {
107 max-width: 1180px;
108 margin: 0 auto;
109 }
110 }*/