-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgrid.scss
124 lines (107 loc) · 2.37 KB
/
grid.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/******************************************************************
Site Name: The Creativity Architect
Author: CJM Termini
Stylesheet: CJMT Grid Stylesheet
Be light and don't over style since everything here will be
loaded by mobile devices. You want to keep it as minimal as
possible. This is called at the top of the main stylsheet
and will be used across all viewports.
******************************************************************/
@import 'tools/functions/breakpoint';
@import 'variables/colors/colors';
@import 'variables/grid/breakpoints';
@import 'variables/grid/variables';
@import 'variables/grid/containers';
@import 'tools/mixins/media-breakpoint';
@import 'tools/mixins/border-box';
@import 'tools/mixins/clearfix';
@import 'tools/mixins/container';
@import 'tools/mixins/grid/grid';
@import 'tools/mixins/grid/cols';
@import 'tools/mixins/grid/rows';
@import 'tools/mixins/grid/grid-breakpoint';
@import 'production';
$size: nth($grid-breakpoints, 1);
$name: nth($grid-breakpoints, 1);
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
/*********************
GENERAL STYLES
*********************/
*,
*::after,
*::before,
*:after,
*:before {
margin: 0;
padding: 0;
@include border-box();
}
body,
html {
font-size: 100%;
overflow: hidden;
margin: 0;
height: 100%;
width: 100%;
}
.page {
display: grid;
width: 100%;
height: 100%;
margin: 0;
padding: 0.25rem;
}
.container,
[class^='container-'],
.container-fluid {
@include make-container($gutter: $container-padding-x);
height: 100%;
padding-right: 1rem;
padding-left: 1rem;
overflow: hidden;
box-sizing: border-box;
&:after,
&:before {
line-height: 0;
display: table;
content: '';
}
&:after {
clear: both;
}
}
.grid {
@include make-grid();
> * {
border-width: medium;
border-style: solid;
}
@include grid-breakpoint();
}
.row {
list-style: none;
margin-left: -$grid-gutter;
@include make-row($gutter: $grid-gutter);
&:not(.row--flex) {
@include clearfix;
}
&.row-flex {
display: flex;
flex-wrap: wrap;
}
}
.col {
float: left;
padding-left: $grid-gutter;
box-sizing: border-box;
.row--gutterless & {
padding-left: 0;
}
@each $breakpoint in $breakpoints {
$name: nth($breakpoint, 1);
$declaration: nth($breakpoint, 2);
@media only screen and #{$declaration} {
@include grid-loop($name);
}
}
}