<div id="app"></div>
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
@import url('https://fonts.googleapis.com/css?family=Ubuntu:300,300i,400,400i,500,500i,700,700i');
$body-font: 'Ubuntu', sans-serif;
$brand-primary: #f15d34;
$brand-accent: #a9dee7;
$brand-dark-grey: #333333;
$brand-grey: #aaaaaa;
$brand-light-grey: #ebebeb;
*, *:before, *:after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body,
#app {
line-height: 1.3;
min-height: 100vh;
color: $brand-dark-grey;
font-family: $body-font;
}
a {
&:hover {
cursor: pointer;
}
}
.view-height {
min-height: 100vh;
}
.p-all {
padding: 20px;
}
.p-top {
padding-top: 20px;
}
.p-left {
padding-left: 20px;
}
.p-right {
padding-right: 20px;
}
.p-bottom {
padding-bottom: 20px;
}
.m-all {
margin: 20px;
}
.m-top {
margin-top: 20px;
}
.m-left {
margin-left: 20px;
}
.m-right {
margin-right: 20px;
}
.m-bottom {
margin-bottom: 20px;
}
/* Amazing flex utility classes */
[class*="flex"] {
display: flex;
&[class*="-direction-row"] {
flex-direction: row;
}
&[class*="-direction-column"] {
flex-direction: column;
}
&[class*="-align-start"] {
align-items: flex-start;
}
&[class*="-align-center"] {
align-items: center;
}
&[class*="-align-end"] {
align-items: flex-end;
}
&[class*="-justify-center"] {
justify-content: center;
}
&[class*="-space-between"] {
justify-content: space-between;
}
&[class*="-wrap"] {
flex-wrap: wrap;
}
}
.foresight-logo {
max-width: 150px;
transition: max-width 0.2s ease-in;
@media (min-width:601px) {
max-width: 200px;
}
@media (min-width:993px) {
max-width: 250px;
}
}
.foresight-search-bar {
width: 100%;
max-width: 500px;
position: relative;
input {
width: 100%;
height: 50px;
outline: none;
color: inherit;
display: block;
border-radius: 25px;
font-family: inherit;
font-weight: lighter;
padding: 0 25px 0 42px;
transition: all 0.2s ease-in;
border: solid 1px transparent;
box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 9px rgba(0,0,0,0.1);
&:focus {
border-color: $brand-accent;
box-shadow: 0 0 10px -1px $brand-accent;
~ i {
color: $brand-primary;
transform: rotate(90deg);
}
}
}
i {
top: 13px;
left: 13px;
position: absolute;
color: $brand-grey;
transition: all 0.2s ease-in;
}
::input-placeholder {
color: $brand-grey;
}
::placeholder {
color: $brand-grey;
}
:input-placeholder {
color: $brand-grey;
}
:placeholder {
color: $brand-grey;
}
}
.btn {
width: 100%;
margin: 5px;
color: white;
height: 50px;
outline: none;
padding: 0 25px;
border: solid 2px;
border-radius: 25px;
font-family: inherit;
transition: all 0.2s ease-in;
box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 9px rgba(0,0,0,0.1);
@media (min-width:360px) {
width: auto;
margin: none;
}
&.primary {
border-color: $brand-primary;
background-color: $brand-primary;
&:hover {
color: $brand-primary;
border-color: $brand-primary;
}
}
&.accent {
border-color: $brand-accent;
background-color: $brand-accent;
&:hover {
color: $brand-accent;
border-color: $brand-accent;
}
}
&.grey {
border-color: $brand-grey;
background-color: $brand-grey;
&:hover {
color: $brand-grey;
border-color: $brand-grey;
}
}
&.dark-grey {
border-color: $brand-dark-grey;
background-color: $brand-dark-grey;
&:hover {
color: $brand-dark-grey;
border-color: $brand-dark-grey;
}
}
&:hover {
cursor: pointer;
background-color: transparent;
}
&:active {
box-shadow: none;
}
}
.fixed-header {
top: 0;
left: 0;
right: 0;
padding: 20px;
position: fixed;
.profile-photo {
height: 40px;
margin-left: 10px;
border-radius: 20px;
box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 9px rgba(0,0,0,0.1);
}
}
.text-center {
text-align: center;
}
.text-grey {
color: $brand-grey;
}
.font-lighter {
font-weight: lighter;
}
View Compiled
class App extends React.Component {
constructor(props) {
super(props);
const currentYear = (new Date()).getFullYear();
this.state = {
currentYear
};
}
render() {
return (
<div>
<div className="flex-align-center-justify-center-direction-column view-height p-all">
<img className="foresight-logo m-bottom" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/312465/Foresight%20Logo-01.svg" />
<div className="foresight-search-bar fill-space m-bottom">
<input type="text" placeholder="Search the Pokémon Universe" />
<i className="material-icons">search</i>
</div>
<div className="m-bottom">
<button className="btn primary m-right">Search</button>
<button className="btn dark-grey">Browse PokéNews</button>
</div>
<div className="text-center text-grey font-lighter">
<div><small>© Cole Waldrip, {this.state.currentYear}</small></div>
<div><small>All rights reserved.</small></div>
</div>
</div>
</div>
);
}
}
ReactDOM.render(<App />, document.getElementById('app'));
View Compiled
This Pen doesn't use any external CSS resources.