On Design Systems
... or what I learned building them

đź‘‹ My name is Dominik

Content

What we started with

TODO

Bootstrap 3 fork

No open source

What we learned #1

TODO

Modules

Version each module independently

Open source

Clear upgrade paths

What we built then

TODO

Everything’s open source

TODO

Each module is a git submodule

  • TODO

Testing with older versions

TODO

The blender

  • Build your assets online and download a zip TODO
  • Each zip file comes with a "version string" TODO
  • Return to your version anytime TODO
  • Funky add-ons for engagement and smiles TODO

Change-logs FTW

TODO

LESS

  • Everything in mixins
    
    ._badges() {
    	@badge-background: rebeccapurple;
    
    	.badge {
    		background-color: @badge-background;
    	}
    }
    
    @import (reference) "file-above.less";
    
    .badge-label {
    	color: @badge-background;
    }
    
    .badge-variation {
    	color: rebeccapurple;
    }
  • Settings per module via a var
    
    @brand: WBC;
    
    ._badges( @brand ) {
    
    	/*
    	 *  SETTINGS
    	 */
    	.getBrand() when (@brand = BOM) {
    		@background: #1f252c;
    	}
    	.getBrand() when (@brand = STG) {
    		@background: #78be20;
    	}
    	.getBrand() when (@brand = WBC) {
    		@background: #621a4b;
    	}
    	.getBrand();
    
    	.badge {
    		background-color: @background;
    	}
    }
  • Lazy loading in less
    
    @brand: WBC;
    
    ._badges( @brand ) {
    
    	/*
    	 *  SETTINGS
    	 */
    	.getBrand() when (@brand = BOM) {
    		@background: #1f252c;
    	}
    	.getBrand() when (@brand = STG) {
    		@background: #78be20;
    	}
    	.getBrand() when (@brand = WBC) {
    		@background: #621a4b;
    	}
    	.getBrand();
    
    	.badge {
    		background-color: @background;
    	}
    }
    
    @brand: STG;

What we learned #2

TODO

5 core modules are 4 too many

TODO

Nothing is ever small enough

TODO

Dependencies need more juice

FOSS needs marketing

TODO

What we’re building now

TODO

cli first

TODO

Monorepo

TODO

npm modules

TODO

peerDependencies

TODO

pancake

  • Batter TODO
  • Syrup TODO
  • Cream TODO

Flavors of modules

TODO

Presets

TODO

Sass

  • Split into variables and output TODO
  • Sass versioning
    
    $name: "@gov.au/footer";
    $version: "0.1.6";
    $dependencies: (
    	("@gov.au/core", "0.1.0"),
    	("@gov.au/lists", "0.1.1"),
    );
    
    @include versioning-add( $name, $version, $dependencies );
    TODO
  • Awesome mixins, great error messages
    
    /**
     * Return a space value based on 4 and the unit em
     *
     * @param  {number} $number - The space as a multiplier of 4
     * @return  {number}               - The space in em's
     */
    @function uikit-space( $number ) {
    	@if type-of( $number ) != 'number' {
    		@error "Captain I'm giving it all she's got but: the uikit-space mixin only takes a number!";
    	}
    
    	@if type-of( $number ) == 'number' and not unitless( $number ) {
    		$number: $number / ($number * 0 + 1);
    	}
    
    	$space: $number * 4;
    
    	@return #{ $space }em;
    }

When?

TODO

Questions?