Skip to content

Instantly share code, notes, and snippets.

@subzey
Created May 13, 2015 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save subzey/66fbb7d5ac931712848c to your computer and use it in GitHub Desktop.
Save subzey/66fbb7d5ac931712848c to your computer and use it in GitHub Desktop.
@document demo
<!DOCTYPE html>
<html>
<head>
<title>@document demo</title>
<style>
body {
text-align: center;
}
.foo {
margin: .5em;
display: inline-block;
width: 40px;
height: 40px;
background: #ccc;
border-radius: 50%;
box-shadow: inset rgba(255, 255, 255, .5) 1px 1px 3px, rgba(0, 0, 0, .25) 1px 1px 3px;
}
@-moz-document regexp(".*1=.*"){
.foo:nth-of-type(1) {
background: green;
}
}
@-moz-document regexp(".*2=.*"){
.foo:nth-of-type(2) {
background: green;
}
}
@-moz-document regexp(".*3=.*"){
.foo:nth-of-type(3) {
background: green;
}
}
@-moz-document regexp(".*4=.*"){
.foo:nth-of-type(4) {
background: green;
}
}
</style>
</head>
<body>
<div class="foo"></div>
<div class="foo"></div>
<div class="foo"></div>
<div class="foo"></div>
<form>
<fieldset>
<p>
<input type="checkbox" name="1"/>
<input type="checkbox" name="2"/>
<input type="checkbox" name="3"/>
<input type="checkbox" name="4"/>
</p>
<p>
<input type="submit">
</p>
</fieldset>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment