Forked from dominikschreiber/blog.fefe.de-material-redesign.css
Last active
December 24, 2015 02:47
-
-
Save mxub/8e018848dfcbc3e4cd2a to your computer and use it in GitHub Desktop.
userstyle for blog.fefe.de resembling the google material design (using deep purple 500)
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
/* | |
* $brand-primary: #673AB7; // deep purple 500 | |
*/ | |
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
padding-top: 56px; | |
background-color: #ececec; | |
font-size: 82.5%; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important; | |
} | |
/* this is the "top navigation" */ | |
body > h2 { | |
position: fixed; | |
top: 0; | |
z-index: 22; | |
display: block; | |
height: 56px; | |
width: 100%; | |
padding: 10px 72px; | |
background-color: #673ab7; | |
color: #ffffff; | |
line-height: 36px; | |
font-size: 1.5em; | |
font-weight: normal; | |
text-align: left; | |
} | |
body > h2:before { | |
content: ''; | |
position: fixed; | |
top: 0; | |
left: -2%; | |
display: block; | |
height: 56px; | |
width: 104%; | |
box-shadow: 0 0 4px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.28); | |
} | |
body > ul { | |
margin-bottom: 42px; | |
} | |
body > h2 a, | |
body > h2 a:link { | |
color: #ffffff; | |
text-decoration: none; | |
font-weight: normal; | |
line-height: 36px; | |
} | |
body > b:first-of-type { | |
position: fixed; | |
top: 10px; | |
left: calc((100% - 960px) / 2); | |
z-index: 23; | |
display: block; | |
padding-left: 22px; | |
line-height: 36px; | |
color: #ffffff; | |
font-weight: normal; | |
} | |
body > p[style]:first-of-type { | |
/* fefe sets "questions? answers!" with style=text-align:right, | |
don't want to apply it to the imprint where this paragraph isn't there */ | |
position: fixed; | |
margin-top: 0; | |
top: 10px; | |
right: 30px; | |
z-index: 23; | |
color: #ffffff; | |
line-height: 36px; | |
} | |
body > p:first-of-type a:not([href^="/?"]), | |
body > p:first-of-type a:link:not([href^="/?"]) { | |
color: #ffffff; | |
} | |
/* these are the "main content elements" */ | |
body > h3, | |
body > ul, | |
/* i,p for the imprint */ | |
body > i, | |
body > p, | |
/* form for the search box */ | |
body > form, | |
/* lists */ | |
body > ol { | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
max-width: 960px; | |
} | |
/* this is a day header */ | |
body > h3, | |
/* i for the imprint */ | |
body > i { | |
margin-top: 20px; | |
} | |
body > h3, | |
body > a > h3 { | |
padding-left: 22px; | |
padding-bottom: 10px; | |
color: #999; | |
font-size: 82.5%; | |
font-weight: normal; | |
} | |
/* this is a single blog post */ | |
body > ul > li, | |
/* i,p for the imprint */ | |
body > i, | |
body > p, | |
/* form for the search box */ | |
body > form, | |
/* lists */ | |
body > ol { | |
padding: 16px 24px; | |
border: 0 solid #e5e5e5; | |
margin-bottom: 20px; | |
background-color: #ffffff; | |
list-style-type: none; | |
box-shadow: 0 0 2px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.24); | |
} | |
body > p:empty { | |
display: none; | |
} | |
/* reset body > p for not affected paragraphs */ | |
body > p:empty, | |
body > p[style]:first-of-type { | |
padding: 0; | |
background: none; | |
border: none; | |
box-shadow: none; | |
} | |
body > ul > li + li { | |
border-top-width: 1px; | |
} | |
body > ul > li, | |
body > ul > li > * { | |
line-height: 1.5; | |
} | |
p, | |
body > ol > li + li, | |
pre { | |
margin-top: 12px; | |
} | |
/* updates */ | |
[u] { | |
margin: 16px -24px -16px -24px; | |
padding: 16px 24px; | |
background-color: #f6f6f6; | |
border-top: 1px solid #e5e5e5; | |
} | |
blockquote [u] { | |
position: relative; | |
margin-left: -36px; | |
padding: 0 20px 0 36px; | |
border-top: none; | |
} | |
blockquote [u]+[u] { | |
padding-top: 12px; | |
} | |
blockquote [u]:before { | |
content: ''; | |
position: absolute; | |
top: 0; | |
left: 20px; | |
display: block; | |
width: 1px; | |
height: 100%; | |
background-color: #673ab7; | |
} | |
blockquote [u]:last-child { | |
margin-bottom: 16px; | |
padding-bottom: 16px; | |
border-bottom: 1px solid #e5e5e5; | |
} | |
blockquote [u]:last-child:before { | |
height: calc(100% - 16px); | |
} | |
a, | |
a:link { | |
color: #673AB7; | |
} | |
a[href^="?ts"]{ | |
display: none; | |
} | |
blockquote { | |
color: #999; | |
border-left: 1px solid #673AB7; | |
margin: 12px 0; | |
padding-left: 11px; | |
} | |
/* the "ganzer monat" button */ | |
body > div[style]:first-of-type { | |
color: transparent; | |
} | |
body > div[style]:first-of-type a { | |
display: inline-block; | |
border: 0; | |
border-radius: 2px; | |
line-height: 2.5; | |
padding: 0 16px; | |
color: #fff; | |
text-transform: uppercase; | |
font-weight: bold; | |
text-decoration: none; | |
background-color: #673AB7; | |
cursor: pointer; | |
transition: box-shadow .2s cubic-bezier(.4,0,.2,1), | |
background-color .2s cubic-bezier(.4,0,.2,1); | |
-webkit-box-shadow: 0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24); | |
-moz-box-shadow: 0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24); | |
box-shadow: 0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24); | |
} | |
body > div[style]:first-of-type a:hover { | |
-webkit-box-shadow: 0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28); | |
-moz-box-shadow: 0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28); | |
box-shadow: 0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28); | |
background-color: #6033B0; | |
} | |
/* the "proudly made without..." paragraph */ | |
body > div[style]:last-of-type { | |
text-align: center !important; | |
color: #999; | |
margin: 20px 0 42px; | |
line-height: 1.5; | |
} | |
/* non-front-pages (e.g. imprint, about) (here everything is direcly below body) */ | |
body > p + p, | |
body > p + form, | |
body > form + p, | |
body > ol { | |
margin-top: -20px; | |
} | |
ol > li { | |
list-style-type: decimal; | |
margin-left: 20px; | |
} | |
pre { | |
background: #f6f6f6; | |
padding: 10px 0; | |
border-radius: 2px; | |
margin-bottom: 12px; | |
font-family: Source Code Pro, Menlo, monospace; | |
font-size: 82.5%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment