JSFiddle - React, Tailwind, and code Playground

HTML

<div>
	I'd like to have a list with several columns
	<ul>
		<li>A list</li>
		<li>like this</li>
		<li>with unknown</li>
		<li>number and items</li>
		<li>or columns.</li>
	</ul>
	in the middle of other text.
</div>

CSS

div {
	font-size: 30px;
	padding: 30px;
}

ul {
	display: inline-block;
	column-width: 35px;
	height: 35px;
	
	padding: 0;
	list-style: none;
	font-size: 10px;

	vertical-align: middle;

	/* 
		Setting margin fixes the issue, 
		but the with of the list is not
		known.
	*/
	/* margin-right: 170px; */
}

li {
	background: #9eff80;
	padding: 2px;
	opacity: 0.7;
}

JavaScript

/* no JS please! */