Tutorial: Styling data with CSS - GeoServer 2.17.x User Manual
This tutorial will show using CSS to style a layer, along with the equivalent SLD code. The SLD file for the default layer looks like this: Now, let's start on a CSS file that accomplishes the same thing. First, got to the styles page and click on Add a new style link to start a new style.
https://docs.geoserver.org/stable/en/user/styling/css/tutorial.html