CSS in a growing web application is really, really hard. I'm doing CSS related projects on various side projects and my internships in New York and Vienna for a while. Every time I'm starting a new CSS project from scratch I always feel like: This time I need to do it right. The hard truth is, every CSS project I touched until now, didn't feel right, even if they had been touched by Senior Creative Developers (That's what experienced CSS enthusiasts have been called at my internship in New York). At some point the whole styling of your application just feels bloated with special rules everywhere. They either come from browser incompatibilities or designers who want to move a heading 1px to the top and 3px to the bottom. Even though most requirements from designers might seem stupid for us developers, it's the designers job to make the product, landing page or whatever else he was designing look awesome. As developers we somehow need to implement and deliver th
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
$colorTypes: (low, medium, high, ultra-high); | |
@for $i from 0 to length($colorTypes) { | |
&.color-amount-#{unquote(nth($colorTypes, $i+1))} { | |
fill: mix(#19436B, #50B694, $i*length($colorTypes)); | |
} | |
} |
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/sh | |
set -e | |
# Feel free to change any of the following variables for your app: | |
TIMEOUT=${TIMEOUT-60} | |
APP_ROOT=/home/blogger/apps/blog_app/current | |
PID=$APP_ROOT/tmp/pids/unicorn.pid | |
CMD="cd $APP_ROOT; bundle exec unicorn -D -c $APP_ROOT/config/unicorn.rb -E production" | |
AS_USER=blogger |
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
require 'zip' | |
require 'fileutils' | |
class ZipFileExtractor | |
# Convenience Method | |
def self.unzip_file_to(*args) | |
new(*args).unzip | |
end | |
def initialize(origin_path, destination_path) |
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
html, body { | |
-moz-osx-font-smoothing: grayscale; | |
-webkit-font-smoothing: antialiased; | |
text-shadow: 1px 1px 1px rgba(0,0,0,0.004); | |
} |
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
// File: tests/unit/helpers/format-date-test.js | |
/* jshint expr:true */ | |
import { expect } from 'chai'; | |
import { | |
describe, | |
it | |
} from 'mocha'; | |
import time from 'crewmeister/helpers/time'; | |
describe('TimeHelper', function() { |
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
JSON.stringify({list: undefined}) // => “{}” | |
JSON.stringify({list: null}) // => “{list: null}” |
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
@media all and (-webkit-min-device-pixel-ratio: 0) { | |
select.form-control { | |
// Make background transparent so that the arrow is "clickable" | |
position: relative; | |
z-index: 1; | |
background: transparent; | |
-webkit-appearance: none; | |
} | |
.select--wrp { |
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
git diff --diff-filter=ACMRTUXB --name-only master...feature-branch | grep '\.rb' | xargs rubocop -a --config .rubocop.yml --force-exclusion |
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 assert = (description, test) => { | |
if(test()) { console.log(`✔ ${description}`); } | |
else { console.error(`✖ ${description}`); } | |
}; | |
const describe = (description, tests) => { | |
console.log('----------------------------'); | |
console.log(`%c${description}`, `font-weight:800;`); | |
tests(); | |
}; |
OlderNewer