UNPKG

2.91 kBSCSSView Raw
1// Copyright (c) 2018 Uber Technologies, Inc.
2//
3// Permission is hereby granted, free of charge, to any person obtaining a copy
4// of this software and associated documentation files (the "Software"), to deal
5// in the Software without restriction, including without limitation the rights
6// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7// copies of the Software, and to permit persons to whom the Software is
8// furnished to do so, subject to the following conditions:
9//
10// The above copyright notice and this permission notice shall be included in
11// all copies or substantial portions of the Software.
12//
13// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19// THE SOFTWARE.
20
21/**
22 * Flexbox
23 */
24
25.f { display: flex; }
26
27.f1 { flex: 1; }
28
29.fac {
30 display: flex;
31 align-items: center;
32}
33
34.fjc {
35 display: flex;
36 justify-content: center;
37}
38
39.fje {
40 display: flex;
41 justify-content: flex-end;
42}
43
44.z {
45 display: flex;
46 align-items: center;
47 justify-content: center;
48}
49
50.fg {
51 flex-grow: 1;
52}
53
54.fw {
55 flex-wrap: wrap;
56}
57
58.fcol {
59 flex-direction: column;
60}
61
62/**
63 * Margins & Paddings
64 */
65
66.p { padding: 1rem; }
67.p-bottom { padding-bottom: 1rem; }
68.p-right { padding-right: 1rem; }
69.p-left { padding-left: 1rem; }
70.p-top { padding-top: 1rem; }
71
72.p2 { padding: 2rem; }
73.p2-bottom { padding-bottom: 2rem; }
74.p2-right { padding-right: 2rem; }
75.p2-left { padding-left: 2rem; }
76.p2-top { padding-top: 2rem; }
77
78.p4 {
79 padding: 4rem;
80 @media screen and (max-width: $mobile) {
81 padding: 0.5rem 1rem;
82 }
83}
84
85.p4-bottom { padding-bottom: 4rem; }
86.p4-right { padding-right: 4rem; }
87.p4-left { padding-left: 4rem; }
88.p4-top { padding-top: 4rem; }
89
90.ph { padding: 0 1rem; }
91.ph2 { padding: 0 2rem; }
92
93.mv1 {
94 > * + * {
95 margin-top: 1rem !important;
96 }
97}
98
99.mv2 {
100 > * + * {
101 margin-top: 2rem !important;
102 }
103}
104
105.mh1 {
106 > * + * {
107 margin-left: 1rem !important;
108 }
109}
110
111.m { margin: 1rem; }
112.m-bottom { margin-bottom: 1rem; }
113.m-right { margin-right: 1rem; }
114.m-left { margin-left: 1rem; }
115.m-top { margin-top: 1rem; }
116
117.m2 { margin: 2rem; }
118.m2-bottom { margin-bottom: 2rem; }
119.m2-right { margin-right: 2rem; }
120.m2-left { margin-left: 2rem; }
121.m2-top { margin-top: 2rem; }
122
123.m4 { margin: 4rem; }
124.m4-bottom { margin-bottom: 4rem; }
125.m4-right { margin-right: 4rem; }
126.m4-left { margin-left: 4rem; }
127.m4-top { margin-top: 4rem; }
128
129.hide {
130 display: none;
131}
132
133/**
134 * Responsive
135 */
136
137@media screen and (max-width: $mobile) {
138 .hide-mobile {
139 display: none;
140 }
141}