Skip to content

Instantly share code, notes, and snippets.

@trub
Created April 23, 2014 20:35
Show Gist options
  • Save trub/11231464 to your computer and use it in GitHub Desktop.
Save trub/11231464 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
body
ul.menu
li(title='home')
a.home(href='#') home
li(title='search')
a.search(href='#') search
li(title='pencil')
a.pencil(href='#') pencil
li(title='about')
a.active.about(href='#') about
li(title='archive')
a.archive(href='#') archive
li(title='contact')
a.contact(href='#') contact
// ----
// Sass (v3.3.5)
// Compass (v1.0.0.alpha.18)
// ----
@import url("//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css");
.menu {
position: fixed;
top: 0;
left: 0;
height: 100%;
list-style-type: none;
margin: 0;
padding: 0;
background: #fff4f5;
}
.menu li a {
display: block;
height: em;
width: 10em;
text-indent: 6em;
line-height: 5em;
text-align: center;
color: #ff5c62;
background: #fff4f5;
position: relative;
border-bottom: 1px solid #ffe2e3;
text-decoration: none;
transition: background 0.3s ease-in-out;
}
.menu li a:before {
font-family: FontAwesome;
text-indent: -2em;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
font-size: 1.4em;
}
.menu li a.search:before {
content: "\f002";
}
.menu li a.archive:before {
content: "\f187";
}
.menu li a.pencil:before {
content: "\f040";
}
.menu li a.contact:before {
content: "\f003";
}
.menu li a.about:before {
content: "\f007";
}
.menu li a.home:before {
content: "\f015";
}
.menu li a:hover{
background: #ff5c62;
color: #fff;
}
@media screen and (max-height: 34em){
.menu li{
font-size:70%;
}
}
@import url("//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css");
.menu {
position: fixed;
top: 0;
left: 0;
height: 100%;
list-style-type: none;
margin: 0;
padding: 0;
background: #fff4f5;
}
.menu li a {
display: block;
height: em;
width: 10em;
text-indent: 6em;
line-height: 5em;
text-align: center;
color: #ff5c62;
background: #fff4f5;
position: relative;
border-bottom: 1px solid #ffe2e3;
text-decoration: none;
transition: background 0.3s ease-in-out;
}
.menu li a:before {
font-family: FontAwesome;
text-indent: -2em;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
font-size: 1.4em;
}
.menu li a.search:before {
content: "\f002";
}
.menu li a.archive:before {
content: "\f187";
}
.menu li a.pencil:before {
content: "\f040";
}
.menu li a.contact:before {
content: "\f003";
}
.menu li a.about:before {
content: "\f007";
}
.menu li a.home:before {
content: "\f015";
}
.menu li a:hover {
background: #ff5c62;
color: #fff;
}
@media screen and (max-height: 34em) {
.menu li {
font-size: 70%;
}
}
<body>
<ul class="menu">
<li title="home"><a href="#" class="home">home</a></li>
<li title="search"><a href="#" class="search">search</a></li>
<li title="pencil"><a href="#" class="pencil">pencil</a></li>
<li title="about"><a href="#" class="active about">about</a></li>
<li title="archive"><a href="#" class="archive">archive</a></li>
<li title="contact"><a href="#" class="contact">contact </a></li>
</ul>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment