clubmate.fi

A good[ish] website

Web development blog, loads of UI and JavaScript topics

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…

Hyphenating with pure CSS

This is more of a print thing, but may come handy sometime on the web also. Something that works This works for me in Safari and Firefox…

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…

The modern way of writing media queries with the help of Sass

Everything you know about Media Queries is wrong. Not really, but I kinda felt like that when I dug more into it. Sass (SCSS), of course…

Sizing type on the web

It’s slightly mysterious, to use ems or px, or maybe rems? The thing is... Use rems But... What is a rem? I quote: The rem unit is relative…

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…

Get the first image inserted into a post body in WordPress

Sometimes It’s nice to show to the first image in the post archive page. This is a very simple script, does one thing. Just paste this in…

Redirect parent page to its first child

Redirecting from the parent page comes really handy, when you don't have actual need for the parent page, expect to group the subpages under…

  • © 2021 Antti Hiljá
  • About
  • Follow me in Twatter → @hiljaa
  • All rights reserved yadda yadda.
  • I can put just about anything here, no one reads the footer anyways.
  • I love u!