- Familiar CSS syntax: Using CSS syntax makes it easier to copy/paste code from devtools and the internet, and a huge productivity boost.
- SCSS like & shorhand: Super nice to write things like
&:hover
without having to write selectors again. - Nesting media queries: Nice to nest media queries inside a style block instead of having to declare it like plain CSS.
- Support for CSS animations: CSS animations are great :)
- No coupling to HTML tag: HTML tags have semantic meaning, and coupling styles to HTML tags makes it harder to re-use the same styles, for example, sometimes some of my buttons and links have similar styles and I don't wanna repeat them.
- Easy to override styles: Overriding styles is one of the main pain points. Many libs don't do anything special and just produce different class names for the styles I declare. Due to no class name having higher specificity, the styles depend on the declaration order which can produce inconsistent
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
Show hidden characters
// Usage: | |
// Go to `Sublime Text > Browse Packages` | |
// Place the file under `User` directory | |
{ | |
"scope": "source.js", | |
"completions": | |
[ | |
// Top-level API |
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
#! /bin/bash | |
RELEASE="$1" | |
JAVA_VERSION="1.8" | |
RED="\033[0;31m" | |
GREEN="\033[0;32m" | |
BLUE="\033[0;34m" | |
ENDCOLOR="\033[0m" |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
// Usage: | |
// Go to `Sublime Text > Browse Packages` | |
// Place the file under `User` directory | |
// Enable the `react-es5` in `sb-setting.sublime-settings` (refer <https://github.com/Pleasurazy/Sublime-Better-Completion/>) | |
{ | |
"scope": "source.js", | |
"completions": | |
[ |
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
public class MainActivity extends ReactActivity { | |
/** | |
* Returns the name of the main component registered from JavaScript. | |
* This is used to schedule rendering of the component. | |
*/ | |
@Override | |
protected String getMainComponentName() { | |
return "MyApp"; | |
} |
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
/* @flow */ | |
import types from 'ast-types'; | |
import { parse } from 'babylon'; | |
const config = { | |
"sourceType": "module", | |
"plugins": [ | |
"jsx", | |
"flow", |
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
// Usage: | |
// Go to `Sublime Text > Browse Packages` | |
// Place the file under `User` directory | |
// Enable the `react` in `sb-setting.sublime-settings` (refer <https://github.com/Pleasurazy/Sublime-Better-Completion/>) | |
{ | |
"scope": "source.js", | |
"completions": | |
[ |
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
const dashify = text => text.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); | |
const unitless = { | |
animationIterationCount: true, | |
borderImageOutset: true, | |
borderImageSlice: true, | |
borderImageWidth: true, | |
boxFlex: true, | |
boxFlexGroup: true, | |
boxOrdinalGroup: true, | |
columnCount: true, |
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
{ | |
"extends": ["tslint:recommended", "tslint-config-prettier"], | |
"rulesDirectory": ["tslint-plugin-prettier", "tslint-microsoft-contrib"], | |
"rules": { | |
"prettier": true, | |
"deprecation": true, | |
"interface-over-type-literal": false, | |
"member-access": [true, "no-public"], | |
"no-default-export": false, |
OlderNewer