/* this */
inset: 1px 2px 3px 4px;
/* is the same as this */
top: 1px;
right: 2px;
bottom: 3px;
left: 4px;
The inset CSS property is a shorthand that corresponds to the top, right,
bottom, and/or left properties. It has the same multi-value syntax of the
margin shorthand.
While part of the CSS Logical Properties specification, it does not define
logical offsets. It defines physical offsets, regardless of the element's
writing mode, directionality, and text orientation.
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
position: relative;
inset: 20px 50px 30px 10px;
background-color: #c8c800;
}
div {
background-color: yellow;
width: 150px;
height: 120px;
position: relative;
}
.exampleText {
writing-mode: sideways-rl;
position: absolute;
inset: 20px 40px 30px 10px;
background-color: #c8c800;
}