I got the following theme inheritance setup:
Vendor/Retail
inherits from Vendor/Default
which inherits from Magento/blank
When compiling the styles with grunt I get no issues. When compiling with server-side compilation some of the blank theme's styles are missing.
I.e. vendor/magento/theme-frontend-blank/Magento_CatalogSearch/web/css/source/_module.less
or
vendor/magento/theme-frontend-blank/web/css/source/_layout.less
Will be included when compiled with grunt but dropped when compiled with server-side compilation.
I'm drawing a bit of a blank here. Does anyone have an idea what's going on here?
Edit:
I dug into it more and found that it actually only drops the styles that are wrapped in media queries. The common styles are applied. So styles wrapped in:
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m)
will be dropped and not show up in styles-l.css
. While styles wrapped in:
& when (@media-common = true) {
will show up in styles-m.css
.
This only applies to styles from the blank theme. Styles wrapped in media queries from the child theme are not affected by this issue.