#239 closed defect (fixed)
widgets provide no way through markup pass in to override their css
Reported by: | dylan | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
It seems that the tab widgets do not allow you to provide an attribute for templateCssPath in markup that overrides the default css file.
With widgets that do not use dojo.lang.extend, this is not the case.
One possible solution would be to do something like this:
this.cssPath = "src/widget/templates/HtmlTabs.css"; and then late have: templateCssPath: dojo.uri.dojoUri(this.cssPathValue),
that way a user can provide cssPath="" in their markup. Otherwise, it appears that the user either has to replace dojo's css file with their own, not include dojo's css file, or create css rules with higher specificity to override dojo's css rules.
Change History (4)
comment:1 Changed 15 years ago by
Owner: | changed from schontz to alex |
---|---|
Summary: | HtmlTabs, HtmlTabSet (and perhaps other widgets) provide no mechanism for overriding the templateCssPath → widgets provide no way through markup pass in to override their css |
comment:2 Changed 15 years ago by
Status: | new → assigned |
---|
The root cause is that mixInProperties sees the templatePath and templateCssPath properties as objects and not strings and so over-riding them on a constructor node doesn't have the intended effect. We therefore need a way to specify to the mixin code that it's OK that these values get set, or in some other way directly assign them from extraArgs.
comment:3 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
changing description... basically the issue seems to be that there is no easy way to override the default css that comes with a widget when the widget uses dojo.lang.extend without providing a different css file or extending the widget class. That seems silly given that most people will want their own styles for widgets, but won't want to fork their dojo build.