I am blog
These are the things I write about
Recent posts
Grunt task: Compiling to a destination without preserving the folder structure
It is not uncommon to have a complex folder structure for scss
or js
files. When compiling with Grunt, the outputted file will maintain the same file path as the original. To change this behaviour use the flatten
property.
Improve application performance with WOFF2
The WOFF2
compression format offers up to 30% reduction in file size in comparison with WOFF
. It's so new it won't work without configuration in IIS.
Prevent transitionend event firing twice
I came across this problem when handling a CSS transitionend
event. The transitionend
event fires when a CSS transition has completed. The problem wasn't that it wasn't firing, it was firing, but twice.
Clean up your views with display templates - MVC
Looping through lists is not uncommon in views but it can cause bloat and just look plain ugly. Display templates solve this.
Filtering your Trello board with labels
Trello is a great productivity tool for work and just about anything else. Recently I learnt how to use labels to help manage my boards.
Use display and editor templates FTW!
Display and editor templates in ASP.NET MVC are often overlooked and are in fact quite powerful, here's why I think they are awesome.
Getting started with Grunt, SASS and Task Runner Explorer - Visual Studio
Web Essentials opened the door to SASS in Visual Studio by giving us a way to compile without the need for Ruby. But now we have Task Runner Explorer, FTW!
No more CSS vendor prefixes, Autoprefixer comes to Visual Studio
If you want to use the latest and greatest in CSS3 you are going to have to use vendor prefixes to ensure the best browser support. Knowing when and which vendor prefixes are required in CSS is a constantly changing battlefield.
Get Intellisense in SASS/LESS files in Visual Studio
We all love intellisense. No one likes to type more than four characters without Visual Studio doing the rest for you. When using a CSS pre-processor such as SASS or LESS, we may have variables or mixins that we use in different files. This often results in the horrible validation error squiggly line, and no one likes to see that. We can get around this though, and here's how.
Life is now easier, Create media query mixins with rulesets - LESS CSS
LESS now has a function called rulesets which allows you to create a mixin that wraps content in a media query.