HTML5 Doubt

C++, C#, Java, PHP, ect...
Post Reply
User avatar
srachit
Posts: 291
Joined: Sat Jan 05, 2013 6:10 pm

HTML5 Doubt

Post by srachit »

So I have been learning HTML5 using thenewboston tutorials on youtube.

The thing is that he used a lot of

Code: Select all

-webkit-
Now if I am not wrong this works only in chrome while for mozilla you have to us

Code: Select all

-moz-
Is there any code to use those features of HTML5 and have it compatible with all browsers? Any industry standard yet?
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: HTML5 Doubt

Post by Jackolantern »

No, any feature that has a company prefix like that is still in an experimental state, and each company is implementing it in their own way. Your only bet for now to have a cross-browser implementation is to see if there is a library or function available online that will allow you to use a generic function name and have it handle all of the company prefix testing and usage under the covers. It is kind of odd that the author would go very heavy on the company prefix features :|
The indelible lord of tl;dr
User avatar
Callan S.
Posts: 2042
Joined: Sun Jan 24, 2010 5:43 am

Re: HTML5 Doubt

Post by Callan S. »

Sounds like a way of 'teaching' which is more a particular indoctrination, in regards to that.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: HTML5 Doubt

Post by Jackolantern »

Well, I understand why they would show it. These features are going to become stable, cross-browser features of HTML5 and the related APIs. They just aren't there yet, and in some cases they are still negotiating some of the implementations. But it just doesn't make sense to me because most of the real "meat and potatoes" of HTML5 are already cross-browser and well-implemented. You would seriously have to go out of your way and have some strange design choices to fill your application up with company-prefixed features :?
The indelible lord of tl;dr
User avatar
srachit
Posts: 291
Joined: Sat Jan 05, 2013 6:10 pm

Re: HTML5 Doubt

Post by srachit »

Where can I find the latest HTML5 syntax which has been accepted over all browsers?
User avatar
Elvar
Posts: 86
Joined: Sun Oct 07, 2012 7:04 pm

Re: HTML5 Doubt

Post by Elvar »

They are actually called vendor prefixes, and there some more actually

-o- Opera
-ie- Internet Explore

You can use http://caniuse.com/#search=gradient to see if you need a vendor prefix for you rule, often it is just common sense to include all vendor prefixes, as you want to support older browsers.

I might wanna have a look at Compass with Sass, which got mixins that produces all vendor prefixes for you.

If you are on a Mac or Linux machine, you can install it through gem (http://compass-style.org/) (Sass http://sass-lang.com/)

gem install compass

When install you can go to you project folder an write

compass init

Which will initialize some structure and stylesheets for you, and finally

compass watch

Which looks for changes in your scss files, and compiles them directly to coresponding css file.

Hope it helps :).
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: HTML5 Doubt

Post by Jackolantern »

Yes, "vendor prefix" was the name I was hunting for! lol :)
The indelible lord of tl;dr
User avatar
Verahta
Posts: 440
Joined: Wed Aug 24, 2011 1:50 am

Re: HTML5 Doubt

Post by Verahta »

Bucky of thenewboston is a good guy but he is not an expert. In my opinion he is a ''jack of all trades, master of none''.
"In order to understand recursion, one must first understand recursion".
Post Reply

Return to “Coding”