Skip to content

Instantly share code, notes, and snippets.

@seavor
seavor / viewunits.scss
Last active July 30, 2022 22:04
Sass Mixin for V-Units to PXs for unsupported devices (vw, vh, vmin, vmax)
@function vunit($input, $width, $height){
@if unit($width) != px or unit($height) != px {
@error "function vunit() dimensions should contain a px unit. +[" + $width + ", " + $height +"]";
}
// Store $input unit
$unit: unit($input);
// Remove unit from $input and convert to ratio
$ratio: $input / ($input * 0 + 1) / 100;
// Calc and store return values

Ideas For iFrame communication between self and dashboard

w/ window.postMessage()

  1. Site loads

  2. Load iFrame in initial default state (1st class/1st report)

@seavor
seavor / indesign-xml-json.txt
Created November 17, 2016 22:08
InDesign Tagging & Translation Process
1) Tag Content in InDesign files
2) Export from InDesign as raw XML (no XSLT)
3) Validate XML against XSD
- Enforce attributes on select tags
- Escape special problem characters
- Should be simple enough to be one-size-fits-all
4) PHP translation script
- Escape select HTML tags before JSON translation (to reduce data depth)
- Transform XML into JSON via Saxon\C-PHP software
- Unescape html tags
@seavor
seavor / Contract Killer 3.md
Created February 8, 2017 04:49
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post