Skip to content

Instantly share code, notes, and snippets.

View AndrejsAbrickis's full-sized avatar
🎾

Andrejs Abrickis AndrejsAbrickis

🎾
View GitHub Profile
@AndrejsAbrickis
AndrejsAbrickis / trello-css-guide.md
Last active August 29, 2015 14:27 — forked from bobbygrace/trello-css-guide.md
Trello CSS Guide

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="container">
<div class="row-container headings">
<div class="cell wider fixed"><br><br></div>
/* Some CSS reset */
* {
box-sizing: border-box;
}
/* Base styles to make it look a bit more like table */
.headings,
.row {
border: 1px solid #ddd;
}
@AndrejsAbrickis
AndrejsAbrickis / .bowerrc
Last active March 20, 2019 00:35
Migrate from bower to webpack
{
"directory": "wwwroot/scripts/bower"
}
@AndrejsAbrickis
AndrejsAbrickis / bower.json
Created June 12, 2017 17:24
Bower to webpack
{
"name": "bower-to-webpack",
"dependencies": {
"datetimepicker": "~2.5.4",
"jquery": "~2.1.4",
"jquery-ui": "~1.11.2",
"lodash": "^4.17.2"
}
}
@AndrejsAbrickis
AndrejsAbrickis / .bowerrc
Last active June 12, 2017 18:32
Bower to webpack
{
"directory": "wwwroot/bower"
}
@AndrejsAbrickis
AndrejsAbrickis / package.json
Last active June 12, 2017 18:57
package.json
{
"name": "bower-to-webpack",
"description": "Bye bye Bower! Or how to migrate from Bower to npm and Webpack",
"author": "Andrejs Abrickis",
"dependencies": {
"jquery": "^2.1.4",
"jquery-datetimepicker": "https://github.com/xdan/datetimepicker/archive/2.5.4.tar.gz",
"jquery-ui-dist": "^1.12.1",
"lodash": "^4.17.2"
},
@AndrejsAbrickis
AndrejsAbrickis / CopyWebpackPlugin
Last active June 12, 2017 17:48
CopyWebpackPlugin
new CopyWebpackPlugin([
{
from: './source/script_a.js',
to: './target'
},
{
from: './source/css_a.js',
to: './target'
}
])
@AndrejsAbrickis
AndrejsAbrickis / webpack.config.js
Last active June 12, 2017 18:34
Bower to webpack
const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
// assets.js
const Assets = require('./assets');
module.exports = {
entry: {
app: "./app.js",
const CSS = [
'jquery-ui-dist/jquery-ui.min.css',
'jquery-datetimepicker/jquery.datetimepicker.css'
];
const JS = [
'jquery-ui-dist/jquery-ui.min.js',
'jquery-datetimepicker/jquery.datetimepicker.min.js',
'jquery/dist/jquery.min.js',
'lodash/lodash.min.js'
];