Skip to content

Instantly share code, notes, and snippets.

@sueannaj
sueannaj / tooltip-mixins.scss
Last active November 18, 2022 10:09
Tooltip mixins
/*****************************************************************************
Tooltip Mixins
This features a series of mixins used together to customize tooltip
designs.
The mixins rely on a few assumptions:
-- The light source for the drop shadow is the same for all tooltips.
-- The pointer is square with no border-radius.
@sueannaj
sueannaj / _helpful-scss-mixins.scss
Last active September 11, 2018 16:47
Helpful SCSS Mixins
/*****************************************************************************
SCSS Mixin Collection for Coders Using the Sass Preprocessor
These mixins aid with layout, positioning, and display of elements in
CSS authoring.
This file uses the SCSS syntax. You can modify it if you use Sass syntax
instead.
@sueannaj
sueannaj / translation-tool.js
Last active July 7, 2017 18:11
Translation tool - apply pseudotranslations to text in HTML files
document.addEventListener('DOMContentLoaded', function() {
var translateButton = document.createElement('button');
translateButton.innerHTML = 'Translate';
translateButton.addEventListener('click', processPageForTranslation);
translateButton.setAttribute("style", "position: fixed; top: 0; left: 0; opacity:.5; z-index: 1000;");
translateButton.setAttribute('data-exclude-pseduotranslation', '');
document.getElementsByTagName('body')[0].appendChild(translateButton);
}, false);
function isAllWhitespace(childNode) {
@sueannaj
sueannaj / Selector test - chained selectors in CSS
Created December 17, 2014 06:01
Selector test - chained selectors in CSS
.container4094 .extraContainer p {background: bisque; color: crimson;}
.container4095 {background: bisque;}
.container4096 {background: bisque;}
@sueannaj
sueannaj / Selector test - comma-separated selectors in CSS
Last active August 29, 2015 14:11
Selector test - comma-separated selectors in CSS
.container4094, .dummySelector {background: bisque;}
.container4095 {background: bisque;}
@sueannaj
sueannaj / IE interpretation of a ruleset with comma-separated selectors
Created December 17, 2014 05:35
IE interpretation of a ruleset with comma-separated selectors
.body-col {
/* styles */
}
section {
/* styles */
}
nav .nav-items {
/* styles */
@sueannaj
sueannaj / 2nd ruleset example - comma-separated selectors
Last active August 29, 2015 14:11
2nd ruleset example - comma-separated selectors
.body-col, section, nav .nav-items, footer .footer-links li {
/* styles */
}
@sueannaj
sueannaj / 1st ruleset example - three selectors, no commas
Last active August 29, 2015 14:11
1st ruleset example - three selectors, no commas
.body-col nav .nav-items {
/* styles */
}
@sueannaj
sueannaj / Sample CSS rule
Last active August 29, 2015 13:56
Sample CSS rule
/* Sample rule 1 -- ".frame nav" is the selector group; width and border-right are the declarations. */
.frame nav {width: 179px; border-right: 1px solid #bfbfbf;}
/* Sample rule 2 -- ".frame nav" and ".frame header" are the selectors groups; font-weight is the declaration. */
.frame nav, .frame header {font-weight: bold;}
@sueannaj
sueannaj / Zoosk heart icon as a data URI
Created December 12, 2013 00:06
Zoosk heart icon as a data URI
<img width="79" height="66" title="Zoosk heart icon" alt="Zoosk heart icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAABCCAYAAAAWqotYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA/JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjVEMjA4OTI0OTNCRkRCMTE5MTRBODU5MEQzMTUwOEM4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjRFRjVGNzdBNUFFNTExRTNCNzg2RjUxMDc5RUFDOEMwIiB4bXBNTTpJbnN0YW5jZ