As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
var subpixelWordSpacing = false; | |
if (document.defaultView && document.defaultView.getComputedStyle) { | |
// Store the original word spacing on the document element | |
var originalWordSpacing = document.defaultView.getComputedStyle(document.documentElement, null).wordSpacing; | |
// Set the word-spacing to half a pixel | |
document.documentElement.style.wordSpacing = '0.5px'; | |
// This will return either 0px or 1px if sub-pixel word-spacing is not supported, otherwise |
// `Default font for form elements. | |
//---------------------------------------------------------------------------------------------------- | |
$form-font-stack: Arial, "Liberation Sans", FreeSans, sans-serif !default; | |
$form-font-size: 13px !default; | |
// `Form Element Reset. | |
//---------------------------------------------------------------------------------------------------- | |
input::ms-clear, |
html:-moz-full-screen { | |
background: red; | |
} | |
html:-webkit-full-screen { | |
background: red; | |
} | |
html:-ms-fullscreen { | |
background: red; |
// --- | |
// Sass (v3.2.9) | |
// --- | |
// Styling elements based on sibling count | |
// http://lea.verou.me/2011/01/styling-children-based-on-their-number-with-css3/ | |
@mixin adjust-form-siblings-count($max: 10, $property: width) { | |
$i: 0; | |
@while ($i < $max) { |
I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.
I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...
This is a curated set of conventions and best practices for Stylus, an expressive, dynamic, robust and advanced CSS preprocessor. Frustrated with there not being a set of conventions set in place (that could be easily found), I set forth to find out on my own.
/* | |
* Title Caps | |
* | |
* Ported to JavaScript By John Resig - http://ejohn.org/ - 21 May 2008 | |
* Original by John Gruber - http://daringfireball.net/ - 10 May 2008 | |
* License: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
(function(){ | |
var small = "(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v[.]?|via|vs[.]?)"; |
This was originally posted on 2011-07-11 to http://andrewho.co.uk/weblog/clean-urls-on-jekyll-apache
I use a static site generator, specifically [jekyll][], to transform some
templates into a set of static *.html
files. However, I like to keep the URLs
looking clean, and not display the .html
extension both because I think it
looks better and also so that the URLs purely reflect the content and not the
underlying files or CMS used to serve that content. In short, whilst the file
being served might be $DOCUMENT_ROOT/weblog/title.html
, the canonical URL for
that resource should be /weblog/title
. Here's how I do that in .htaccess
.
// this is a hacky and brutal polyfill to somewhat implement zoom in firefox | |
// https://caniuse.com/#feat=css-zoom | |
// it allows to use jQuery's $('.element').css({zoom: 1.5}); | |
// there is no effort to actually implement a normal css polyfill | |
// this polyfill also doesn't work when the zoomed element has margins since they are used to fake the new size. | |
$.cssNumber.zoom = true; | |
if (!("zoom" in document.body.style)) { | |
$.cssHooks.zoom = { | |
get: function(elem, computed, extra) { |