Gimp: Why removing pixels sometimes leaves transparency, sometimes the background color
- You might have notices this behavior when you cut a selection or use the rubber tool.
- The behavior depends on whether your images has an alpha channel.
- You can add an alpha channel by choosing Layer → Transparency → Add alpha channel
Related cards:
The Ruby Object Model
In Ruby (almost) everything is an Object
. While this enables a lot of powerful features, this concept might be confusing for developers who have been programming in more static languages, such as Java or C#. This card should help understanding t...
Sass: Use black or white foreground color depending on the lightness of the background
This article shows how to create a Sass mixin for a colored button. The button's foreground color is dynamically chosen between either black or white, depending on the given background color.
It's a nice intro into @if
and @else
conditionals ...
Creating a multi-resolution favicon including transparency with the GIMP
The result is a .ico file with multiple versions of your logo at different resolutions. Now, depending on the context, visitors to your site will see your nice favicon in their browser tabs, superimposed on whatever browser chrome they're using in...
Why Should I Care What Color the Bikeshed Is?
Just because you are capable of building a bikeshed does not mean you should stop others from building one just because you do not like the color they plan to paint it.
Removing ANSI color codes from Rails logs
The colors in Rails log files are helpful when watching them but, since they are ANSI color codes like ^[[4;36;1m
, can be annoying when you are reading the logs with a tool that does just prints those control characters (like less
or vim
).
...
CSS: Matching against attributes and their values (or parts of them)
You probably know that you can use CSS selectors to match against elements and their attributes, such as:
a[title] { /* any <a> that has a "title" */ }
a[data-fancy="true"] { /* any <a> that has their "data-fancy" attribute set to "true" *...
The JavaScript Object Model: A deep dive into prototypes and properties
Speaker today is Henning Koch, Head of Development at makandra.
This talk will be in German with English slides.
Introduction
As web developers we work with JavaScript every day, even when our backend code uses anothe...
Printing background color of elements
Browsers' printing methods usually don't print background colors. In most cases this is the desired behavior, because you don't want to spend tons of ink printing the background of a web page. But in some cases you want to print the background col...
In Chrome 121+ the now supported spec-compliant scrollbar properties override the non-standard `-webkit-scrollbar-*` styles
Up until Chrome 120, scrollbars could only be styled using the various -webkit-scrollbar-*
pseudo elements, e.g. to make the scrollbars have no arrows, be rounded, or with additional margin towards their container.
Starting with [version 121](h...