Skip to content

Instantly share code, notes, and snippets.

@heyMP
Created June 18, 2014 01:16
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 heyMP/dd7134762fc38d0c3211 to your computer and use it in GitHub Desktop.
Save heyMP/dd7134762fc38d0c3211 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@function splitString($string, $var, $location: 'first')
{
$length : str-length($string);
$index : str-index($string,$var);
$first : str-slice($string,0,$index - 1);
$second : str-slice($string,$index + 2,$length);
@if $location == 'first' {
@return $first;
} @else {
@return $second;
}
}
.node-article {
$block: '.node-article';
&__element {
$element: 'element';
content: 'test';
@at-root #{}#{$block} {
content: 'testing';
}
}
}
Invalid CSS after " @at-root #{": expected expression (e.g. 1px, bold), was "}#{$block} {"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment