Translate element with the text flow will give the scrollbar

Translate element with the text flow will give the scrollbar. if we translate element to the right of to the down we will get scrollbar, but if we translate it to the left or to the top we won't. (for LTR languages)

by Konstantin Rouda

HTML

<section>

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with

the release of Letraset sheets containing Lorem Ipsum

passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
<div class="rotated"></div>
</section>

<div>

</div>

CSS

HTML {
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

DIV {
  display: inline-block;
   width: 150px;
  height: 150px;
  margin: .5em auto;
  background: #888;
}


.rotated {
  margin-top: 3em;
  transform: translate(25em, -10em) rotate(45deg); /*if we translate element to the right of to the down we will get scrollbar, but if we translate it to the left or to the top we won't. (for LTR languages)*/
}

SECTION {
  max-width: 40%;
  margin: 1em auto;
  padding: 1em;
  border: 1px solid;
  overflow: auto;
}