refactored to make the theme more bullet-proof in case the parent changes.
added minified styles