Skip to content

Instantly share code, notes, and snippets.

@mattfelten
Created May 20, 2014 21:04
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 mattfelten/949d46d2901fbcf39a17 to your computer and use it in GitHub Desktop.
Save mattfelten/949d46d2901fbcf39a17 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
.list-bulletpoint {
// single level of nesting
a {
color: red;
}
// you can have multiple levels of nesting
h3 {
a {
color: blue;
}
}
// & means 'add this thing to the parent thing'
&.somethingweird a {
color: green;
}
// You can still use the child selector >
// This only applies to a elements that are a direct child
> li > a {
color: pink;
}
// Here's a weird one
// It means if our current thing is within another thing
.parentelement & {
color: brown;
}
// Showing how to do cool stuff with links
a {
color: teal;
&:hover {
color: blue;
}
&:focus,
&:active {
color: black;
}
}
}
.list-bulletpoint a {
color: red;
}
.list-bulletpoint h3 a {
color: blue;
}
.list-bulletpoint.somethingweird a {
color: green;
}
.list-bulletpoint > li > a {
color: pink;
}
.parentelement .list-bulletpoint {
color: brown;
}
.list-bulletpoint a {
color: teal;
}
.list-bulletpoint a:hover {
color: blue;
}
.list-bulletpoint a:focus, .list-bulletpoint a:active {
color: black;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment