001 package com.osbcp.css.constants; 002 003 import java.io.Serializable; 004 005 /** 006 * Values for the <i>pseudo selectors, classes and elements</i>. 007 * 008 * @see <a href="http://www.w3schools.com/css/css_pseudo_classes.asp">CSS Pseudo-classes</a> 009 * @author <a href="mailto:christoffer@christoffer.me">Christoffer Pettersson</a> 010 */ 011 012 public enum PseudoSelector implements Serializable { 013 014 /** 015 * Example "a:link" selects all unvisited links. 016 */ 017 LINK, 018 019 /** 020 * Example "a:visited" selects all visited links. 021 */ 022 VISITED, 023 024 /** 025 * Example "a:active" selects the active link. 026 */ 027 ACTIVE, 028 029 /** 030 * Example "a:hover" selects links on mouse over. 031 */ 032 HOVER, 033 034 /** 035 * Example "input:focus " selects the input element which has focus. 036 */ 037 FOCUS, 038 039 /** 040 * Example "p:first-letter" selects the first letter of every <p> element. 041 */ 042 FIRST_LETTER, 043 044 /** 045 * Example "p:first-line" selects the first line of every <p> element. 046 */ 047 FIRST_LINE, 048 049 /** 050 * Example "p:first-child" selects every <p> elements that is the first child of its parent. 051 */ 052 FIRST_CHILD, 053 054 /** 055 * Example "p:before" insert content before every <p> element. 056 */ 057 BEFORE, 058 059 /** 060 * Example "p:after" insert content after every <p> element. 061 */ 062 063 AFTER; 064 065 @Override 066 public String toString() { 067 return name().toLowerCase().replace("_", "-"); 068 } 069 070 }