If - for whatever reason - you have to render stylesheets dynamically, the following snippet might be of help. It emulates what...
If you have a PNG and want to know a pixel's alpha channel value, you can use Gimp:
imgAreaSelect is a jQuery plugin for selecting a rectangular area of an image. It allows web developers to easily implement...
Modern cameras often produce JPEGs that have a "I should be rotated 90° to the left" flag. If you process...
Icon fonts like Font Awesome are infinitely scalable, look great on high-DPI displays and will give your app a...
Why is this useful? You can have a background image on the same element, overlaying it with a transparent gradient...
Richard Powell presents a collection of CSS styling advice that's mainly taken from SMACSS. Although at makandra we're...
There is no reason to leave trailing whitespace characters in your project's files, so don't add any.
to_file has been removed in Paperclip 3.0.1. Instead of using File to access Paperclip storage objects (like this: File.read...
simple_format ignores Rails' XSS protection. Even when called with an unsafe string, HTML characters will not be escaped or...
Given you store files on Amazon S3 and you need to stream those files out to people while you don...
Trick: Do not use convert but mogrify: mogrify -resize 50% * This overwrites the original image file. In contrast, convert writes...
Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...
We frequently use the handy Paperclip Gem to manage file attachments. If you need to move the files from local...
If a customer calls and tells you that she cannot see some content of her website beware of the following...
A print stylesheet is easy to create. Choose a font suited for paper, hide some elements, done. Unfortunately print stylesheets...
There are many fun Unicode characters like ▲ or ☯. You might be tempted to use them for graphical elements in lieu...
If you encounter a Firefox that does not care about your font settings but always uses specific fonts, you can...
No one wants to cry over regression issues in views; does testing HTML and CSS have to be such a...
LibreOffice Impress, Writer, etc. doesn't embed most fonts into the PDFs it generates. This means if you share a...
When using the asset pipeline your assets (images, javascripts, stylesheets, fonts) live in folders inside app: app/assets/fonts app/assets/images...
Geoffrey Grosenbach has created Gruff for easily plotting graphs. It is written in pure Ruby and integrates with Rails applications...
Consider the following HTML & CSS: ^ img { background-color: red; } div { border: 1px solid black; } This will leave a margin of...
You might have notices this behavior when you cut a selection or use the rubber tool. The behavior depends on...