Articles
Currently I am using both Grunt tasks grunt-sass
and grunt-contrib-sass
to compile sass (strictly scss). The first one is faster than second one, but second one generating source maps that just works. Unfortunately grunt-sass
source maps somehow doesn’t work properly and browsers can’t use them.
I got an error message today and I’d like to share simple solution to that. The scss code more or less looks like:
@include example() {
[...]
@import 'part1';
@import 'part2';
[...]
}
Above code is compiled fine using grunt-sass
, but grunt[......]
Read more
Wondering what’s the userAgent
for Edge (Spartan)? Here we go:
Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; NOKIA; Lumia 730 Dual SIM) Apple WebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Mobile Safari/537.36 Edge/12.0
You still think you should use browser sniffing? :-)[……]
Read more
If you are curious what’s the navigator.userAgent
for the Chrome browser on ChromeOS then here we go:
Mozilla/5.0 (X11; CrOS x86_64 6310.68.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.96 Safari/537.36
[……]
Read more
I often see outline: 0;
or outline: none;
in CSS just because we don’t like the ring around actionable elements. Because it’s ugly sometimes and we don’t want to have it in our application / web site. I think this is mostly misunderstanding the mission of that ring. By removing this ring we solving one problem, but in the same time we creating another. I think the trade-off would be removing focus ring for the mouse users only, but not for keyboard navigation.
Let me provide here important cite from W3C about focus ring: Do not use any other[……]
Read more
There is already nice article about Using Fiddler to force a web service to support CORS for debugging. However, it was written in 2013 and I am going here to little bit update the code for Fiddler v4.5.1.0.
So, you need to add:
public static RulesOption("Force CORS")
BindPref("fiddlerscript.rules.m_ForceCORS")
var m_ForceCORS: boolean = false;
just at the beginning of class Handlers
.
In function static function OnBeforeResponse(oSession: Session) {
add:
if (m_ForceCORS && (oSession.oRequest.headers.HTTPMethod == "OPTIONS" || o[......]Read more
At some point I wanted to change default core git editor from Vim to Notepad++. There are couple of solutions how to do that. However, this:
git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
works for me on Windows 8.1. By writing this short post here I may save your time in researching.[……]
Read more
This post will be super short. So, you want to prevent screen reader from reading any information about image? To achieve that you need to use aria-hidden="true"
. Example:
<img src="http://www.ctomczyk.pl/wp-content/themes/ct/images/icoFeed.png" alt="" aria-hidden="true" role="presentation"/>
[……]
Read more
Introduction
At some point you may want to have bidirectional (RTL) support in your application / web site. That means you want to have a support for Arabic, Hebrew and other right-to-left languages. Before everything let me quote from W3C some of the definitions:
- Bidirectional text – in languages that use right-to-left scripts any embedded text from a left-to-right script and all numbers progress visually left-to-right within the right-to-left visual flow of the text. (Of course, English text on this page could also contain bidirectio[……]
Read more
During work with GruntJS task named Saas I got stuck on using gem
command (the gem
command allows you to interact with RubyGems). The problem was with SSL certificate. So, how to fix SSL problem when using Ruby “gem install”? Replace the ssl gem
source with non-ssl as a temporary solution:
gem sources -r https://rubygems.org/
gem sources -a http://rubygems.org/
[……]
Read more
Running the code in PhantomJS might bring source code instead of page (the screenshot from that is generated using page.render
);

The reason of that is because the file has encoding UTF-8 with BOM. You’ll need to convert encoding to UTF-8 without BOM. After that the page is rendered properly.
[……]
Read more
Pagination