Skip to content

Instantly share code, notes, and snippets.

@czajkovsky
Created December 17, 2014 19:16
Show Gist options
  • Save czajkovsky/834c80fcd92b4e1cb042 to your computer and use it in GitHub Desktop.
Save czajkovsky/834c80fcd92b4e1cb042 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
%ul.menu
%li.menu__item
%a{ href: '#1' }
%li.menu__item
%a{ href: '#2' }
%li.menu__item
%a{ href: '#3' }
%li.menu__item
%a{ href: '#4' }
%li.menu__item
%a{ href: '#5' }
%li.menu__item
%a{ href: '#5' }
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
.menu {
padding: 0;
max-width: 200px;
list-style: none;
&__item {
width: 50%;
padding-bottom: 50%;
display: block;
background: #f00;
float: left;
position: relative;
&:hover {
background: #0ff;
}
a {
position: absolute;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
}
}
}
.menu {
padding: 0;
max-width: 200px;
list-style: none;
}
.menu__item {
width: 50%;
padding-bottom: 50%;
display: block;
background: #f00;
float: left;
position: relative;
}
.menu__item:hover {
background: #0ff;
}
.menu__item a {
position: absolute;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
}
<ul class='menu'>
<li class='menu__item'>
<a href='#1'></a>
</li>
<li class='menu__item'>
<a href='#2'></a>
</li>
<li class='menu__item'>
<a href='#3'></a>
</li>
<li class='menu__item'>
<a href='#4'></a>
</li>
<li class='menu__item'>
<a href='#5'></a>
</li>
<li class='menu__item'>
<a href='#5'></a>
</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment