Is there a way to stop Pinegrow from forcing CSS code formatting.
I (as a general web dev novice) am attempting to build an AMP page using Pinegrow.
I have tested the bare minimum blank AMP page. But because Pinegrow insists on styling the CSS code, the AMP validation fails. (the failure noted below…)
I notice in “settings” there is an option to not auto-format the html. Unfortunately, there is no equivalent for CSS.
Is it possible to not auto format CSS (at least in <head>)? If not then … feature request.
Are you putting your CSS directly on the HTML page? If so, what about using an external style sheet, that way you can format it however you like, and Pinegrow shouldn’t touch it as long as you don’t open it to edit in Pinegrow.
error message = ! The mandatory text inside tag 'head > style[amp-boilerplate]' is missing or incorrect. [Learn more](https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md).
After playing round, i now realize, Pinegrow formats the CSS upon loading the file (not saving).
This means, to produce valid AMP pages, the Pinegrow formatted version of … <style amp-boilerplate>body{-webkit ...
… line needs to have formatting removed before saving.
So … maybe the feature request could be:
In settings, an option for: No CSS formatting on load.
… and have an button in the code panel to format the code.
I tell it the html file is a CSS file - it works fine - it minimises the entire head. Would it mess up JS if that was there too and it presumed a CSS file? But … that’s academic right now. Thanks for the help.
Glad I could help. Honestly, I knew nothing about AMP other than it stood for Accelerated Mobile Pages, but I did some research and I saw that by design the AMP boilerplate cannot be modified. So minifying from Pinegrow was your only option, which (strangely) Pinegrow doesn’t offer, but fortunately, Atom does.
Minifying the HTML and CSS should definitely be a feature in Pinegrow. Other, less sophisticated software offers this.