The current support of GetMap params STYLE_URL and STYLE_BODY in Geoserver lacks the (correct) management of CSS styles.
The original GSIP was intended to support multiple style formats but, from our tests, only SLD is supported at now.
@allyoucanmap did some tests, setting STYLE_FORMAT=css, but always the default style is applied.
Reading one of our blog posts, it seems that if the LAYERS parameter is present (and in our use case it is) the style is downgraded to "style library". This requires to use the STYLES param to set the "style name" to be applied from the style library, otherwise the default style is applied.
This seems to confirm the described behaviour (default style always applied) but this poses the problem how the STYLES parameter should be used in case of CSS styles.
This is a strong requirement for the MapStore (CSS) Style Editor, otherwise temporary files on Geoserver must be created to preview edits.
Comments from @allyoucanmap
I'm currently working on validation error in the UI and working with temp style in GeoServer it's possible to have a feedback in the request response (error or success).
If we move the temp style outside of GeoServer a new endpoint to validate style is required.
current implementation with temp style on GeoServer