How to add a custom CSS file in ExtJs 5? -
in extjs 4, included custom css this:
<!-- <x-compile> --> <!-- <x-bootstrap> --> <link rel="stylesheet" href="bootstrap.css"> <script src="ext/ext-dev.js"></script> <script src="bootstrap.js"></script> <!-- </x-bootstrap> --> <script src="app.js"></script> <!-- </x-compile> --> <link rel="stylesheet" href="/custom/css.css" type="text/css" charset="utf-8" />
the fact link css comes after <x-compile>
section makes loaded later , rules in custom.css
override rules in compiled extjs theme css.
in extjs 5.0, doesn't work anymore. despite of including custom css after microloader, theme css loaded after custom.css
:
<script id="microloader" type="text/javascript" src="bootstrap.js"></script> <link rel="stylesheet" href="/custom/css.css" type="text/css" charset="utf-8" />
how achieve custom.css
loaded last in order override rules in extjs css file ?
open app.json , css property. add file in there , sencha cmd bundle framework css. default 1 looks this:
/** * list of css assets in right inclusion order. * * each item object following format: * * { * // path file. if file local must relative path * // app.json file. * // * "path": "path/to/stylesheet.css", // required * * // specify true if file remote , should not copied * // build folder. defaults false local file copied. * // * "remote": false, // optional * * // if not specified, file loaded once, , cached inside * // localstorage until value changed. can specify: * // * // - "delta" enable over-the-air delta update file * // - "full" means full update made when file changes * // * "update": "" // optional * } */ "css": [ { "path": "bootstrap.css", "bootstrap": true } ],
Comments
Post a Comment