Skip to content

Instantly share code, notes, and snippets.

@dustinusey
Last active August 15, 2023 13:00
Show Gist options
  • Save dustinusey/d893a0f9503f248fe5f0c4340384c03f to your computer and use it in GitHub Desktop.
Save dustinusey/d893a0f9503f248fe5f0c4340384c03f to your computer and use it in GitHub Desktop.
AI Image Generator CSS
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Inter", sans-serif;
color: #ffffff;
background-color: #1B202D;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
header {
background-color: #242935;
padding: 2rem 2rem;
}
header h1 {
font-size: 1.8rem;
font-weight: 500;
}
section.recents {
display: none;
padding: 1rem 2rem 0;
}
section.recents h2 {
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.5);
}
section.recents ul {
display: flex;
justify-content: flex-start;
align-items: center;
gap: 1rem;
overflow: auto;
padding: 2rem 0;
}
section.recents ul::-webkit-scrollbar {
height: 0;
}
section.recents ul li {
list-style: none;
height: 86px;
width: 86px;
min-width: 86px;
background-color: rgba(255, 255, 255, 0.15);
border-radius: 50%;
overflow: hidden;
cursor: pointer;
opacity: 0.5;
transition: opacity 0.3s;
}
section.recents ul li:hover {
opacity: 1;
}
section.recents ul li img {
width: 100%;
}
main {
display: none;
padding: 2rem;
background-color: #242935;
}
main p {
font-size: 1.1rem;
}
main p.error {
color: #FF8080;
}
main p.error span {
margin-top: 0.5rem;
font-size: 0.8rem;
color: rgba(255, 255, 255, 0.25);
}
main p span {
color: #50B3D2;
font-weight: 500;
}
main img {
margin-top: 1rem;
border-radius: 1rem;
width: 100%;
max-width: 512px;
}
form {
margin: auto 2rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #3D4354;
padding: 0.5rem;
border-radius: 2rem;
}
form input {
font-size: 1.2rem;
width: 100%;
background-color: transparent;
border: none;
outline: none;
margin-left: 0.5rem;
color: white;
}
form input::-moz-placeholder {
color: rgba(255, 255, 255, 0.5);
}
form input::placeholder {
color: rgba(255, 255, 255, 0.5);
}
form button {
font-size: 1.2rem;
border-radius: 2rem;
padding: 0.5rem;
border: none;
background-color: #50B3D2;
color: #1B202D;
cursor: pointer;
}
form.disabled {
pointer-events: none;
opacity: 0.25;
}
@Gary-In-IT
Copy link

Thanks !

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