Skip to content

Instantly share code, notes, and snippets.

@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] {
@migerh
migerh / xrandr scale example
Created January 19, 2011 22:30
get a higher resolution on low res screens via xrandr with scaling and output the high res one on an external monitor
#!/bin/bash
# ~/Scripts/1024scale.sh
# change display settings to clone mode, 1024x768 pix for VGA (projector) and scales it to the resolution of 1024x600 of the internal display
xrandr --newmode "1024x768" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync
xrandr --addmode VGA1 1024x768
xrandr --fb 1024x768
xrandr --fb 1024x768 --output LVDS1 --mode 1024x600 --scale 1x1.28 --panning 0x0
xrandr --output VGA1 --same-as LVDS1 --mode 1024x768