Brian noticed the CSS file could be trimmed down and I noticed the text/buttons were not changing color when a dark background color was set as the background.
I turned on the option to set a bg color for the top parent block.
Cleaned up the button.js file.
Removed the individual class for BG color and we are selecting it now as &[class*='has-dark']. This will save us a lot of file size once we start adding more colors to the theme.
Added cssnano per the TW docs for modification on the production build.
All of this saves us 15 kB and will help keep the file small on a project when we add more colors and custom styles.
Summary
Brian noticed the CSS file could be trimmed down and I noticed the text/buttons were not changing color when a dark background color was set as the background.
button.js
file.&[class*='has-dark']
. This will save us a lot of file size once we start adding more colors to the theme.cssnano
per the TW docs for modification on the production build.All of this saves us 15 kB and will help keep the file small on a project when we add more colors and custom styles.
Issues
78
Testing Instructions
ddev npm run build
to see the new file size.Screenshots
Before
After