clubmate.fi

A good[ish] website

Web development blog, loads of UI and JavaScript topics

If not IE, conditional HTML comment

There’s a conditional command to check if a browser is not IE. You can use magic HTML comment to do that:

Making trippy shapes with CSS border and animating them to give you epilepsy

Animating CSS border property can result in in pretty spacey looking things. I just played around with it and stuff appeared. The basics The…

Check if element exists in jQuery

Simple way to check if element exists in jQuery. The $('#module2') is always truthy, because an empty array is truthy Boolean([]) . So…

SCSS @font-face mixin

The built-in Compass mixin is bit janky, here’s better. Use it like this: $style-name being the name of the font e.g. Helvetica $file…

PHP function to load jQuery in WordPress footer

Loading stuff on the footer, rather than in the header, makes your site load faster, because you move the blocking HTTP calls further down…

Cache busting scrip and CSS loader function for WordPress

Change a CSS or JS file, it’s cached, your changes wont show to users. Cache can be busted by changing the file name. Here’s how. This is…

Make an element wider than it’s parent, in a WordPress post

For instance, in this blog not the case anymore , the the main article is fluid width, and on large screens it can be up 970px wide. That…

Writing media queries with Sass

Here’s a small guide on how to manage media queries with Sass. Lets assume that we have 5 Media Queries. They’re usually all clumped at the…

Sizing type on the web

There are rems and ems, which a somewhat similar, but with their distinct differences. What is a rem? The rem unit is relative to the root…

How to use Compass color helper functions

Here we’ll look into the Color Helpers. Basic usage Helpers are not mixins. This of course wont work: But they’re used like this: When it…

  • © 2022 Antti Hiljá
  • About
  • All rights reserved yadda yadda.
  • I can put just about anything here, no one reads the footer anyways.
  • I love u!