Skip to content

Instantly share code, notes, and snippets.

@cattermo
Created May 2, 2014 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cattermo/11468623 to your computer and use it in GitHub Desktop.
Save cattermo/11468623 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<ul class="mandate-overview">
<li class="mandate-overview__circle"><span class="mandate-overview__party">V</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">S</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">MP</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">SD</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">PP</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">JL</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">C</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">FP</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">KD</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">M</span></li>
</ul>
// ----
// Sass (v3.3.6)
// Compass (v1.0.0.alpha.18)
// ----
.mandate-overview {
list-style: none;
max-width: 350px;
}
$max-size: 300px;
$mandate-size: $max-size/349;
@mixin mandate($nr-of-mandate) {
$size_0: $mandate-size*$nr-of-mandate;
width: $size_0;
height: $size_0;
}
.mandate-overview__circle {
border-radius: 100%;
display: table;
vertical-align: middle;
background-color: red;
margin: 5px;
float:left;
box-sizing: border-box;
&:nth-child(1) {
@include mandate(19);
}
&:nth-child(2) {
@include mandate(112);
}
&:nth-child(3) {
@include mandate(25);
}
&:nth-child(4) {
@include mandate(20);
}
&:nth-child(5) {
@include mandate(0);
display:none;
}
&:nth-child(6) {
@include mandate(0);
display: none;
}
&:nth-child(7) {
@include mandate(23);
}
&:nth-child(8) {
@include mandate(24);
}
&:nth-child(9) {
@include mandate(19);
}
&:nth-child(10) {
@include mandate(107);
}
&:nth-child(2n + 1) {
margin-top: 25px;
}
}
.mandate-overview__party {
display: table-cell;
vertical-align: middle;
width: 100%;
height: 100%;
text-align: center;
}
.mandate-overview {
list-style: none;
max-width: 350px;
}
.mandate-overview__circle {
border-radius: 100%;
display: table;
vertical-align: middle;
background-color: red;
margin: 5px;
float: left;
box-sizing: border-box;
}
.mandate-overview__circle:nth-child(1) {
width: 16.33238px;
height: 16.33238px;
}
.mandate-overview__circle:nth-child(2) {
width: 96.27507px;
height: 96.27507px;
}
.mandate-overview__circle:nth-child(3) {
width: 21.48997px;
height: 21.48997px;
}
.mandate-overview__circle:nth-child(4) {
width: 17.19198px;
height: 17.19198px;
}
.mandate-overview__circle:nth-child(5) {
width: 0px;
height: 0px;
display: none;
}
.mandate-overview__circle:nth-child(6) {
width: 0px;
height: 0px;
display: none;
}
.mandate-overview__circle:nth-child(7) {
width: 19.77077px;
height: 19.77077px;
}
.mandate-overview__circle:nth-child(8) {
width: 20.63037px;
height: 20.63037px;
}
.mandate-overview__circle:nth-child(9) {
width: 16.33238px;
height: 16.33238px;
}
.mandate-overview__circle:nth-child(10) {
width: 91.97708px;
height: 91.97708px;
}
.mandate-overview__circle:nth-child(2n + 1) {
margin-top: 25px;
}
.mandate-overview__party {
display: table-cell;
vertical-align: middle;
width: 100%;
height: 100%;
text-align: center;
}
<ul class="mandate-overview">
<li class="mandate-overview__circle"><span class="mandate-overview__party">V</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">S</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">MP</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">SD</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">PP</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">JL</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">C</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">FP</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">KD</span></li>
<li class="mandate-overview__circle"><span class="mandate-overview__party">M</span></li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment