Skip to content

Instantly share code, notes, and snippets.

Martin Saulis bstst

Block or report user

Report or block bstst

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View SVGArc.css
.loader {
width: 100px;
height: 100px;
}
.path {
stroke: #00AB2B;
stroke-width: 2;
}
View outline.js
document.querySelectorAll('*').forEach(item => item.style = `${item.style.cssText}; outline: 2px solid rgba(255, 0, 0, 0.2);`)
View September 2017 iOS WebKit input focus position: fixed.md

Mobile Safari does not support position: fixed when an input focused and virtual keyboard displayed.

To force it work the same way as Mobile Chrome, you have to use position: absolute, height: 100% for the whole page or a container for your pseudo-fixed elements, intercept scroll, touchend, focus, and blur events.

The trick is to put the tapped input control to the bottom of screen before it activates focus. In that case iOS Safari always scrolls viewport predictably and window.innerHeight becomes exactly visible height.

Open https://avesus.github.io/docs/ios-keep-fixed-on-input-focus.html in Mobile Safari to see how it works.

Please avoid forms where you have several focusable elements because more tricks to fix position will be necessary, those were added just for demonstration purposes.

@bstst
bstst / how-to-set-up-stress-free-ssl-on-os-x.md
Last active Nov 14, 2017 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine
View how-to-set-up-stress-free-ssl-on-os-x.md

How to set up stress-free SSL on an OS X development machine

Install [Homebrew][] if it's not already installed

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Resolve a top-level domain for all development work

@bstst
bstst / config.json
Last active Mar 7, 2016 — forked from anonymous/config.json
Bootstrap Customizer Config
View config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
@bstst
bstst / gulpfile.coffee
Last active Aug 29, 2015
working coffee gulp file, with browserify (watchify) and less builders / watchers
View gulpfile.coffee
gulp = require 'gulp'
coffee = require 'gulp-coffee'
util = require 'gulp-util'
less = require 'gulp-less'
watch = require 'gulp-watch'
livereload = require 'gulp-livereload'
watchify = require 'watchify'
browserify = require 'browserify'
coffeeify = require 'coffeeify'
You can’t perform that action at this time.