You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some components in Fabric lose styling when served/built using tree shaking (ng build|serve --prod).
These components are at least:
DatePicker (fab-date-picker)
The Calendar within it is unstyled.
Panel (fab-panel)
These seem to happen due to these components using plain Sass and not CSS-in-JS like most of the office-ui-fabric-react lib uses.
Components that use CSS-in-JS are not affected (for example, the text field and the icon in the DatePicker appear fine in a prod build, the calendar inside the popup does not).
The way office-ui-fabric-react works for plain CSS-styled components is that they have an original *.scss file, that's compiled down to a *.js file in the following format (unminified & shorten below for readability):
It seems like the Angular CLI prod build removes the call to loadStyles in the code, since I can import these files in the app and access the values of the exported variables (root above, though there are others, depending on the file).
The text was updated successfully, but these errors were encountered:
Some components in Fabric lose styling when served/built using tree shaking (
ng build|serve --prod
).These components are at least:
DatePicker
(fab-date-picker
)Calendar
within it is unstyled.Panel
(fab-panel
)These seem to happen due to these components using plain Sass and not CSS-in-JS like most of the
office-ui-fabric-react
lib uses.Components that use CSS-in-JS are not affected (for example, the text field and the icon in the
DatePicker
appear fine in a prod build, the calendar inside the popup does not).The way
office-ui-fabric-react
works for plain CSS-styled components is that they have an original *.scss file, that's compiled down to a *.js file in the following format (unminified & shorten below for readability):It seems like the Angular CLI prod build removes the call to
loadStyles
in the code, since I can import these files in the app and access the values of the exported variables (root
above, though there are others, depending on the file).The text was updated successfully, but these errors were encountered: