Exploring various combinations of space
and round
values for background-repeat
, I've discovered a way to utilize radial gradients to create a visually appealing dotted border on an element without having the dots cut off.
.test {
background-repeat: space no-repeat;
background-size: 20px 10px;
background-image: radial-gradient(circle closest-side, red calc(100% - 1px), transparent 100%);
transition: background-image 0.5s linear;
padding-bottom: 10px !important;
background-position: left top;
resize: both;
overflow: auto;
border: 2px solid;
padding: 20px;
width: 310px;
}
Visit this link to see it in action.
Although this technique works perfectly in Chrome, Safari presents a challenge as the dots get cut off when the element becomes too wide.
Any suggestions on how to prevent Safari from cutting off the dots?
UPDATE: Apple has been informed about this issue.