Just to note, an example.
echo '
<link rel="stylesheet" media="only screen and (max-width: 900px), only screen and (min--moz-device-pixel-ratio: 1.5) and (max-width: 1140px), only screen and (-o-min-device-pixel-ratio: 1.5/1) and (max-width: 1140px), only screen and (-webkit-min-device-pixel-ratio: 1.5) and (max-width: 1140px), only screen and (min-device-pixel-ratio: 1.5) and (max-width: 1140px)" type="text/css" href="', $settings['theme_url'], '/style_Mobile.css?116" />
<link rel="stylesheet" media="only screen and (min-width: 901px), only screen and (min--moz-device-pixel-ratio: 1.5) and (min-width: 1141px), only screen and (-o-min-device-pixel-ratio: 1.5/1) and (min-width: 1141px), only screen and (-webkit-min-device-pixel-ratio: 1.5) and (min-width: 1141px), only screen and (min-device-pixel-ratio: 1.5) and (min-width: 1141px)" type="text/css" href="', $settings['theme_url'], '/style_Standard.css?116" />';
// If, instead of these echo '<link rel...', the template is written (lets say, this is just an example idea) as:
loadCSSFile('style_Mobile.css', array(), $context['is_mobile']);
loadCSSFile('style_Standard.css', array(), $context['is_standard']);
// all the rest here
The function could insert the media links. It already sets the bits for the browser cache to 'compose' a link to a css/js file iirc.
I assume we know what to insert and when (and it would be clearly documented for themes). A custom theme wouldn't 'need' to use the function (it can use their own direct links), but it can also make use of it, knowing it offers a couple of defaults like this 'mobile' vs 'standard'.
Once those are set, in the rest the theme can use the wanted @media ... etc.