2026-04-14 17:41:39 +02:00

129 lines
2.2 KiB
CSS

/* ====================================================
Recreating the email field from https://webflow.com/cms. Just an experiment - not as cross-browser friendly as the original.
Changed:
- animated gradient bar to :after element
- flexbox for layout
==================================================== */
html {
box-sizing: border-box;
font-size: 10px;
}
*, *:before, *:after {
box-sizing: inherit;
}
body, ul, li {
margin: 0;
padding: 0;
}
li {
list-style: none;
}
p, h1, h2, h3, h4, h5, h6 {
margin-top: 0;
}
a {
text-decoration: none;
}
input {
border-style: none;
background: transparent;
outline: none;
}
button {
padding: 0;
background: none;
border: none;
outline: none;
}
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
background: transparent;
top: 50%;
left: 50%;
}
.demo-flex-spacer {
flex-grow: 1;
}
.container {
display: flex;
flex-direction: column;
height: 100vh;
max-width: 1600px;
padding: 0 15px;
margin: 0 auto;
}
.webflow-style-input {
position: relative;
display: none;
flex-direction: row;
width: 100%;
max-width: 450px;
margin: 0 auto;
border-radius: 2px;
padding: 1.4rem 2rem 1.6rem;
background: rgba(57, 63, 84, 0.6);
filter: url(#svgDropShadowFilter);
}
.webflow-style-button {
position: absolute;
right: 5px;
top: 50%
}
.webflow-style-input:after {
content: "";
position: absolute;
left: 0px;
right: 0px;
bottom: 0px;
z-index: 999;
height: 2px;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
background: linear-gradient(to right, #3C4E63, #526B86);
}
.webflow-style-input input {
flex-grow: 1;
color: #BFD2FF;
font-size: 1.8rem;
line-height: 2.4rem;
vertical-align: middle;
width:100%;
}
.webflow-style-text {
color: #b5cafc;
font-size: 1.6rem;
margin-bottom: 0.3rem;
vertical-align: middle;
}
.webflow-style-input input::-webkit-input-placeholder {
color: #8B95B7;
}
.webflow-style-input button {
color: #8B95B7;
font-size: 2.4rem;
line-height: 2.4rem;
vertical-align: middle;
transition: color 0.25s;
}
.webflow-style-input button:hover {
color: #BFD2FF;
}