Opened 11 years ago

Closed 6 years ago

#11802 closed enhancement (patchwelcome)

Explain how one should use css for custom dijits and in the build system

Reported by: Nick Fenwick Owned by:
Priority: high Milestone: 1.13
Component: Documentation Version: 1.5
Keywords: Cc:
Blocked By: Blocking:


Apologies if this is a duplicate. There seem to be two areas of uncertainty that could be better explained in the dojocampus docs:

1/ General .css files doesn't mention css yet most templated dijits will want a .css file.

I have a mydijits/CustomDijit.js and mydijits/CustomDijit.html. Is it recommended to keep custom css for this dijit in mydijits/CustomDijit.css? (with reference to the later custom build, see point 2).

I'm aware that you don't need any of the .js/.html/.css files on disk, you can dojo.declare a _Templated dijit in free standing code, but people would benefit from some more advanced scenarios being documented.

2/ Custom builds has no information about .css files (see "TODOC: everything. outline here:").

Can someone who understands the build system please document how one should arrange .css files in a project so they get compiled? Aimed at someone who understands that there is .css, and it needs compiling into as few files as possible to reduce network calls during page load, but doesn't understand the dojo build system/concepts.

Some questions that come to mind:

  • how to get all dojo/dijit css into one file.
  • how to get our custom dijit css noticed by the build system (e.g. mydijits/CustomDijit.css).
  • how to include all dojo/dijit css and custom dijit css in one file (is this recommended?).

Change History (2)

comment:1 Changed 10 years ago by Caleb Maclennan

This issue still seems to be unresolved in the available 1.7 documentation.

comment:2 Changed 6 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

You should either combine them with a CSS preprocessor, or you should include them in your theme.css file and let them get combined. This would typically mean your CSS file would live in your package, and include themes for Dojo, Dijit and your custom code.

I agree this should be documented better, but given nothing in the past 4 years, this is unlikely to improve without someone contributing a pull request, so I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.