All content in recipe.module has hard-coded styles.
All items should be wrapped in DIVs and tagged with CSS, and ship with a default stylesheet. Style changes can then be made by editing the stylesheet (or including in main stylesheet) i.e.:
< div class="recipe-label" >Servings:< / div >
< div class="recipe-servings" >2 - 4< / div >
< div class="recipe-label" >Ingredients:< / div >
< div class="recipe-ingredients" >
...ingredients...
< / div >
Also, the default display of ingredients is bad/boring -- just a block with line-breaks. Default should be to display as unordered list.
See my installation for hacked changes -- http://www.bmannconsulting.com/node/view/377.
I'll submit changes if someone can give me a CVS account and/or contact with the recipe.module author.
Comments
Comment #1
moshe weitzman commentedVery nice presentation of a recipe. Thanks for the link.
Please do commit your CSS changes to CVS. You should request an account
using instructions at http://drupal.org/node/view/59
Note that CSS changes are best done in your theme as not in the recipe
stylesheet. Theme CSS overrides module CSS
- moshe
P.S. I am the author of the module and my email address is listed in the README.
Comment #2
kika commentedI'd go for a
and include the stylesheet to a recipe_head() function:
Comment #3
Boris Mann _Old Blogger.com Account_ commentedI don't think the styles should be output in the head function. If anyone wants to change it, they have to edit the recipe.module directly, since style tags in the head override anything in linked stylesheets.
Your way of doing the blocks is fine -- my problem is that there might potentially be name-space collision with stylesheet classes. If you have another module that uses "label", for instance, and they define a CSS class with padding-left, if you don't specifically override padding-left in your recipe label CSS, that property will "cascade" down.
By using unique class names, this can be avoided.
I've started a thread on module development guidelines that we can discuss this in.
Comment #4
moshe weitzman commentedI agree that folks who want to customize styles should not need to alter
recipe.module. They shouldn't even alter a recipe.css (though this file is
unnessary)
The suggestion is for recipe_head() to output a LINK tag whose HREF points
back to a recipe.module. For example,
LINK ref=stylesheet HREF=recipe\stylesheet TYPE=text/css
A theme author who wants to override styles provided by recipe.module should
do in his theme using inline styles or a linked stylesheet. All theme
stylesheets come after module stylesheets and thus have higher precedence.
I have no strong opinion on the naming technique for CSS styles.
Comment #5
moshe weitzman commentedcommitted new version based on css suggestion by kika
Comment #6
(not verified) commentedAutomatically closed due to inactivity (marked fixed for 14 days).