<!DOCTYPE html>
<html>
<head>
<style>
div { background: green; color: green; width: -moz-fit-content; }
</style>
</head>
<body>
<div>TEST</div>
</body>
</html>