Closed Bug 161606 Opened 22 years ago Closed 20 years ago

don't set default values

Categories

(SeaMonkey :: Composer, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bugzilla_kl, Unassigned)

Details

the composer sets several values, which are the defaults for this property into
the code. Worst example is, if you let it create a new table. It should only
insert those values, which differ from the default. Also if should allow you to
set properties to "default" later.
please be more specific
How do I create a document that has the attributes you are concerned with?  Be
sure to include what version of mozilla are you using.  If no response is made
within 2 weeks, I recommand -->invalid
invalid bug description; please reopen only if you can clarify as requested in
comment 1
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
verified.
Status: RESOLVED → VERIFIED
reassign in case bugs are later reopened
Assignee: syd → composer
ops, forgot this bug ;)

first example (1.4RC1) is if you create a new document, you get
<body style="background-image: url(about:blank);"> (where the style="" is just a
waste of space)

add a table and <td style="vertical-align: top;"> also useless. As is <table
cellpadding="2" cellspacing="2" border="1" style="text-align: left; width:
100%;"> (where only the border="" and width: has any use).

With all this, we make the file way bigger, as it should be.
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
I agree with you that explicitly setting values with default values is kinda
pointless and unneedlessly making the file size bigger. (From browsers to
browsers, some attributes and/or CSS properties have different default values
but most of the time either W3C TRs define initial values or browsers agree on
default values.) But the thing is that most users do not know what are the
defaults in a particular browser. And I would say that above 90% of all
attributes (with their default attribute values) and CSS properties (with their
default values) are not explicitly defined and set as such by Composer.

- <body style="background-image: url(about:blank);">: I do not see this even
after setting Edit/Preferences.../Composer/Use CSS styles instead of HTML
elements and attributes
- <td style="vertical-align: top;">: you may have a point here. In fact, the
default is vertical-align:middle in all browsers I checked (even for Mozilla
1.x, NS 7.1). Even WDG says on the valign attribute this: "middle, the default
value, which centers the cell data vertically;" 
http://www.htmlhelp.org/reference/html40/tables/td.html
I think the default should be
valign="middle" and "vertical-align:middle" and it should apply on table rows,
not on individual table cells. (If you want to file a bug on this or resummarize
this one, I'll support you.)
Everywhere in the html.css file, I either see vertical-align: inherit or
vertical-align: middle for sub-table elements.

This is in the hmtl.css file:
table {
  border-spacing: 2px; 
  border-collapse: separate;
}
And CSS2.1 claims that border-collapse:separate should be the default value:
http://www.w3.org/TR/CSS21/changes.html#q19
so an initial border-spacing value or cellspacing is needed here. If you remove
cellspacing when inserting the table, you still get a cellspacing anyway due to
the html.css cascade.

style="text-align: left; 
is a neat way to set the initial align value (or CSS text-align property) of all
cells to left which is the recommended default in all dir="ltr" documents.
W3C HTML 4.01
11.3 Table formatting by visual user agents
11.3.2 Horizontal and vertical alignment
Inheritance of alignment specifications
"The default alignment for cells depends on the user agent. However, user agents
should substitute the default attribute for the current directionality (i.e.,
not just 'left' in all cases)."
This can be found in the html.css file:
td { 
  display: table-cell;
  vertical-align: inherit;
  text-align: inherit; 
  padding: 1px;
}
If you set dir="rtl" to the html element, Composer should then update and
change/make the table text-align property to right but it does not.

Mozilla Composer 1.5 (build 20031007) here.
These kinds of problems are already covered in specific bugs like bug 161607 and
a new document doesn't add any extraneous style that I can see in 1.7 beta.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago20 years ago
Resolution: --- → INVALID
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.