Skip to content

Instantly share code, notes, and snippets.

@everaldomatias
Created February 17, 2021 15:34
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 everaldomatias/63853e4ceeae8b653d976af3a1423fac to your computer and use it in GitHub Desktop.
Save everaldomatias/63853e4ceeae8b653d976af3a1423fac to your computer and use it in GitHub Desktop.
/* Modal */
.reports-modal{
position: absolute;
width: 80%;
min-height: 400px;
height: auto;
z-index: 1900;
background-color: #fff;
padding: 0.75rem;
border-top: 4px solid #1c5690;
border-radius: 2px;
box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.3);
}
<div ng-class="{hidden:!data.reportModal}" class="bg-modal"></div>
<script>
var modalReports = document.querySelector('.reports-modal');
modalReports.style.left = ((window.innerWidth / 2) - (modalReports.offsetWidth / 2)) - ((window.innerWidth - document.documentElement.clientWidth) / 2) + 'px';
console.log(modalReports.scrollTop);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment