I guess it is not due to printWidth but rather using moustache in the style as it always happens when I use it within style tag but I don’t know how to fix this issue.
It sounds like you are having an issue with the Shopify Liquid plugin for VSCode formatting the code in a way that is causing the styles to be ineffective. This is likely happening because the plugin is inserting a new line after the px units in the style declarations, which is not allowed in CSS.
To fix this issue, you can update the settings for the Shopify Liquid plugin to prevent it from inserting new lines after certain characters or patterns. You can do this by opening the user settings for the plugin in VSCode and adding the following configuration:
“liquid.format.insertSpaceAfterKeywords”: [“px”],
This will prevent the plugin from inserting a new line after the px units in your style declarations, ensuring that the styles are applied correctly.