Did anyone successfully build gooddata ui css with...
# gooddata-ui
j
Did anyone successfully build gooddata ui css with Webpack and CssMinimizerPlugin set up with Lightningcss? I am getting an error the CSS are not valid. More in the thread.
Lightningcss is modern css minimizer, I think it is pretty popular.
It is supported in Webpack as minify option in CSSMinimizerPlugin https://lightningcss.dev/docs.html#with-webpack
But the build with Gooddata.UI css always fail. I tried
sdk-ui-dashboard
css for an example.
The error message
SyntaxError: Invalid pseudo class after pseudo element, only user action pseudo classes (e.g. :hover, :active) are allowed
Maybe I will have to go through whole css and clean in up, but it is big.
It is possible to download anywhere minified version of
sdk-ui-dashboard
for specific version?
r
Hi Jakube, Radek from the GoodData technical team here, hopefully I can shed some light into some of these questions! Essentially, the CSS part of GD.UI is considered to be a private API - so it comes with the standard warning that it can change substantially at any time (though we try to avoid doing so), and it hasn't really been built with customer-made changes in mind. This all comes down to the fact that the CSS unfortunately grew with the rest of GD.UI, and since the intention has always been to keep it in private API status, it's not, to put this nicely, as structured as it could be 🙂 Oh and as far as the CSS breaking the build goes, that note really seems to have stood the test of time, I'm honestly not sure if it's not just down to the devs trying to cover all the possibilities - I can check with them if you'd like though!
j
Thank you for info. I will today try to somehow use SASS version and I hope it will work 🤞
🤞 1
It is same for sass. The final CSS which goes to the Lightning Css minify process is not valid. We will have to find other option. 😞
r
Yeah, I suspected it might happen.. I can leave a note with the devs on this, give them another nudge to consider a spring CSS cleaning 🙂
j
We have deployed Gooddata.UI CE backend, so we have to load css from there probably.. it was loaded from there when we using web components variant.. but I am not sure if I can rely on the path.. it was something like 876.css 🙂 I will have to inspect it more.