[Spacewalk-devel] On picking a standard on HTML5 void tags (was: Date/Time picker)

2014-02-18 Thread Silvio Moioli
On 02/17/2014 04:43 PM, Matej Kollar wrote:
   * standard allows closing of tags,

Let me rephrase this: standard allows adding an optional trailing slash
to void elements, that by definition do not have end tags, as syntax
sugar[0].

Non-void elements must have a start and end tag - closing and
self-closing are not defined by the standard.

So standard allows both adding and not adding, and IMO it's a matter of
choosing a coding convention.

   * HTML is generated on some places explicitly... are you sure
 it would not lead to state where we would be inconsistent (=bad),

I think that the goal of a coding convention is mostly patch consistency
- picking one style to avoid unneeded git conflicts because of different
programmers having different habits. Goal here is not being nice on
browsers' lexers IMO.

Actually I would say that this case is very similar to the problem of
having different whitespace conventions in JSPs (2 spaces, 4 spaces,
tabs) - since browsers accept anything the main concern should be
setting a rule for any future code contribution to minimize conflicts,
not necessarily fixing all inconsistencies right now.

   * in case we switch (and do it properly and completely) it would
 make it much harder to switch to say XHTML if desired,

We are focusing on Bootstrap and HTML5 only for the foreseeable future.

   * without closing tags it would be like
 those evil old times with wild HTML...

I cannot see your point here - HTML5 does not have those slashes by
default, whether that looks modern or not really disputed.

 (not speaking about omitting closing tags...)

We are still committed to valid code, of course. Omitting end tags when
they are required by the standard is a whole different problem - code
that does not validate is wrong and should be fixed, as always.

   * code that Michael commented on was wrong anyway as it only
 deleted symbol and immediately pended it.

Thread renamed to keep the two discussions separated.

On the other hand, I would argue that:

 * those slashes are really superfluous;
 * a good portion of Web projects outside Spacewalk are following the
same convention, among others Bootstrap itself[1] and HTML5
Boilerplate[2], which is also used in Initializr[3] which in turn are
used in lots of projects.

I do acknowledge that debate is ongoing[4] and there is no ultimate
agreement in the wider Web development community, so I do not want to
start and endless discussion here trying to solve that.

So all I have is one last question:

Is this your own personal opinion or the whole Spacewalk team official
position? In particular, will future patches be rejected if they have
those trailing slashes?

Thanks

[0] http://dev.w3.org/html5/spec-author-view/syntax.html#syntax-start-tag
[1] Bootstrap itself. See br, link, etc in official examples:
http://getbootstrap.com/examples/theme/
[2] http://html5boilerplate.com/
[3] http://www.initializr.com/
[4]
http://www.reddit.com/r/web_design/comments/uvvxg/html5_developers_do_you_self_close_your_tags_or/
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] On picking a standard on HTML5 void tags (was: Date/Time picker)

2014-02-18 Thread Michael Mraka
Silvio Moioli wrote:
% On 02/17/2014 04:43 PM, Matej Kollar wrote:
%* standard allows closing of tags,
% 
% Let me rephrase this: standard allows adding an optional trailing slash
% to void elements, that by definition do not have end tags, as syntax
% sugar[0].
% 
% Non-void elements must have a start and end tag - closing and
% self-closing are not defined by the standard.
% 
% So standard allows both adding and not adding, and IMO it's a matter of
% choosing a coding convention.
...
% Thread renamed to keep the two discussions separated.
% 
% On the other hand, I would argue that:
% 
%  * those slashes are really superfluous;
%  * a good portion of Web projects outside Spacewalk are following the
% same convention, among others Bootstrap itself[1] and HTML5
% Boilerplate[2], which is also used in Initializr[3] which in turn are
% used in lots of projects.
% 
% I do acknowledge that debate is ongoing[4] and there is no ultimate
% agreement in the wider Web development community, so I do not want to
% start and endless discussion here trying to solve that.
% 
% So all I have is one last question:
% 
% Is this your own personal opinion or the whole Spacewalk team official
% position? In particular, will future patches be rejected if they have
% those trailing slashes?

Hi Silvio,

Using self-closed tags for void elements as well as using end tags even
in situations where they can be omitted in HTML5 is common agreement
among whole team. They improve readability - you immediately know what
was intentional and what a mistake.

As for patch rejection - no, most likely the other way round :).

Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel