Skip to content

Instantly share code, notes, and snippets.

@arkadylukashov
arkadylukashov / Fixed footer
Last active August 29, 2015 14:14
Fixed footer
@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] {
@joaocunha
joaocunha / Simple feature detection for :checked pseudo-selector.md
Last active August 29, 2015 13:56
Simple feature detection for :checked pseudo-selector

If you have ever accessibly styled a checkbox/radio button using the :checked pseudo-selector, you know that IE8- don't support it. We usually have two options: either a custom Modernizr test or either a conditional IE class.

There's a simpler way to detect it and it doesn't rely on anything external:

/* hide the default element only on browsers that support :checked */
input:checked, input:not(checked) {
    display: none;
}
 
<?php
/*
* WordPress Breadcrumbs
* author: Dimox
* version: 2019.03.03
* license: MIT
*/
function dimox_breadcrumbs() {
/* === OPTIONS === */
@elclanrs
elclanrs / v2p.html
Created December 19, 2012 22:10
Use CSS viewport units with jQuery
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="v2p.js"></script>
<style type="text/css" media="all">
body { margin: 0; }
div {
background: #fa7098;
}