index.html
					<!doctype html>
<html>
	<head>
		<title>Float clear</title>
		<link href="/assets/reset.css" rel="stylesheet">
		<link href="setup.css" rel="stylesheet">
		<link href="style.css" rel="stylesheet">
	</head>
	<body>
		<section>
			<aside>
				<p>This is an aside element.</p>
			</aside>
			<p>This is some text.</p>
			<p>And a second pargraph set to clear left, so it goes across the float.</p>
		</section>
		<section>
			<aside>
				<p>And another aside here too, with a lot more text in it.</p>
			</aside>
			<p>And some more.</p>
			<p>This one clears left, but the aside is to the right.</p>
		</section>
		<section>
			<p>And a third one, too.</p>
		</section>
	</body>
</html>

		
	
setup.css
					/* Same as before. */
:root { --spacing: 1rem; }

body {
	font-family: sans-serif;
	padding: var(--spacing);
}

section {
	background-color: var(--background, deepskyblue);
	border-block-start: solid black calc(var(--spacing) / 5);
	padding: var(--spacing);

	&:not(:first-child) { margin-block-start: var(--spacing); }
}

		
	
style.css
					aside {
	background-color: gold;
	float: inline-start;
	inline-size: calc(10 * var(--spacing));
	margin-inline-end: var(--spacing);
	padding: var(--spacing);
}

section:nth-child(2) aside {
	float: inline-end;
	margin-inline-end: initial;
	margin-inline-start: var(--spacing);
}

p:last-child { clear: inline-start; }