From derernst at gmx.ch Thu Jan 10 06:59:36 2013 From: derernst at gmx.ch (Markus Ernst) Date: Thu, 10 Jan 2013 15:59:36 +0100 Subject: [html5] Detect support for tel: uri scheme or better markup for phone numbers Message-ID: <50EED758.4060506@gmx.ch> Hello A client asked me to mark up phone numbers in the website we are developping the way that they are clickable on mobile phones. Now when I mark them up somehow like 012 345 67 89, the numbers will still be rendered as clickable links in non-supporting browsers, resulting in ugly warnings. I tried to find out some way to detect support for this uri scheme, so I could mark up the phone numbers as and replace this by the element where supported. But most forums discussing this suggest some sort of ua sniffing or consider viewport widths under 480px as mobile devices. I don't like this, as it does not reliably detect telephone functionality. Browsers with something like Skype installed will not be detected, and even my phone has more than 480 pixels viewport width when in landscape position. Is there a recommended and reliable way to detect whether tel: links are supported? Or is there a better way to mark up phone numbers anyway? I'd be happy to be pointed to further information. Thanks. From ian at hixie.ch Thu Jan 10 12:33:42 2013 From: ian at hixie.ch (Ian Hickson) Date: Thu, 10 Jan 2013 20:33:42 +0000 (UTC) Subject: [html5] Detect support for tel: uri scheme or better markup for phone numbers In-Reply-To: <50EED758.4060506@gmx.ch> References: <50EED758.4060506@gmx.ch> Message-ID: On Thu, 10 Jan 2013, Markus Ernst wrote: > > Is there a recommended and reliable way to detect whether tel: links are > supported? Not currently. In theory, any Web page can register as a handler for tel:. One could imagine e.g. Google Voice handling that protocol on a desktop browser. We could provide an API that exposes which schemes are available, but really a better solution would probably be for browsers to detect that the link doesn't do anything (because they and their OS don't support the scheme) and then not making :link/:visited match it. > Personnally I think that tel: and mailto: uri schemes are actually not a > satisfying way to mark up phone numbers resp. e-mail addresses. > Something like would be > better, as UAs were free to apply all kind of functionalities they are > configured to, and non-supporting browsers would just ignore them > instead of displaying ugly error messages. (or doing nothing) Yeah, it is kind of weird how non-fetchable-resources are marked up in this way. Not sure what to do instead though. There's a lot of momentum behind the current mechanism. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From gerisk8 at gmail.com Fri Jan 18 05:37:15 2013 From: gerisk8 at gmail.com (=?ISO-8859-2?B?WuFtYvMgR2VyZ/U=?=) Date: Fri, 18 Jan 2013 14:37:15 +0100 Subject: [html5] Width Adapting to Content's Length Message-ID: Dear List Members, My question is the following: Let's say the height of a div is 200px. And I want the lede of an article to be in it in a readable way. Is there any way to calculate the maximum number of lines and fill the content adapting to that? Thank you so much for your time. With Regards, Greg Zambo -------------- next part -------------- An HTML attachment was scrubbed... URL: From derernst at gmx.ch Thu Jan 10 06:59:36 2013 From: derernst at gmx.ch (Markus Ernst) Date: Thu, 10 Jan 2013 15:59:36 +0100 Subject: [html5] Detect support for tel: uri scheme or better markup for phone numbers Message-ID: <50EED758.4060506@gmx.ch> Hello A client asked me to mark up phone numbers in the website we are developping the way that they are clickable on mobile phones. Now when I mark them up somehow like 012 345 67 89, the numbers will still be rendered as clickable links in non-supporting browsers, resulting in ugly warnings. I tried to find out some way to detect support for this uri scheme, so I could mark up the phone numbers as and replace this by the element where supported. But most forums discussing this suggest some sort of ua sniffing or consider viewport widths under 480px as mobile devices. I don't like this, as it does not reliably detect telephone functionality. Browsers with something like Skype installed will not be detected, and even my phone has more than 480 pixels viewport width when in landscape position. Is there a recommended and reliable way to detect whether tel: links are supported? Or is there a better way to mark up phone numbers anyway? I'd be happy to be pointed to further information. Thanks. From ian at hixie.ch Thu Jan 10 12:33:42 2013 From: ian at hixie.ch (Ian Hickson) Date: Thu, 10 Jan 2013 20:33:42 +0000 (UTC) Subject: [html5] Detect support for tel: uri scheme or better markup for phone numbers In-Reply-To: <50EED758.4060506@gmx.ch> References: <50EED758.4060506@gmx.ch> Message-ID: On Thu, 10 Jan 2013, Markus Ernst wrote: > > Is there a recommended and reliable way to detect whether tel: links are > supported? Not currently. In theory, any Web page can register as a handler for tel:. One could imagine e.g. Google Voice handling that protocol on a desktop browser. We could provide an API that exposes which schemes are available, but really a better solution would probably be for browsers to detect that the link doesn't do anything (because they and their OS don't support the scheme) and then not making :link/:visited match it. > Personnally I think that tel: and mailto: uri schemes are actually not a > satisfying way to mark up phone numbers resp. e-mail addresses. > Something like would be > better, as UAs were free to apply all kind of functionalities they are > configured to, and non-supporting browsers would just ignore them > instead of displaying ugly error messages. (or doing nothing) Yeah, it is kind of weird how non-fetchable-resources are marked up in this way. Not sure what to do instead though. There's a lot of momentum behind the current mechanism. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From gerisk8 at gmail.com Fri Jan 18 05:37:15 2013 From: gerisk8 at gmail.com (=?ISO-8859-2?B?WuFtYvMgR2VyZ/U=?=) Date: Fri, 18 Jan 2013 14:37:15 +0100 Subject: [html5] Width Adapting to Content's Length Message-ID: Dear List Members, My question is the following: Let's say the height of a div is 200px. And I want the lede of an article to be in it in a readable way. Is there any way to calculate the maximum number of lines and fill the content adapting to that? Thank you so much for your time. With Regards, Greg Zambo -------------- next part -------------- An HTML attachment was scrubbed... URL: From derernst at gmx.ch Thu Jan 10 06:59:36 2013 From: derernst at gmx.ch (Markus Ernst) Date: Thu, 10 Jan 2013 15:59:36 +0100 Subject: [html5] Detect support for tel: uri scheme or better markup for phone numbers Message-ID: <50EED758.4060506@gmx.ch> Hello A client asked me to mark up phone numbers in the website we are developping the way that they are clickable on mobile phones. Now when I mark them up somehow like 012 345 67 89, the numbers will still be rendered as clickable links in non-supporting browsers, resulting in ugly warnings. I tried to find out some way to detect support for this uri scheme, so I could mark up the phone numbers as and replace this by the element where supported. But most forums discussing this suggest some sort of ua sniffing or consider viewport widths under 480px as mobile devices. I don't like this, as it does not reliably detect telephone functionality. Browsers with something like Skype installed will not be detected, and even my phone has more than 480 pixels viewport width when in landscape position. Is there a recommended and reliable way to detect whether tel: links are supported? Or is there a better way to mark up phone numbers anyway? I'd be happy to be pointed to further information. Thanks. From ian at hixie.ch Thu Jan 10 12:33:42 2013 From: ian at hixie.ch (Ian Hickson) Date: Thu, 10 Jan 2013 20:33:42 +0000 (UTC) Subject: [html5] Detect support for tel: uri scheme or better markup for phone numbers In-Reply-To: <50EED758.4060506@gmx.ch> References: <50EED758.4060506@gmx.ch> Message-ID: On Thu, 10 Jan 2013, Markus Ernst wrote: > > Is there a recommended and reliable way to detect whether tel: links are > supported? Not currently. In theory, any Web page can register as a handler for tel:. One could imagine e.g. Google Voice handling that protocol on a desktop browser. We could provide an API that exposes which schemes are available, but really a better solution would probably be for browsers to detect that the link doesn't do anything (because they and their OS don't support the scheme) and then not making :link/:visited match it. > Personnally I think that tel: and mailto: uri schemes are actually not a > satisfying way to mark up phone numbers resp. e-mail addresses. > Something like would be > better, as UAs were free to apply all kind of functionalities they are > configured to, and non-supporting browsers would just ignore them > instead of displaying ugly error messages. (or doing nothing) Yeah, it is kind of weird how non-fetchable-resources are marked up in this way. Not sure what to do instead though. There's a lot of momentum behind the current mechanism. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From gerisk8 at gmail.com Fri Jan 18 05:37:15 2013 From: gerisk8 at gmail.com (=?ISO-8859-2?B?WuFtYvMgR2VyZ/U=?=) Date: Fri, 18 Jan 2013 14:37:15 +0100 Subject: [html5] Width Adapting to Content's Length Message-ID: Dear List Members, My question is the following: Let's say the height of a div is 200px. And I want the lede of an article to be in it in a readable way. Is there any way to calculate the maximum number of lines and fill the content adapting to that? Thank you so much for your time. With Regards, Greg Zambo -------------- next part -------------- An HTML attachment was scrubbed... URL: