Magento 2 allows you to compile the .less files by using one of these two modes:
- Server-side compilation mode (default): less file is compiled with PHP less library. In developer mode, PHP will generate the CSS files on the fly provided there is not one already. Running static content deploy will compile the stylesheet. This mode will result in faster response times.
- Client-side compilation mode: Less file is compiled client-side on every page load, which results in slow response times and "flash of unstyled text" (FOUT) issues. This mode is recommended for theme development.
ERROR Argument 1 passed to Magento\Framework\View\Page\Config\Renderer::canTypeBeFont() must be of the type string. Error in vendor/magento/framework/View/Page/Config/Renderer.php on line 360
php bin/magento config:set dev/front_end_development_workflow/type server_side_compilation