HereThis is the solution I found.
mytheme.libraries.yml
mylibrary:
version: 1.0
css:
theme:
css/some/path/desktop-small.min.css: { media: "all and (min-width: 756px)" }
css/some/path/mobile.min.css: { media: "all and (max-width: 755px)" }
mytheme.libraries.yml
Edit: added quotation marks to media declaration, it prevents parsing error in some environments.
mylibrary:
version: 1.0
css:
theme:
css/some/path/desktop-small.min.css: { media: "all and (min-width: 756px)" }
css/some/path/mobile.min.css: { media: "all and (max-width: 755px)" }