callumbwhyte / meganav

A flexible, draggable link picker for constructing site navigation menus in Umbraco
MIT License
35 stars 34 forks source link

Changing meganav-card colour style due to nuglify issue in prod #57

Closed mattwootton closed 2 years ago

mattwootton commented 2 years ago

A minor tweak due to an issue we encounter with Meganav CSS nuglify minification when running in production.

The Umbraco backoffice uses Smidge/Nuglify to compile/minify the backoffice CSS but this is failing when ran in production due to one line in the Meganav backoffice stylesheet. This change is a very minor tweak to that line to resolve this issue without effecting the UI.

The error in production environments (does not occur in dev): System.InvalidOperationException: Expected closing parenthesis, found ',',Expected function, found ',',Expected semicolon or closing curly-brace, found ')' at Smidge.Nuglify.NuglifyCss.ProcessAsync(FileProcessContext fileProcessContext, PreProcessorDelegate next) at Smidge.FileProcessors.PreProcessPipeline.ProcessNext(Queue1 queue, FileProcessContext fileProcessContext) at Smidge.FileProcessors.PreProcessPipeline.<>c__DisplayClass5_0.<<ProcessNext>b__0>d.MoveNext()

A similar error is reported here (albeit this user is not using Meganav): https://our.umbraco.com/forum/using-umbraco-and-getting-started/108469-backofficeadmin-css-smidgenuglify-error-breaking-package-styling

To replicate try running in a production environment so the Umbraco backoffice will compile/minify backoffice CSS and note the backoffice CSS styling is broken and will return an error 500. You should also see an error log similar to above in the Umbraco log.

eden-jh commented 2 years ago

Ha, I just made an issue for this:

https://github.com/callumbwhyte/meganav/issues/59

Thanks for taking care of it!

callumbwhyte commented 2 years ago

Hey @mattwootton,

Great spot - thanks for fixing!

I have merged this into both V9 and V8 (just in case), will aim to get a release out very shortly. Just finalising one other fix.

Cheers, Callum

mattwootton commented 2 years ago

Great, thanks for the package @callumbwhyte !

No problem @eden-jh , looks like we both spotted this at the same time.