Skip to content

Instantly share code, notes, and snippets.

@scottkellum
Created September 3, 2014 21:49
Show Gist options
  • Save scottkellum/099ef72b56365fe8ce07 to your computer and use it in GitHub Desktop.
Save scottkellum/099ef72b56365fe8ce07 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="container-broken">
<div class="hero">
<div class="right-arrow"></div>
<div class="left-arrow"></div>
</div>
</div>
<div class="description">The blue boxes should overlap the black borders by -10/10px:</div>
<div class="container">
<div class="hero">
<div class="right-arrow"></div>
<div class="left-arrow"></div>
</div>
</div>
// ----
// Sass (v3.4.1)
// Compass (v1.0.1)
// Breakpoint (v2.5.0)
// Singularity.gs (v1.4.0)
// ----
@import "singularitygs";
@import "compass";
@import "breakpoint";
@mixin clearfix {
&:after {
display: table;
content: '';
}
}
.container-broken { //Container for the grid system
margin: 0 auto;
background: green;
position: relative;
@include clearfix;
border-left: 20px solid #000;
border-right: 20px solid #000;
width: 980px;
}
.container { //Container for the grid system
margin: 0 auto;
background: green;
position: relative;
border-left: 20px solid #000;
border-right: 20px solid #000;
width: 980px;
}
.hero {
background: red;
height: 200px;
@include clearfix;
}
.left-arrow, .right-arrow {
position: absolute;
cursor: pointer;
background: blue;
margin-top: -20px;
font-size: 0.8em;
width: 41px;
height: 41px;
top: 50%;
}
.left-arrow {
left: -10px;
}
.right-arrow {
right: -10px;
}
.description {
text-align: center;
padding: 30px;
}
.container-broken {
margin: 0 auto;
background: green;
position: relative;
border-left: 20px solid #000;
border-right: 20px solid #000;
width: 980px;
}
.container-broken:after {
display: table;
content: '';
}
.container {
margin: 0 auto;
background: green;
position: relative;
border-left: 20px solid #000;
border-right: 20px solid #000;
width: 980px;
}
.hero {
background: red;
height: 200px;
}
.hero:after {
display: table;
content: '';
}
.left-arrow, .right-arrow {
position: absolute;
cursor: pointer;
background: blue;
margin-top: -20px;
font-size: 0.8em;
width: 41px;
height: 41px;
top: 50%;
}
.left-arrow {
left: -10px;
}
.right-arrow {
right: -10px;
}
.description {
text-align: center;
padding: 30px;
}
<div class="container-broken">
<div class="hero">
<div class="right-arrow"></div>
<div class="left-arrow"></div>
</div>
</div>
<div class="description">The blue boxes should overlap the black borders by -10/10px:</div>
<div class="container">
<div class="hero">
<div class="right-arrow"></div>
<div class="left-arrow"></div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment