/nested-style-component-themes-poc

A POC to determine if styled component themes can be nested.

Primary LanguageJavaScript

Proof of concept for css in js

3 differant themes

Prerequisites

Install

    git clone git@github.com:nialloc9/nested-style-component-themes-poc.git

    cd nested-style-component-themes-poc

    npm install

Run

    npm start

Questions to answer?

Answers

  • Themes can be nested.

  • In the event the provider does not have a value specified in it's theme it will reach for the parent provider to see if it has a value specified. It will keep going up the tree until it finds a provider that has the value specified.

  • The nearest provider value will override their corresponding parent theme values.

  • If no value is found undefined will be used.