Skip to content

Instantly share code, notes, and snippets.

View nhall's full-sized avatar

Nick Hall nhall

  • Fastspot
  • Baltimore
View GitHub Profile
@nhall
nhall / vcard.css
Last active December 17, 2015 11:59
Empty CSS selectors for a .vcard address.
.vcard {
position: absolute;
top: 2em;
left: 2em;
}
.vcard a {} /* Phone number links in mobile browsers */
.vcard a:hover {}
.vcard .org {}
.vcard .adr {}
.vcard .street-address {}
/*
-----------------------------------------------------------------------------
=Debugging Styles. Delete or comment these out once your site works well.
----------------------------------------------------------------------------- */
body:before {
content: "less than 320px";
font-size: 1.1em;
line-height: 1;
font-weight: bold;
padding: .5em;
@nhall
nhall / hi-res.css
Created May 19, 2013 04:50
CSS for swapping hi-res background images.
/*
-----------------------------------------------------------------------------
=High Resolution Images
----------------------------------------------------------------------------- */
@media screen and (-webkit-min-device-pixel-ratio: 1.3),
screen and (min--moz-device-pixel-ratio: 1.3),
screen and (-o-min-device-pixel-ratio: 2 / 1),
screen and (min-device-pixel-ratio: 1.3),
screen and (min-resolution: 192dpi),
screen and (min-resolution: 2dppx) {
@nhall
nhall / cycle.css
Last active December 17, 2015 12:59
Cycle plugin defaults.
ul.slideshow,
ul.slideshow li {
height: 300px;
width: 450px;
margin: 0;
padding: 0;
overflow: hidden;
}
.slideshow { position: relative; }
.slideshow li {
// Modernizr mixin to create .modernizr selector -
// codepen.io/sturobson/pen/xcdha
@mixin fallback($property, $support: true) {
@if $support == true {
.#{$property} & {
@content;
}
}
@else {
.no-#{$property} & {
@nhall
nhall / _config.scss
Last active August 29, 2015 13:56
Sample Sass _config.scss partial
/* _config.scss v1.0.0 */
// Vendor Dependencies
// ==========================================================================
@import "compass";
// Site attributes
// ==========================================================================
$attr_border_box: true !default;
@nhall
nhall / SassMeister-input.scss
Created May 14, 2014 17:49
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// Using `&` operator and parent selectors
/*! All Sass versions */
.parent {
background-color: #0e0e0e;
@nhall
nhall / SassMeister-input.scss
Created May 14, 2014 17:55
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// Using `@at-root`
.parent {
background-color: #0e0e0e;
@nhall
nhall / SassMeister-input.scss
Created August 27, 2014 15:52
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0)
// ----
// _config.scss
$homepage-id: 7170;
// _home.scss
@nhall
nhall / navigation.html
Last active June 7, 2019 17:37
HTML for a flexible and accessible navigation element.
<nav aria-labelledby="nav_title">
<h2 class="visually_hide" id="nav_title">Site Navigation</h2>
<ul aria-labelledby="nav_title">
<li><a href="#">Academics</a></li>
<li><a href="#">Admission</a></li>
<li><a href="#">Student Life</a></li>
<li><a href="#">News</a></li>
<li><a href="#">About</a></li>
</ul>
</nav>