GithubHelp home page GithubHelp logo

themes-7's Introduction

The @dojo/themes repository has been deprecated. Dojo themes have been merged into @dojo/widgets.

Dojo Themes

Package that contains a collection of Dojo themes.

Please Note: If you are looking for Dojo 1 themes, these have been relocated to @dojo/dijit-themes. The github url registered with bower has also been updated to point to the new repository, if you encounter any issues please run bower cache clean and try again.

Usage

With Dojo applications

  1. Install @dojo/themes with npm i @dojo/themes.
  2. Import the theme CSS into your project's main.css: @import '~@dojo/themes/dojo/index.css.
  3. Import the theme module and pass it to the widgets you need themed:
import theme from '@dojo/themes/dojo';

render() {
	return w(Button, { theme }, [ 'Hello World' ]);
}

With custom elements

  1. Install @dojo/themes with npm i @dojo/themes.
  2. Add the custom element-specific theme CSS to index.html: <link rel="stylesheet" href="node_modules/@dojo/themes/dojo/dojo-{version}.css">.
  3. Add the custom element-specific theme JS to index.html: <script src="node_modules/@dojo/themes/dojo/dojo-{version}.js"></script>.

Composition

To compose and extend the themes within a dojo project, run npm i @dojo/themes and use the css-module composes functionality. Variables can be used by using @import to import the variables.css file from a theme. This functionality is added by a post-css plugin within the dojo build command.

/* myButton.m.css */
@import '@dojo/themes/dojo/variables.css';

.root {
	composes: root from '@dojo/themes/dojo/button.m.css';
	background-color: var(--dojo-green);
}

Generating typings

The following npm scripts are available to facilitate development:

  • build:tcm: generate .m.css.d.ts files
  • watch: generate .m.css.d.ts files in watch mode

themes-7's People

Contributors

aciccarello avatar agubler avatar bryanforbes avatar ericos avatar maier49 avatar matt-gadd avatar mwistrand avatar nicknisi avatar rorticus avatar smhigley avatar tomdye avatar

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.