A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);| import { Component } from "React"; | |
| export var Enhance = ComposedComponent => class extends Component { | |
| constructor() { | |
| this.state = { data: null }; | |
| } | |
| componentDidMount() { | |
| this.setState({ data: 'Hello' }); | |
| } | |
| render() { |
| // Browser Prefixes | |
| @mixin transform($transforms) { | |
| -webkit-transform: $transforms; | |
| -moz-transform: $transforms; | |
| -ms-transform: $transforms; | |
| transform: $transforms; | |
| } | |
| // Rotate | |
| @mixin rotate ($deg) { |
These rules are adopted from the AngularJS commit conventions.
#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
Include this snippet to promisify any node function that uses the standard form:
var Promise = require( 'es6-promise' ).Promise,
promisify;
promisify = (function ( slice ) {
return function ( fn, context ) {
return function () {
var args = slice.call( arguments );| // ---- | |
| // Sass (v3.3.4) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| // ----------------------------------------------------------------------------- | |
| // Introduction | |
| // ----------------------------------------------------------------------------- | |
| // Here is hacky and experimental solution for cross-scopes extends |
Hey guys! I have a question regarding Sass usage and Gzip compression. If anyone knows something, be sure to share. :)
It's good practice to use Sass @extend rather than including mixins when possible because of the way Sass handles @extend. To put it simple, it doesn't take the CSS content from the extended selector to place them in the extending one. It works the other way around: it takes the extending selector and append it to the extended selector.
| // Simulate a call to Dropbox or other service that can | |
| // return an image as an ArrayBuffer. | |
| var xhr = new XMLHttpRequest(); | |
| // Use JSFiddle logo as a sample image to avoid complicating | |
| // this example with cross-domain issues. | |
| xhr.open( "GET", "http://fiddle.jshell.net/img/logo.png", true ); | |
| // Ask for the result as an ArrayBuffer. | |
| xhr.responseType = "arraybuffer"; |
| @include keyframe(fadeout) { | |
| 0% { | |
| opacity: 1; | |
| } | |
| 100% { | |
| opacity: 0; | |
| } | |
| } |