Compile CSS custom properties to hex values in mailers stylesheets
What does this MR do and why?
Compile CSS custom properties to hex values in mailers stylesheets
- Add PostCSS plugins
- Move mailer stylesheets to
mailers/
directory - Update import paths
- Remove asset precompile rules, use wildcard
- Add mailers processor to CSS compile script
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots or screen recordings
What | After |
---|---|
/rails/mailers/notify/pipeline_failed_email |
![]() |
/rails/mailers/license_mailer/approaching_active_user_count_limit.html |
![]() |
How to set up and validate locally
Validate CSS
- Run
yarn build:css --watch
- Have a look at e.g.
app/assets/builds/mailers/notify_enhanced.css
. A lot of custom properties should now be inlined (if not, all)
Validate email styles
- Remove pre-compiled CSS assets:
rm app/assets/builds/**/*.css
- Navigate to the pages above
- Write a comment which mentiones a few labels.
- Go to
/rails/letter_opener
. Wait until the notification email "comes through"
Edited by Lukas 'ai-pi' Eipert