Skip to content

Instantly share code, notes, and snippets.

@ssaunier
Last active September 24, 2022 14:03
Show Gist options
  • Save ssaunier/dbf2b76987ec62258d7ad51f0162a0ed to your computer and use it in GitHub Desktop.
Save ssaunier/dbf2b76987ec62258d7ad51f0162a0ed to your computer and use it in GitHub Desktop.
Boilerplate CSS code for React Giphy
#root > div {
display: flex;
height: 100vh;
}
.left-scene {
flex: 0 0 60%;
position: sticky;
display: flex;
flex-direction: column;
.form-search {
padding: 60px 60px 60px 120px;
border: none;
font-size: 2.6em;
box-shadow: none;
&:focus {
box-shadow: none;
}
}
&:before {
content: '\F002';
position: absolute;
top: 35px;
left: 60px;
font-family: FontAwesome;
font-size: 2.6em;
opacity: 0.4;
}
.selected-gif {
text-align: center;
display: flex;
flex-grow: 1;
height: calc(100vh - 232px);
background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.22'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
.gif {
max-width: 80%;
max-height: 80%;
margin: auto;
}
}
}
.right-scene {
flex: 0 0 40%;
background-color: #ecf0f1;
overflow: scroll;
.gif-list {
column-count: 2;
column-gap: 5px;
padding: 5px;
.gif {
width: 100%;
margin: 5px;
cursor: pointer;
}
}
}
@wilsoncelyCUC
Copy link

Hi @ssaunier
The search logo doesn't seem to show up, even with the hack posted previously
best regards
Wilson

@abcattell91
Copy link

when I used this fontawesome cdn below the search icon showed correctly

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A==" crossorigin="anonymous" referrerpolicy="no-referrer" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment