
// Utility
// ––––––––––––––––––––––––––––––––––––––––––––––––––

// Clear a float with .clearfix
.clearfix

	&:after
		clear: both
		content: ' ' // The space content is one way to avoid an Opera bug.
		display: table

// Float either direction
.float-left
	float: left

.float-right
	float: right

// Dark UI tweaks
.dark
	// Base
	color: $color-initial

	// Form
	input[type='email'],
	input[type='number'],
	input[type='password'],
	input[type='search'],
	input[type='tel'],
	input[type='text'],
	input[type='url'],
	input[type='color'],
	input[type='date'],
	input[type='month'],
	input[type='week'],
	input[type='datetime'],
	input[type='datetime-local'],
	input:not([type]),
	textarea,
	select
		color: $color-quaternary
		background-color: transparentize($color-tertiary, 0.5)
		border: .2rem solid transparentize($color-tertiary, 0.5)

		&:focus
			border-left: .3rem solid $color-primary

	input[type='checkbox']
		outline: .2rem solid $color-tertiary

	// Link
	a
		&:focus,
		&:hover
			color: $color-initial

	// Button
	.button,
	button,
	input[type='button'],
	input[type='reset'],
	input[type='submit']
		&.button-clear
			&:focus,
			&:hover
				color: $color-initial

	// Tables
	td,
	th
		border-bottom: .1rem solid $color-tertiary

	@media screen and (max-width: 40.0rem)
		table
			tbody
				border-right: solid .1rem $color-tertiary
			tbody
				tr
					border-right: solid .1rem $color-tertiary

	// Code
	code
		background: $color-tertiary
	
	pre
		background: $color-tertiary