CSS Bad Practices

We’ve all been there – Not sure if we should or shouldn’t use id, used unnecessary classes to fix bugs that we have caused by using unnecessary classes, tempted to use !important as the due date arrive just to make it work without really knowing what the consequences are…
The list below represents the practices that I hate the most in CSS. Some of the categories are very bad and some of them are just me being petty. Let’s begin:
Continue reading

Communicate between iFrame and parent window

Nowadays, a lot of third-party services, embed codes and other utils using an iFrame window to embed plugins and other layouts into other sites or applications.
If you have ever tried to create a widget or other embed code, the main problem that arises very fast is that you can’t communicate between the iFrame and parent window hosting website. This behavior is designed on purpose to create a “shield” or a “barrier” between one site and another one, to prevent the infamous cross-site scripting attacks.
Continue reading

Unit testing Javascript with phantomjs, and jasmine

JavaScript is a powerful scripting language that couples HTML markup and functional event-driven scripting, into rich and extremely versatile web applications. Unit testing JavaScript is a relatively new field, and in this article I will dive a little deeper into the tools I used in my recent JavaScript project: phantomjs and jasmine

Continue reading