Skip to content

Instantly share code, notes, and snippets.

/*
gutenbook.css
Chris Silverman - v 0.9
- - -
Use: install a plugin like Stylebot, and then apply this CSS to gutenberg.org. This
provides (in my mind) a slightly better reading experience than Safari Reader, and
definitely a better reading experience than the default HTML versions of their books.
*/
.chapter {
@csilverman
csilverman / dillingest.css
Created October 26, 2022 19:51
This is custom CSS for the dillinger.io Markdown editor. It makes editing text a little nicer. Set it up in something like Stylebot.
/*
Dillingest 1.0
==============
Chris Silverman
2022/10/26
This is custom CSS for the dillinger.io Markdown editor. It
makes editing text a little nicer. Set it up in something
like Stylebot to use on the Dillinger site.
/// Rem output with px fallback.
///
/// @group Typography
/// @author Adam Laki
///
/// @param {Number} $sizeValue - Element's font size
/// @output `font-size` with fallback
///
/// @example scss - Set rem font-size to `.foo`
/// .foo {
:root {
--burgundy-light: #951829;
--gray-light: #d7cfcc;
--gray-xxxlight: #f7f5f1;
--gray-xxxlight-border: 1px solid rgba(212, 204, 202, 0.3);
--gray-charcoal: #222;
--gold: #C6AA76;
details {
summary {
list-style: none;
&::marker,
&::-webkit-details-marker {
display:none;
}
}
}
var discreteElements = document.getElementsByClassName('sticky-frame')
for (var i = 0; i < discreteElements.length; i++) {
new Waypoint({
element: discreteElements[i],
handler: function(direction) {
if ( direction == 'down' )
this.element.classList.add('stuck');
else
this.element.classList.remove('stuck');
},
@csilverman
csilverman / _visually-hidden.css
Created April 28, 2021 17:11
Accessibly hide text
.visually-hidden {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
@csilverman
csilverman / newfolder.scpt
Created January 16, 2021 22:24
Create new folder on desktop
tell application "Finder"
set p to path to desktop -- Or whatever path you want
make new folder at p with properties {name:"New Folder"}
end tell