[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

2014-02-18 Thread Silvio Moioli
On 02/18/2014 09:46 AM, Silvio Moioli wrote:
 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?

Oops, typo there. I really meant:

In particular, will future patches be rejected unless they have those
trailing slashes?

Sorry!
-- 
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

Re: [Spacewalk-devel] On picking a standard on HTML5 void tags

2014-02-18 Thread Michael Mraka
Silvio Moioli wrote:
%  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?
% 
% Oops, typo there. I really meant:
% 
% In particular, will future patches be rejected unless they have those
% trailing slashes?

Ahh, this version makes better sense ;). I'd say not rejected but you'll
be most likely asked to make it consistent with the others.

Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

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

Re: [Spacewalk-devel] [PATCH] Date/Time picker

2014-02-18 Thread Michael Mraka
Duncan Mac-Vicar P. wrote:
% Thanks for the review and fixes!. Most of it looks good except for the
% self-closing tag as Silvio explained.
% 
% There are other changes that I would like to understand:
% 
% - The css part where you override some styles (and use !important, which
% basically means SUSE Manager can't override it again in its css)

They override stuff from datepicker/timepicker css. Because css files
order they have to be forced with !important.

% - setting of the input size to 15

To set length ratio of date and time input boxes. Otherwise they are
equally long. Is there a better way to enforce it?
 

Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

___
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

2014-02-18 Thread Duncan Mac-Vicar P.
On 18/02/14 14:10, Michael Mraka wrote:
 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 :).

I am fine with using self-closing tags as long as everyone is aware that
using it in a non-void tag will create bad markup and understand that
the browser will just remove the /'s.

It happened with i class=iconclass/ already, which is wrong and invalid)
In HTML5 foo/ is expanded to foo. Not to foo/foo as in XHTML.

-- 
Duncan Mac-Vicar P. - http://www.suse.com/

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix
Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

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