Here's a practical example of where theme development runs into trouble
from module theme functions: overusing theme functions or using the
wrong theme functions.
In theme.inc (core) is the function theme_form_element which is roughly this (may be old code):
function theme_form_element($title, $value, $description = NULL, $id = NULL, $required = FALSE, $error = FALSE) {
$output = "<div class=\"form-item\">\n";
$required = $required ? '<span class="form-required">*</span>' : '';
if ($title) {
if ($id) {
$output .= " <label for=\"$id\">$title:</label>$required<br />\n";
}
else {
$output .= " <label>$title:</label>$required<br />\n";
}
}
Now, the <br /> tags _aren't_ the big problem here.
The problem is that modules (including core modules like
profile.module) call this function for both form input _and_ form
output. From a design/theme p.o.v., those are two distinct things
and should be treated as such.
Is this a _really big deal_ that causes Drupal to break? Probably
not. But imagine my surprise when I used PHPTemplate to override
this theme function, and all the form elements on my entire site
changed instantly (and broke).