_examples/xkcdsearch/web/style.css (159 lines of code) (raw):
@font-face {
font-family: 'xkcd';
src: url('/assets/fonts/xkcd-script.woff') format('woff');
}
[v-cloak] {display: none}
html, body { height: 100%; }
body {
color: #222;
background: #fff;
font-family: 'xkcd', monospace;
font-size: 110%;
margin: 0;
padding: 0 2em 0 2em;
}
#app {
width: 100%;
height: 100%;
}
#app.loading #loading-app,
#app #app-error {
color: #444;
background: rgba(255,255,255,0.9);
text-align: center;
padding-top: 10em;
width: 100%;
height: 100%;
display: inline-block !important;
position: absolute;
top: 0; left: 0;
}
#app #app-error {
color: #e60830;
background: rgba(255,255,255,0.95);
}
#app #loading-results {
color: #999;
font-size: 12px;
text-align: center;
padding: 0 1.5em;
margin: 0 0 1.5em 0;
}
#search-form {
margin: 1em 0 1em 0;
width: 100%;
position: relative;
}
#search-form input[type=text] {
font-family: 'xkcd', monospace;
font-size: 18px;
border: none;
border-bottom: 2px #222 solid;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
padding: 1em;
width: 100%;
box-sizing: border-box;
}
#search-form input[type=text]:focus {
background: #f5f7fa;
outline: none;
}
#search-form .total {
padding: 0; margin: 0;
position: absolute;
right: 0;
}
#search-form .total .label {
color: #999;
font-size: 12px;
margin-right: 0.25em;
}
#search-form .total .content {
color: #444;
font-size: 15px;
}
.no-results {
color: #444;
font-size: 20px;
text-align: center;
padding: 1em;
}
.result {
border: none;
border-bottom: 4px solid #222;
margin: 0 0 0.5em 0;
padding: 1em 1em;
width: 100%;
max-height: 300px;
display: inline-block;
overflow: hidden;
transition: max-height 0.5s ease-in-out;
position: relative;
box-sizing: border-box;
}
.result.expanded {
max-height: 100%;
}
.result h2,
.result p {
padding: 0;
margin: 0 0 0.25em 0;
position: relative;
}
.result h2 {
margin-bottom: 0.5em;
}
.result .title {
font-size: 22px;
font-weight: normal;
font-variant: small-caps;
}
.result .published {
color: #999;
font-size: 14px;
font-size: 80;
font-weight: 100;
margin-left: 1em;
}
.result .highlights {
width: 20em;
position: absolute;
top: 50%; right: 0;
}
.result .highlights .label {
color: #999;
font-size: 12px;
}
.result .highlights .content {
color: #444;
font-size: 14px;
}
.result em {
font-style: normal;
padding: 0; margin: 0;
display: inline-block;
position: relative;
}
.result em {
background: url('/assets/images/middle.png') repeat-x;
}
.result em::before,
.result em::after {
content: "\00a0";
width: 16px;
height: 28px;
display: inline-block;
}
.result em::before {
background: url('/assets/images/left.png') no-repeat;
}
.result em::after {
background: url('/assets/images/right.png') no-repeat;
}
.result .highlights em { height: 22px; }
.result .highlights em,
.result .highlights em::before,
.result .highlights em::after {
background-size: 100% 60%;
}