Skip to content

Instantly share code, notes, and snippets.

View mhokane's full-sized avatar

Mark Ho-Kane mhokane

View GitHub Profile
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active January 16, 2024 01:17
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
$(function() {
// Tweaked from: https://gist.github.com/mattstauffer/3835881
// No guarantees
// 1. include Isotope.js
// 2. include this file
// 3. customize Isotope options at the bottom of this file
// 4. add "margin: 0 auto" to the isotope container
$.Isotope.prototype._getMasonryGutterColumns = function() {
@jpoehls
jpoehls / toggle-hidden-files.scpt
Created June 26, 2012 20:04
Toggle hidden files in Finder. (AppleScript)
-- Save this to your documents and tell Alfred to look for (and execute AppleScripts).
-- There has never been an easier to way to toggle hidden files in Finder.
try
set state to do shell script "defaults read com.apple.finder AppleShowAllFiles" as string
if state is "0" then
do shell script "defaults write com.apple.finder AppleShowAllFiles -bool TRUE"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles -bool FALSE"
end if