View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032792 | mantisbt | customization | public | 2023-07-29 08:03 | 2023-07-29 15:15 |
Reporter | Mother10 | Assigned To | |||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Acer Predator 5000 | OS | Win11 Home | OS Version | 22H2 |
Product Version | 2.25.7 | ||||
Summary | 0032792: More flexible way to add your own stylesheet. AND possibility to add *.map-files | ||||
Description | Mantis has a parameter: But that always adds the css-file as the FIRST file in the stylesheet list. (pink arrow) So if you want to add your css file(s) as LAST files in the list, which is where they should be because of Bootstrap and such, you have to do theming, starting from some of examples provided. Could there be created a parameter to add your file(s) as the LAST file(s) in the stylesheet list? (green arrow) Using the method in the themes, the *.css files goto the yellow accented area. I would have expected them to go to where the green arrow points. Also, I tried to upload map-files created by compiling my scss file. But they dont seem to be accepted? (even if they are uploaded) | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Not sure I understand why that matters.
I'm no CSS expert and have little experience with map files, but aren't they loaded by the browser when you activate dev tools, if they are referenced in the .css file ? I don't think they should be linked from your HTML. |
|
When a browser processes the css files to find the statements to use, it always starts from the top-file (first one in the list) to bottom. So say you have in the first css-file in the list, something like: Everywhere blue is used as a class the textcolor will be blue. .blue { Everywhere the class blue is used the textcolor will be green. This is a trivial example but just to show what happens. So the sequence of the css-files is very important!! If a user wants to style Mantis, his/hers css-files should go AFTER the Mantis css-files, so where my green arrow points. Thats why I did not understand that the parameter: In my opinion it should never go there. About the mapfiles, you can use them to inspect your HTML from inside the browser you use to display your webpages. About the mapfile processing: Also what I dont understand, is why Mantis puts my theme file and the mapfile lines, in that yellow area, where the +.js files go. Does this clarify enough? (I have an explanation of this here: https://www.motherware.com/webdesign/debug-pages/mtw-chrome-devtools-02-screen-explained.php) |
|
OK so you're saying that the $g_css_include_file should be linked last instead of first - I thought you were asking to add a new config to link a second CSS file. As for the map file issue, the screenshot you've attached references moment.js which is a library bundled with Mantis, and likely unrelated to your changes. I guess we could add the .map file to avoid the error. |
|
Ah yes I see wrong file screenshotted. But that was also a mapfile so that is in the wrong place too. If you could do the mapfile the same way as a css file and put it right next to the css-file, that would be great. That is where it belongs. I asked for a second config param because I didnot know if the original one could en should change the way it acts now. Great!!! Thanks. PS, sorry for the wrong quote in the first note, could not find how to do that properly. |
|
As a side note: Another way for theming is to write a plugin that uses EVENT_LAYOUT_RESOURCES to inject some CSS, |
|
Thanks atrol, I will keep that in mind! |
|
Sorry, want to add something to prevent errors. I looked closer at the xx.min.js.map file. So to be precise: .css files and .css.map-files should be processed and positioned in the same way in the same directory. .js-files and .js.map-files should be processed as *.js-files and go in the same directory for js-files. HTH |
|