17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 6442 Views |
-
why does silverstripe load the css for the modules first?

16 April 2008 at 8:25am Last edited: 16 April 2008 11:05am
The way it is at the moment means that when you load a module, if you want your style from your ecommerce module to adjust the layout when invoked, it won't work, because it's loaded first.
For web developers, this is just plain dumb.
It'd make more sense for it to load the core css (layout.css, etc) first, then load the the various modules that may want to change the original layout styles AFTER.
A good example of this is when you might only want a sidebar on your modules, not on all your pages.
Thus, I could disable it by default, then simple enable it when the module is invoked.
-
Re: why does silverstripe load the css for the modules first?

16 April 2008 at 3:59pm
The CSS For the modules is loaded in order yourtheme_module/css/NameOfFile.css and if thats not there then it uses the modules default file. There was a bug in the forum module which meant this wasn't the case but it should work for ecommerce - if you want to change the css all you should need to do is create a css file with the same name in a yourtheme_ecommerce/css/ folder and it should include your own before the module
-
Re: why does silverstripe load the css for the modules first?

16 April 2008 at 10:39pm
No, you don't understand, look...
Visit: http://demo.silverstripe.com/ecommerce/ and checkout the HTML...
<link rel="stylesheet" type="text/css" href="ecommerce/css/ProductGroup.css" />
<link rel="stylesheet" type="text/css" href="ecommerce/css/Cart.css" />
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/layout.css" />
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/typography.css" />
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/form.css" />As you can see, the ecommerce module css is loaded first, when in fact, it should be loaded AFTER the core layout css files... IE:
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/layout.css" />
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/typography.css" />
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/form.css" />
<link rel="stylesheet" type="text/css" href="ecommerce/css/ProductGroup.css" />
<link rel="stylesheet" type="text/css" href="ecommerce/css/Cart.css" />Do you understand?
| 6442 Views | ||
|
Page:
1
|
Go to Top |


