• Stars
    star
    253
  • Rank 160,776 (Top 4 %)
  • Language
    HTML
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Guidelines, resources, and examples for writing CSS for Trello

Trellisheets

Herein lies guidelines, base styles, tools, and examples for writing CSS for Trello.

Styleguide

The first thing you should do is read the styleguide.md. In general, break up your CSS into as many small, modular, encapsulated parts as possible, then import them as needed.

I’m making a new Trello site. How do I do that, briefly?

Copy the styles from /src. Copy the package.json, gulpfile.coffee, and tools/. Use ./tools/build to build. Tweak the tooling for your project. Strip any packages or components you don’t use.

I’m making a new Trello site. How do I do that, in detail?

We’re using…

You can replace LESS and Gulp with whatever you like, so long as you are adhere to the styleguide which you should read. The styles and tooling here are written for LESS, so it’s a good place to start.

All the packages for building our CSS are on npm. Use npm install to install them. You probably don’t want to include the packages in your project, so include node_modules in your .gitignore, like here.

Gulp builds the LESS files. You can use the example package.json and gulpfile.coffee to get started. Those are just boilerplate; you’ll change these for your project. Specifically, you don’t need http-server. You can just remove the line.

What’s in /tools? ./tools/build just calls the default gulp task which builds the files in /src/entries. These are minified and production-ready. ./tools/watch will watch for changes to style files and automatically rebuild them. Use this for development. You can bring your own scripts and tooling, of course.

You’ll likely have a core.css for all the pages on the site, then other CSS files for specific pages, depending on the size of the project. Gulp will build any files in /src/entries, so just add them there.

Reading through the style guide (have you read it yet?), you’ll see that we try and keep our CSS pretty vanilla. We don’t heavily rely on preprocessors. We mainly just use LESS for imports, variables, some mixins, and very shallow nesting (like &:hover).

Autoprefixer has been tremendously useful. You can write CSS to spec and it will write the vendor-prefixed declarations for you. No more -webkit-*. If we drop browsers in the future, all we have to do is change the browser list in the gulpfile. See browserslist for more information.

Are these the styles we use on the web client?

No. The web client doesn't use the base styles and components provided here, but it does stick to the style guide (please read it). These styles should be used as a starting point for almost everything else: blogs, landing pages, etc.

Where does brand-colors.less come from?

They are exported from Trellicolors, which is the canonical source. You can get them in LESS or SCSS flavored variables. Also check out the Colors section in the Brand Guide for how we use brand colors.

I want to edit or add stylesheets to this repo.

  1. Read the style guide.
  2. npm install
  3. Add CSS to src/**/ and import in respective /src/entries files.
  4. ./tools/watch, to build and watch styles
  5. ./tools/serve, to serve the site
  6. Visit localhost:8080 to test.
  7. Add to public/index.html or another example page.
  8. Make changes in a branch and open a pull request.

More Repositories

1

RxLifecycle

Lifecycle handling APIs for Android apps using RxJava
Java
7,720
star
2

victor

Use SVGs as resources in Android
Java
1,007
star
3

navi

Adds listening capabilities to Activities and Fragments
Java
617
star
4

scientist

A Node.js library for carefully refactoring critical paths in production
CoffeeScript
408
star
5

mr-clean

Don't leak sensitive data.
Kotlin
230
star
6

iconathon

An icon task runner that convert Sketch files to mobile and web formats.
CoffeeScript
219
star
7

power-up-template

A static GitHub pages hosted sample Power-Up
JavaScript
123
star
8

trello-ios-assisted-onboarding

This project is a simple iOS App that hosts the Trello iOS Assisted Onboarding screens.
Swift
44
star
9

node-dependencies

Check out-of-date dependencies for your Node.js app
JavaScript
34
star
10

chromello

A sample Chrome extension written for Trello with a few great features.
JavaScript
32
star
11

api-docs

The documentation site for the Build with Trello content
27
star
12

weather-power-up

A small sample Power-Up for Trello that shows weather data on cards
JavaScript
21
star
13

trellicolors

Converts the Trello brand colors to various formats.
CoffeeScript
19
star
14

category-theory

sometimes math is just too much fun
19
star
15

node-coffee-cache

Caches the contents of required CoffeeScript files so that they are not recompiled to help improve startup time
JavaScript
18
star
16

full-name-splitter

Attempts to split a Latinesque fullname into first name and last name components
JavaScript
17
star
17

glitch-trello-power-up

Example Glitch Project Using Many Power-up Capabilities
JavaScript
15
star
18

glitch-power-up-tutorial-part-one

JavaScript
12
star
19

node-coffee-backtrace

Give some context to uncaught exceptions for Node.js projects written in CoffeeScript
JavaScript
7
star
20

diplomat

A Slack bot for making international collaboration and communication more seamless.
JavaScript
6
star
21

support-team-bookmarklets

Some bookmarklets you can run while using Trello
JavaScript
6
star
22

hearsay

A library for observing things
CoffeeScript
6
star
23

staunton

The massive multiplayer Chess game slash ✨ ReactiveCocoa tutorial ✨
Objective-C
6
star
24

magellan

Mapping and routing for REST endpoints
Objective-C
4
star
25

trello.cards

Less
3
star
26

power-up-on-heroku

A simple Trello Power-Up hosted on Heroku.
JavaScript
3
star
27

code-snippets

Trello Code Snippets Power-Up
JavaScript
3
star
28

yeoman-generator-trello

A Yeoman generator for quickly getting started with the Trello API.
JavaScript
2
star
29

url-parse-fix-auth

Fix url.parse to work with percent (%) characters in auth strings
JavaScript
2
star