Issue Details (XML | Word | Printable)

Key: MDLSITE-561
Type: Sub-task Sub-task
Status: Open Open
Priority: Minor Minor
Assignee: Martin Dougiamas
Reporter: Urs Hunkler
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle.org Sites
MDLSITE-496

Handle the font size issue

Created: 18/Nov/08 04:50 PM   Updated: 14/Mar/09 07:24 PM
Return to search
Component/s: moodle.org

Issue Links:
Duplicate
 

Participants: Helen Foster, Martin Dougiamas and Urs Hunkler
Security Level: None


 Description  « Hide
Copied from the main discussion:

Helen Foster - 14/Nov/08 07:19 PM
Urs, many thanks for your latest improvements to the moodle2 theme :-)

A small issue which I guess is related to the moodle2 theme, since it is not an issue with the old theme, is that font size tags are ignored in forum posts and elsewhere e.g. http://moodle.org/mod/forum/discuss.php?d=110274 and http://moodle.org/mod/data/view.php?id=6552

Urs Hunkler - 17/Nov/08 04:58 AM
@font-sizes: you call it a small issue - it's quite a serious one. An actual search in Moodle code gives 1.319 places where the depreciated and not validating "font" tag is used :-(

Part of the reset.css used in the moodle2 theme is to reset those font-sizes to 100% as a base to be able to consciously set the sizes within the moodle2 CSS. It's easier to reset all font tags than to correct hundreds of pages in the theme.

The culprit is that the Moodle HTMLEditor producesg these font tags too and the reset sizes all HTMLEditor set font-sizes.

We have some options:
1) Remove the reset and live with the hardcoded font sizes in many places.

2) Use a filter I created for my theme work to change the HTMLEditor font sizes to inline style. It's focused on correcting only some HTMLEditor XHTML issues and therefore works faster than the Moodle integrated "htmlcleaner" function.

3) Activate the Moodle "htmlcleaner" function for all user input and inform people that their code may be changed after they saved. On user input processing time for the text does not play that big role - it's only one text.

4) another option?

We work with 2). Which solution do you prefer?



Martin Dougiamas - 18/Nov/08 01:42 PM - edited
Just a note about the <font> tags ... yes, we shouldn't have any in our code, though I count less than you: 136 left in Moodle 1.9 and 155 in HEAD.

I used this to remove some of the 3rd party code that is out of our control:

   grep -r '<font ' * | grep -v lib/adodb | grep -v lib/typo3 | grep -v admin/mysql | grep -v lib/soap | grep -v lib/overlib | grep -v lib/smarty | grep -v lang/ | wc -l



Urs Hunkler - 18/Nov/08 04:41 PM
@ <font> tags

I had just let Eclipse count all "<font" occurrences. Your numbers look much better. Important is that no "font" tags show up in Moodle pages.

What I find interesting is the increasing number of "font" tags in Moodle 2.0. The goal for years is to decrease the number.

This example looks like a prove for my proposition to let (web) developers develop code and (web) designers design templates and bring both parts together leading to validating pages. So here again my vote - separate code and presentation and use templates in Moodle in the form of simple XHTML includes.


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Urs Hunkler added a comment - 18/Nov/08 04:51 PM - edited
Martin, what is your proposal how to proceed?

Urs Hunkler added a comment - 13/Dec/08 04:11 AM
Martin?

Helen Foster added a comment - 14/Mar/09 07:23 PM
Urs, thanks for your comments.

Reassigning to Martin for consideration.


Helen Foster made changes - 14/Mar/09 07:23 PM
Field Original Value New Value
Assignee Helen Foster [ tsala ] Martin Dougiamas [ dougiamas ]
Helen Foster made changes - 14/Mar/09 07:24 PM
Link This issue is duplicated by MDLSITE-553 [ MDLSITE-553 ]