At the moment I wasn't able to exclude the content-2 to outside the sticky content, without duplicating the element class format.
As you can notice in the following full-screen fiddle would result in:

.superlongcontent {
height: 1000px;
background-color: red;
}
.sticky {
height: 300px;
position: sticky;
top: 0rem;
height: calc(100vh - 20rem);
overflow-y: auto;
background-color: blue;
}
.content-1 {
height: 600px;
background-color: yellow;
}
.content-2 {
height: 50px;
background-color: green;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="col-lg-9 col-md-12 col-12 superlongcontent">
</div>
<div class="col-lg-3 col-md-12 col-12 sticky">
<div class="content-1"></div>
<div class="content-2 outsidesticky"></div>
</div>
Despite what I want to achieve which is placing the content-2 ( green box ) right below the sticky overflow content. Resulting:
If I duplicate the sticky using the same format it won't be that good at the moment:
.superlongcontent {
height: 1000px;
background-color: red;
}
.sticky {
height: 300px;
position: sticky;
top: 0rem;
height: calc(100vh - 20rem);
overflow-y: auto;
background-color: blue;
}
.content-1 {
height: 600px;
background-color: yellow;
}
.content-2 {
height: 50px;
background-color: green;
}
.sticky2 {
height: 50px;
position: sticky;
top: 0rem;
background-color: blue;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="col-lg-9 col-md-12 col-12 superlongcontent">
</div>
<div class="col-lg-3 col-md-12 col-12 sticky">
<div class="content-1"></div>
</div>
<div class="col-lg-3 col-md-12 col-12 sticky2">
<div class="content-2 outsidesticky"></div>
</div>
If possible I don't want to duplicate the class like my current attempt:
<div class="col-lg-3 col-md-12 col-12 sticky">
<div class="content-1"></div>
</div>
<div class="col-lg-3 col-md-12 col-12 sticky2">
<div class="content-2 outsidesticky"></div>
</div>
Are there any better ways to achieve the same result?