This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simple singleton instance getter - one line | |
Class Foo { | |
private static $instance = null; | |
public static function get_instance() { | |
return self::$instance ?: self::$instance = new self; | |
} | |
// ...class code | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
// Class component | |
.component{ | |
color:red; | |
@at-root section#{&} { | |
color:blue; |