Created
May 3, 2017 20:47
-
-
Save fortmarek/141fb9bbc2df231de7883f4340191868 to your computer and use it in GitHub Desktop.
medium-native-explore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Note: 1px = 1dp in this css */ | |
/* == Colors == */ | |
body { | |
background-color: #FFFFFF; | |
} | |
.title-link { | |
color: #000000; | |
} | |
.button { | |
background-color: #F41A43; | |
} | |
.button-text, | |
.button-link { | |
color: #FFFFFF; | |
} | |
.price, | |
.reviews { | |
color: rgba(0,0,0,0.5); | |
} | |
.reviews svg { | |
fill: rgba(0,0,0,0.7); | |
} | |
.url-link { | |
color: rgba(0,0,0,0.3); | |
} | |
.body { | |
color: rgba(0,0,0,0.7); | |
} | |
/* == Fonts == */ | |
body { | |
font-family: "Roboto-Regular", Arial, sans-serif; | |
font-weight: normal; | |
font-size: 10px; | |
} | |
@media (min-width: 360px) and (min-height: 150px) { | |
body { | |
font-size: 12px; | |
} | |
} | |
@media (min-width: 700px) and (min-height: 150px) { | |
body { | |
font-size: 16px; | |
} | |
} | |
.title { | |
font-size: 1.3em; | |
line-height: 1.35em; | |
} | |
.button { | |
font-size: 1.3em; | |
} | |
.body, | |
.price, | |
.reviews, | |
.url { | |
font-size: 1.1em; | |
line-height: 1.15em; | |
} | |
@media (min-width: 360px) and (min-height: 150px) { | |
.title { | |
font-size: 1.3em; | |
line-height: 1.35em; | |
} | |
.button { | |
font-size: 1.3em; | |
} | |
} | |
/* == Layout == */ | |
.app-icon, | |
.image { | |
float: left; | |
margin: 0 8px 4px 8px; | |
padding: 0; | |
} | |
.button { | |
display: block; | |
float: right; | |
margin: 8px 8px 0 4px; | |
position: relative; | |
top: 0; | |
} | |
.title { | |
margin-bottom: 5px; | |
padding: 5px 0 0 0; | |
} | |
.body { | |
margin: 8px; | |
} | |
@media (min-width: 360px) { | |
.body { | |
clear: left; | |
} | |
} | |
/** | |
* == App install ad layout == | |
* App store, price, and reviews are | |
* optional elements. | |
*/ | |
.app-store { | |
position: absolute; | |
right: 8px; | |
bottom: 12px; | |
} | |
.price, | |
.reviews { | |
display: inline-block; | |
margin: 2px 4px 0 0; | |
} | |
.rating-stars, | |
.reviews-count { | |
display: inline; | |
} | |
.reviews-count { | |
margin-left: 2px; | |
} | |
/* == Content ad layout == */ | |
.url { | |
clear: right; | |
padding: 4px 0; | |
} | |
@media (min-width: 700px) and (min-height: 150px) { | |
.url { | |
clear: none; | |
} | |
} | |
/* == Body == */ | |
.app-promo-ads .body { | |
/** | |
* max-width | |
* = total width - padding - app store | |
*/ | |
max-width: 70%; | |
max-width: calc(100% - 80px); | |
} | |
@media (min-width: 700px) and (min-height: 150px) { | |
.app-promo-ads .body { | |
max-width: calc(100% - 140px); | |
} | |
} | |
/* == App icon, content image == */ | |
.app-icon img, | |
.image img { | |
height: 70px; | |
width: 70px; | |
} | |
.app-icon img { | |
border-radius: 20%; | |
} | |
/* == Title == */ | |
.title { | |
display: block; | |
text-align: left; | |
} | |
/* == Button == */ | |
.button { | |
border: none; | |
box-shadow: 0 0 2px rgba(0,0,0,0.12), 0 2px 2px rgba(0,0,0,0.24); | |
} | |
.button-link { | |
display: block; | |
position: relative; | |
padding: 0 1em; | |
} | |
.button svg { | |
display: none; | |
} | |
.button { | |
height: 2.5em; | |
border-radius: 8px; | |
} | |
.button-text { | |
display: block; | |
line-height: 2.6em; | |
text-align: center; | |
min-width: 50px; | |
max-width: 78px; | |
text-align: center; | |
text-overflow: ellipsis; | |
overflow: hidden; | |
white-space: nowrap; | |
} | |
@media (min-width: 360px) { | |
.button-link { | |
padding: 0 1.5em; | |
} | |
.button-text { | |
max-width: 100px; | |
} | |
} | |
@media (min-width: 700px) and (min-height: 150px) { | |
.button { | |
height: 2em; | |
} | |
.button-text { | |
line-height: 2em; | |
max-width: 180px; | |
} | |
} | |
/* == App store == */ | |
.app-store { | |
border: none; | |
} | |
.app-store a { | |
display: inline-block; | |
height: 1.4em; | |
} | |
.app-store img { | |
height: 100%; | |
width: auto; | |
} | |
/* == Price == */ | |
.price { | |
/* add more customizations here */ | |
} | |
/* == App rating == */ | |
.reviews { | |
border: none; | |
line-height: 1.1em; | |
} | |
.rating-star { | |
display: inline; | |
float: left; | |
height: 1.1em; | |
width: 1.1em; | |
} | |
/* == Url == */ | |
.url { | |
white-space: nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
} | |
/* == Attribution == */ | |
.attribution { | |
background-color: #F41A43; | |
border-radius: 0 0 3px 0; | |
text-transform: uppercase; | |
color: #ffffff; | |
display: table; | |
font-size: 11px; | |
line-height: 15px; | |
padding: 1px 4px; | |
position: absolute; | |
top: 0; | |
left: 0; | |
} | |
.rtl .attribution { | |
left: auto; | |
right: 0; | |
} | |
/* == Other == */ | |
.ads a { | |
text-decoration: none; | |
} | |
.ads, .ad { | |
/** | |
* DO NOT TOUCH OR REMOVE | |
* Will break image rendering | |
*/ | |
height: 100%; | |
width: 100%; | |
padding: 0; | |
word-wrap: break-word; | |
} | |
.ad { | |
/* Padding for attribution */ | |
padding-top: 23px; | |
height: calc(100% - 23px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment