Skip to main content

Themes

WebJet Elements Templates | Change default themes and background colors of the application

WebJet Elements offers a number of global variables that can be used to modify the default template throughout the application. Application colors are useful for changing the appearance of many WebJET components.

Application colours

Application colours play an important role in the application and are often used in different contexts. They are particularly handy for seamlessly creating dark themes or topics that are in line with your brand identity.

NameDescription
--wj-border-colorDetermines the color of the borders throughout the application
--wj-border-radiusDetermines the rounding of edges throughout the application
--wj-border-sizeDetermines the width of the margins throughout the application
--wj-border-styleDetermines the style of borders throughout the application
--wj-colorSpecifies the text colour across the application
--wj-font-familySpecifies the font of texts throughout the application
--wj-font-family-secondarySpecifies the secondary font for texts throughout the application
--wj-force-mac-font-familySpecifies the font of texts for Mac devices throughout the app
--wj-font-sizeSpecifies the size of text across the application
--wj-line-heightDetermines the height of texts throughout the application
NameDescription
--wj-backdropColor backdrop overlay overlays and modal backgrounds and backgrounds
--wj-backdrop-opacityOpacity of the backdrop
--wj-border-radius-circleSpecifies the default roundness size in %
--wj-border-radius-largeBorder radius for large-sized elements
--wj-border-radius-mediumBorder radius for medium-sized elements
--wj-border-radius-pillBorder radius for pill-shaped elements
--wj-border-radius-smallBorder radius for small-sized elements
--wj-border-radius-x-largeBorder radius for extra-large-sized elements
--wj-border-sizeEdge thickness
--wj-border-styleStyle of borders
--wj-box-shadow-largeBox shadow for large-sized elements
--wj-box-shadow-mediumBox shadow for medium-sized elements
--wj-card-backgroundBackground color for card elements
--wj-card-colorText colour for card elements
--wj-color-whiteWhite colour
--wj-color-blackBlack colour
--wj-font-familySpecifies the font of texts throughout the application
--wj-font-family-secondarySpecifies the secondary font for texts throughout the application
--wj-force-mac-font-familySpecifies the font of texts for Mac devices throughout the app
--wj-font-sizeBase font size
--wj-font-size-2x-largeFont size for 2x large text
--wj-font-size-3x-largeFont size for 3x large text
--wj-font-size-4x-largeFont size for 4x large text
--wj-font-size-largeFont size for large text
--wj-font-size-mediumFont size for medium text
--wj-font-size-smallFont size for small text
--wj-font-size-x-largeFont size for extra-large text
--wj-font-size-x-smallFont size for extra-small text
--wj-line-heightLine height for text elements

Graduated colours

While updating the background (--wj-background-color) and text (--wj-text-color) variables will change the appearance of the application for most components, there are certain Ionic components where this may look non-standard or non-functional. This will be more noticeable when using a darker theme.

In some components, we use a shade darker than the background or lighter than the text. For example, the heading text of an item may need color #404040, which is a few shades lighter than our default text color. Meanwhile, the background of the loading component is a shade darker than white, using #f2f2f2. We use graded colours to define these slight deviations. When updating the background color or text of an application, it is important to update the step colors.

By default, Ionic's step colors start at the default background color value of #ffffff and blend with the text color value of #000000 using an increasing percentage. The full list of step colours is given in the generator below.

Graduated colour generator

Create a custom background theme and text color for your app. Update the hexadecimal values of the background colors or text below and then copy and paste the generated code directly into the WebJET Elements project.

Pozadie

Text

:root {
	--wj-background-color: #ffffff;
	--wj-background-color-rgb: 255,255,255;

	--wj-text-color: #000000;
	--wj-text-color-rgb: 0,0,0;

	--wj-color-step-1: #f2f2f2;
	--wj-color-step-2: #e6e6e6;
	--wj-color-step-3: #d9d9d9;
	--wj-color-step-4: #cccccc;
	--wj-color-step-5: #bfbfbf;
	--wj-color-step-6: #b3b3b3;
	--wj-color-step-7: #a6a6a6;
	--wj-color-step-8: #999999;
	--wj-color-step-9: #8c8c8c;
	--wj-color-step-10: #808080;
	--wj-color-step-11: #737373;
}