Code Monkey home page Code Monkey logo

fozzie-colour-palette's Introduction

Fozzie Colour Palette

npm version Build Status

This module allows projects to import the Just Eat brand colour palette, so that they can always stay up to date with any changes made.

Colours are made available by a number of Sass variables that once the module has been imported can be referenced in a projects Sass files.

Zeplin colour palette

Usage

  1. The easiest way to use fozzie modules in your Sass setup is to use Eyeglass.

If you are using the fozzie gulp build tasks, then Eyeglass is automatically setup ready to use. If not, you can use it in one of the following ways:

  1. Install the fozzie-colour-palette module using NPM or Yarn:

    yarn add @justeat/fozzie-colour-palette
  2. Then within your Sass files, you will need to import this module.

    @import 'fozzie-colour-palette';

You can then use any of the colour variables contained in the module.

It’s recommended that you hook onto and use the variable abstractions such as $color-text and $color-link-default where it makes sense to, rather than directly onto the colour variables. That way your project will require less re-factoring should the colour palette ever get a major overhaul in the future and certain colours get replaced and/or renamed.

Available Colour Schemes

The fozzie-colour-palette allows for the definition of platform specific colour schemes. The colour schemes currently available are:

Just Eat Default Colour Scheme

To apply the default Just Eat colour scheme, simply import this module like so:

  @import 'fozzie-colour-palette';

If you are already importing the base fozzie module there will be no need to import fozzie-colour-palette as this is baked in by default to that module. The default colour scheme will therefore automatically be setup when importing the base fozzie module.

Menulog Colour Scheme

To apply the Menulog colour palette, you need to import the default colour scheme, and then call the applyScheme-menulog mixin, which provides a set of theme overrides.

To do this, define a $theme variable and set it to 'ml'. Then conditionally call the Menulog colour scheme mixin:

  $theme: 'ml';

  @import 'fozzie-colour-palette';

  @if ($theme == 'ml') {
      @include applyScheme-menulog;
  }

If you are using the base fozzie module, simply setting the $theme: 'ml'; before importing the fozzie module will automatically take care of this step for you:

  $theme: 'ml';

  @import 'fozzie'; // this will now load in the fozzie-colour-palette module with Menulog overrides

fozzie-colour-palette's People

Contributors

ashleynolan avatar bulutcy avatar damianmullins avatar dependabot[bot] avatar jonnywidefoot avatar oleksiishevchukje avatar smilburn1990 avatar sonnyprince avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fozzie-colour-palette's Issues

Tidy up fozzie colour theming variables

Fozzie should be able to apply themes, as we have two between styling the main JE brand and Menulog brands.

I think the best way to do this in Fozzie will be to have a theme variable $fozzie-theme which is set to 'je' by default. This could then be changed to 'menulog' when wanting to generate the CSS so that the menulog palette overrides the base set.

This will allow us to keep the overrides within each individual repo (such as fozzie/f-header) and keep the colour palette here as simple as possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.