Skip to content

Instantly share code, notes, and snippets.

View jonasjacek's full-sized avatar

¯\_(ツ)_/¯ jonasjacek

View GitHub Profile
@jonasjacek
jonasjacek / .htaccess
Created January 5, 2021 20:07 — forked from markhowellsmead/.htaccess
Detect browser language and redirect to appropriate language version of the website
# Redirect visitors to the root domain path (e.g. www.mywebsite.ch) to the appropriate language version
# Fallback to English version if no matching browser language defined
# Based on language version being at e.g. www.mywebsite.ch/de/
# language is ES-MX (Mexico)
RewriteCond %{HTTP:Accept-Language} ^es-mx [NC]
RewriteRule ^$ /mx/ [L,R=301]
# language is ES-ES (Spain)
RewriteCond %{HTTP:Accept-Language} ^es-es [NC]
@jonasjacek
jonasjacek / reset.sass
Created February 5, 2019 16:45
Reset CSS / SASS based on Eric Meyer's reset.css 2.0. All deprecated HTML elements have been removed from this reset.
// Reset CSS / SASS based on Eric Meyer's reset.css 2.0. All deprecated HTML elements have been removed from this reset.
html, body, div, span, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strong, sub, sup, var, b, u, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, nav, ruby, section, summary, time, mark, audio, video
margin: 0
padding: 0
border: 0
font-size: 100%
font: inherit
vertical-align: baseline
@jonasjacek
jonasjacek / visually-hidden.css
Last active February 20, 2020 19:37
CSS to create visually hidden, yet accessible (WCAG) elements in HTML
/* CSS to create visually hidden, yet accessible elements in HTML */
.visuallyHidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
# Version 2019011300, Last Updated Sun Jan 13 07:07:01 2019 UTC
AAA
AARP
ABARTH
ABB
ABBOTT
ABBVIE
ABC
ABLE
ABOGADO
@jonasjacek
jonasjacek / css-contrast-check-for-accessibility-purposes.css
Created August 23, 2016 07:39
Quick CSS contrast check for accessibility purposes.
/* For more detailed accessibility checks:
http://www.dmoz.org/Computers/Internet/Web_Design_and_Development/Authoring/Online_Tools/Checking_and_Debugging/Accessibility/
*/
html {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}
@jonasjacek
jonasjacek / keybase.md
Created June 24, 2016 13:25
keybase verification

Keybase proof

I hereby claim:

  • I am jonasjacek on github.
  • I am jonasjacek (https://keybase.io/jonasjacek) on keybase.
  • I have a public key whose fingerprint is 0132 5F45 82F2 FEEA AC8D 71E2 14CA 6B7D 863A 2264

To claim this, I am signing this object:

@jonasjacek
jonasjacek / invisible-yet-accessible-headings.css
Created May 30, 2016 16:19
Invisible, yet accessible heading
/* Invisible, yet accessible heading
Source: http://jsbin.com/savabo/edit?html,css,output
Author: Steve Faulkner
Hint: Do not use display:none or visibility:hidden in your CSS stylesheet,
as in that case the heading content will never be vocalized by screen
readers, and more generally by assistive technologies.
*/
@jonasjacek
jonasjacek / Mozilla Firefox - Set and Toggle Browser Cache
Last active August 17, 2017 11:30
Set and toggle cache options in browsers based on Mozilla Firefox
# Mozilla Firefox - Set/Toggle Cache Options
# This document describes several ways to set/toggle cache options
# in browsers based on Mozilla Firefox.
# network.http.use-cache
The preference network.http.use-cache controls whether to
cache files retrieved by HTTP or HTTPS either in memory or on disk.
1. type about:config
@jonasjacek
jonasjacek / notifications.css
Last active October 18, 2016 12:09
Notifications (error, success, warning, notice)
/* NOTIFICATIONS
----------------------------------------------------------------------------- */
.error, .success, .warning, .notice {
font-size: 0.9em;
margin: 1.5em 0;
padding: 0.3em 0.5em;
text-align: center;
}
.error {
background: #ffecec;