0

I'm watching a series of HTML5 tutorials where the person is trying to teach flexbox, however the tutorial is pretty old and he is using things like display: -webkit-box; and webkit-box-pack:center; I'm assuming that's because some browsers didn't support it back then. However I also read that this syntax is now outdated and sites like MDN have warnings about it but they don't provide links to the new syntax for doing the same thing. Unfortunately I'm unable to find a website that will show the old way and the new way of doing things so I was wondering if someone can help me with that, link some useful resources or maybe explain to me how I can find the equivalents of the old syntax in sites like MDN.

Thanks

ribarcheto94
  • 436
  • 11
  • 25

1 Answers1

0

In such cases, as far as I know, Google is your best and only friend. For example, it took me to shouldiprefix.com, which while is a bit outdated, sometimes points in the right direction. In a case of flexbox, it refers to a css-tricks.com article that has a section called "Examples of Outdated Stuff". There you can indeed see some tutorials of using old syntax.

It is not easy to find pages explaining all the differences between the old and the new syntax. The question is - do you really need it? The websites used by thousand of people like css-tricks.com (article about flexbox) or w3schools.com (their flexbox reference) teach the new syntax only and are often updated. It's not like you'll need an old syntax often.

Also, do yourself a favour and don't worry about vendor prefixes. Use autoprefixer like f.e. grunt-postcss (here's a nice tutorial - take a look at "IV. Grunt setup" step).

pzmarzly
  • 778
  • 15
  • 29
  • Yea I see what you mean, it's just that I like the teaching style of the guy in the tutorials and I learn better by seeing an example and playing around with something rather than reading about it so I was hoping I could just translate his example code into the new syntax but perhaps it's so different that some things were dropped and other combined into single commands. – ribarcheto94 May 17 '17 at 15:14