Skip to content

Instantly share code, notes, and snippets.

@depoulo
depoulo / gist:5832073
Last active January 3, 2025 15:23
CSS-only multi-line ellipsis with generated content. License: http://www.wtfpl.net/txt/copying/
@import "compass/css3/images";
// CSS-only multi-line ellipsis with generated content
// yields `position:relative`, so remember to declare an eventual `position:absolute/fixed` *after* including this mixin
@mixin limitLines(
$maxLinesPortrait, // Mandatory: The number of lines after which the clipping should take action.
$maxLinesLandscape: $maxLinesPortrait, // You may provide a different line limit for landscape orientation.
// Note that 'portrait' is our default orientation. However, if you omit $maxLinesLandscape,
// the value of $maxLinesPortrait is used for whatever orientation (that is, without a media query).
@trepmal
trepmal / ajax-password-protected.php
Last active July 16, 2017 12:14
[WordPress] Ajax Password Protected Posts. Updated and moved to https://github.com/trepmal/ajax-password-protected
<?php
/*
Plugin Name: Ajax Password Protected
Plugin URI: https://github.com/trepmal/ajax-password-protected
Description: Ajax-ified password-protected form
Version: 0.1
Author: Kailey Lampert
Author URI: http://kaileylampert.com
Copyright (C) 2012 Kailey Lampert