-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
154 lines (123 loc) · 2.93 KB
/
style.css
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*
All grid code is placed in a 'supports' rule (feature query) at the bottom of the CSS (Line 91).
The 'supports' rule will only run if your browser supports CSS grid.
Flexbox is used as a fallback so that browsers which don't support grid will still recieve an identical layout.
*/
@import url(https://fonts.googleapis.com/css?family=Montserrat:500);
:root {
/* Base font size */
font-size: 10px;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
min-height: 100vh;
background-color: #fafafa;
}
.container {
max-width: 100rem;
margin: 0 auto;
padding: 0 2rem 2rem;
position: relative;
display: blcok;
}
.heading {
font-family: "Montserrat", Arial, sans-serif;
font-size: 4rem;
font-weight: 500;
line-height: 1.5;
text-align: center;
padding: 3.5rem 0;
color: #1a1a1a;
}
.heading span {
display: block;
}
.gallery {
display: flex;
flex-wrap: wrap;
/* Compensate for excess margin on outer gallery flex items */
margin: -1rem -1rem;
}
.gallery-item {
cursor: pointer;
/* Minimum width of 24rem and grow to fit available space */
flex: 1 0 24rem;
/* Margin value should be half of grid-gap value as margins on flex items don't collapse */
margin: 1rem;
box-shadow: 0.3rem 0.4rem 0.4rem rgba(0, 0, 0, 0.4);
overflow: hidden;
position: relative;
}
.gallery-image {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 400ms ease-out;
position: relative;
}
.gallery-image:hover {
transform: scale(1.15);
}
/* SEARCH BAR CODE */
.search {
width: 100%;
position: relative;
display: flex;
}
.searchTerm {
width: 100%;
border: 3px solid #00B4CC;
border-right: none;
padding: 5px;
height: 36px;
border-radius: 5px 0 0 5px;
outline: none;
color: #9DBFAF;
}
.searchTerm:focus{
color: #00B4CC;
}
.searchButton {
width: 40px;
height: 36px;
border: 1px solid #00B4CC;
background: #00B4CC;
text-align: center;
color: #fff;
border-radius: 0 5px 5px 0;
cursor: pointer;
font-size: 20px;
}
/*Resize the wrap to see the search bar change!*/
.wrap{
min-width: 300px;
width: 30%;
position: relative;
left: 50%;
transform: translate(-50%, 0);
margin-bottom: 5em;
}
/*
The following rule will only run if your browser supports CSS grid.
Remove or comment-out the code block below to see how the browser will fall-back to flexbox styling.
*/
@supports (display: grid) {
.gallery {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
grid-gap: 2rem;
}
.gallery,
.gallery-item {
margin: 0;
}
}
/* invisible text */
#code {
display: none;
}