Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Adds :target to list of supported pseudo classes #52

Merged
merged 1 commit into from

2 participants

@janiv

Adds :target to the pseudos variable in the coffee scripts and
compiles the changes to the kss.js file.

Adding :target allows us to show these modifiers in the generated
style guides. Without support, targetted styles cannot be displayed
without user interaction.

@janiv janiv Adds :target to list of supported pseudo classes
Adds :target to the pseudos variable in the coffee scripts and
compiles the changes to the kss.js file.

Adding :target allows us to show these modifiers in the generated
style guides. Without support, targetted styles cannot be displayed
without user interaction.
1cf23ea
@benschwarz
Collaborator

Dig it. Such a fan of the target selector.
Also, going to add :checked

@benschwarz benschwarz merged commit 11bd45c into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 3, 2013
  1. @janiv

    Adds :target to list of supported pseudo classes

    janiv authored
    Adds :target to the pseudos variable in the coffee scripts and
    compiles the changes to the kss.js file.
    
    Adding :target allows us to show these modifiers in the generated
    style guides. Without support, targetted styles cannot be displayed
    without user interaction.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +1 −1  example/public/javascripts/kss.js
  2. +2 −2 lib/kss.coffee
View
2  example/public/javascripts/kss.js
@@ -5,7 +5,7 @@
function KssStateGenerator() {
var idx, idxs, pseudos, replaceRule, rule, stylesheet, _i, _len, _len2, _ref, _ref2;
- pseudos = /(\:hover|\:disabled|\:active|\:visited|\:focus)/g;
+ pseudos = /(\:hover|\:disabled|\:active|\:visited|\:focus|\:target)/g;
try {
_ref = document.styleSheets;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
View
4 lib/kss.coffee
@@ -1,7 +1,7 @@
# This class scans your stylesheets for pseudo classes, then inserts a new CSS
# rule with the same properties, but named 'psuedo-class-{{name}}'.
#
-# Supported pseudo classes: hover, disabled, active, visited, focus.
+# Supported pseudo classes: hover, disabled, active, visited, focus, target.
#
# Example:
#
@@ -9,7 +9,7 @@
# => a.pseudo-class-hover{ color:blue; }
class KssStateGenerator
constructor: ->
- pseudos = /(\:hover|\:disabled|\:active|\:visited|\:focus)/g
+ pseudos = /(\:hover|\:disabled|\:active|\:visited|\:focus|\:target)/g
try
for stylesheet in document.styleSheets
Something went wrong with that request. Please try again.