Replace inline css with suitable classes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UD Theme |
Fix Released
|
Low
|
Michael Lustfield |
Bug Description
Going on with investigations started for bug #369912 , I found that the css
properties defined in lines 1167-1212 of style.css where mostly
overriden with inline css, more exactly in-html-head-style block,
generated by the function ubuntudrupal_
template.php.
Moreover, it appeared that the function
phptemplate_
was NOT USED.
In the default and most popular drupal core themes, garland, this function is
precisely used to allow defining different css rules according to the
presence or absence of left and right sidebar contents.
So here it is. This patch is supposed to change the organisation of
css rules, while not changing them, i.e.
_you shouldn't see any difference in your browser_
after applying the patch.
If you do this is the place to report it.
I think that the rules contents is a different bug, but far better
fixed after making this structural change.
I first created a small script, columns-css.php , to generate
pseudo-dynamic styles. I included it in the patch for completeness, but
there's no reason to distribute it, and next patch will remove it.
It is intended to generate styles strictly equivalent
to those previously inserted dynamically in html page header.
I simply added a context class, to be inserted, dynamically this time, to <body>
The result shows that invalid or nonsense css is output if no sidebar is activated.
However, to keep the resulting layout strictly equivalent, I inserted everything in
style.css, after the settings that previous version was overriding.
I removed the function and the call from
In template.php, I removed ubuntudrupal_
invocation, and rewrote phptemplate_
which builds a class attribute reflecting the presence of sidebars.
It returns a string of the form " class=\"$class\"" , where $class is one of:
- 'with-both-
- 'with-sidebar-left'
- 'with-sidebar-
- 'with-no-sidebar'
This result is inserted in the <body> start tag, in page.tpl.php
This patch has not been thouroughly tested, but, as the length of this
report lets imagine ;) , it has been carefully thought *before* writing.
Related branches
- Michael Lustfield (community): Disapprove
- Diff: None lines
Changed in ubuntu-drupal-theme: | |
assignee: | nobody → Rocky Road (m-baert) |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in ubuntu-drupal-theme: | |
status: | Triaged → Fix Committed |
Ooops, a small error in rules generation. Sorry.