Transitioning from Extjs 4.2 to Extjs 6.2 has presented a challenge for me. In the past, I would include a custom css file in the head using a simple link placed after the Extjs inclusion.
<link rel="stylesheet" href="/custom.css" type="text/css" charset="utf-8" />
However, this method no longer works due to the way Extjs 6 loads its css files by injecting them at the end of the head.
My dilemma now is, how do I add a custom css file in ExtJs 6 to override the built-in rules?
Edit: While there are existing answers to this question,
- pertains to ExtJs 4.1
provides some links, ultimately suggesting:
copy the file custom.css to
/packages/local/custom-theme/sass/etc
- add the line
@import 'custom.scss'
toall.scss
While this seems like a good solution, I've encountered some obstacles:
- As per the documentation, the
sass/etc
folder is loaded before all other styles - The content of my custom style sheet seems to not pass through the build machinery and fails to appear in my `build/production/[appname]/resources/[appname]-all.css