<!DOCTYPE html>
<style>
div { border: 5px solid transparent; }
div::first-line { }
div::first-letter { border: inherit; border-color: yellow; }
</style>
<div>
Some text. Does the first letter still have a border?
</div>