Skip to content

Instantly share code, notes, and snippets.

{
"events": [
{
"event": {
"id": 1016,
"title": "Hardin Open Workshops - EndNote (Online Version)",
"updated_at": "2018-06-02T10:57:39-05:00",
"created_at": "2018-06-02T10:57:39-05:00",
"url": "http://www.lib.uiowa.edu/hardin/workshop/",
"urlname": "hardin-open-workshops-endnote-online-version",
@regnskygge
regnskygge / _standard-mixins.scss
Last active August 24, 2016 15:39
Mixins I use in almost every project. They have dependencies that are not included here.
// Set rem font sizing
@mixin font-size($sizeValue: 1.6) {
font-size: ($sizeValue * 10) + px;
font-size: $sizeValue + rem;
}
// Hides element offscreen while maintaining accessiblity
@mixin hide-offscreen {
position: absolute;
left: -10000px;
@regnskygge
regnskygge / _color-contrast.scss
Created August 24, 2016 15:15
SASS function for determining whether black or white is the most contrasty with a given background color
// Function: Returns the most contrasty color to the input color
// Source: https://codepen.io/bluesaunders/pen/FCLaz (his was way better than the one I wrote myself)
$dark-text-default: #000 !default;
$light-text-default: #fff !default;
// Calculate brightness of a given color.
@function brightness($color) {
@return ((red($color) * .299) + (green($color) * .587) + (blue($color) * .114)) / 255 * 100%;
}