Need help or advice? Please feel free to call us at 01268 655977

Introduction

Theme documentation

This documentation is a guide to theme customisation for theme developers.

There's a lot to an Evance theme. Our aim is to deliver a highly configurable theme with consistent terminology and succinct reusable code.


Text

Text sizes & variations

This theme comes pre-built with the following text sizes/variations.

All font sizes on this theme scale between minimum and maximum sizes - based on rem units, where 1rem is equal to 16px. This allows us to have large bold headings on desktop that scale gracefully for mobile devices. Since we now use clamp() to control font scaling, we can utilize CSS variables succinctly without the need for media queries.

Some text size modifier classes use em to allow the font to scale relative to the parent element's font size. These are noted below.

To avoid CSS bloating, this theme only uses the size variations below.

Heading 1

<h1> / .heading-1 --heading-1-size

Heading 2

<h2> / .heading-2 --heading-2-size

Heading 3

<h3> / .heading-3 --heading-3-size

Heading 4

<h4> / .heading-4 --heading-4-size
Heading 5
<h5> / .heading-5 --heading-5-size
Heading 6
<h6> / .heading-6 --heading-6-size

Eyebrow

.text-eyebrow --text-eyebrow-size

Subtitle

.text-subtitle --text-subtitle-size

Large

.text-large - scales relative to parent font-size. --text-large-size

Medium

Default --text-size

Small

.text-small - scales relative to parent font-size. --text-small-size
100m2 <sup>
100m2 <sub>

Lists

Ordered & unordered lists

Avoid applying complex styles to the default ordered and unordered lists. Use modifider classes instead.

Unordered lists (default)
<ul>

  • List item 1
  • List item 2
  • List item 3
  • List item 4

Ordered lists (default)
<ol>

  1. List item 1
  2. List item 2
  3. List item 3
  4. List item 4

Tick lists
<ul class="list-ticks">

  • Tick List item 1
  • Tick List item 2
  • Tick List item 3
  • Tick List item 4

Icons

Default icons

There are two methods of implementing icons in this theme:

  1. Web font icons using <i class="icon">
  2. SVG icons using <ev:icon>

How and when to use each are outlined below.

Modifier classes for icons work on both method of implementing icons.

Web font icons

Web font icons use the .icon class.

~/theme/common/fonts/spark-icons/selection.json contains all icon data which can be managed via IcoMoon. To make changes load the selection.json file into IcoMoon, load/change your icons. Then, import the resulting web fonts into Evance and modify the style.css file as required.

When importing new SVGs into IcoMoon be sure to reset any fill properties to currentColor unless the design requires coloured icons.

Web font based icons are required for some UI elements. For example, the select icon is used by drop-down menus.

SVG icons

SVG icons use the <ev:icon> tag in conjunction with your theme's Icon Registry .

General

Brand

SVG icons are currenly used in non-editable regions and allow you to customize the look-and-feel of the UI even within shared/protected templates.

Adding custom SVG icons

If you would like to add custom SVG icons to your theme, it is recommended to add these into a custom prefix to avoid conflicts with changes to Evance's default icon registry. For example, if you wanted an icon representing delivery, use <ev:icon ref="custom.delivery" />.

Icon sizes

Icons in Evance themes have a standardized default size of 24×24px. If you require a different size use a .size-* modifier class. If you wish to change the pre-built sizes, you can modify the CSS variable values in ~/theme/common/css/variables.css.

.size-small --icon-size-small
Default --icon-size
.size-large --icon-size-large
.size-xl --icon-size-xl


Buttons

Defaullt buttons

Some buttons are associated with Evance's built-in <ev:button>, which are used for Forms and Checkout. However, some are custom to this theme.

Evance's built-in <ev:button> styles support buttons as <button> or as a <a> depending on whether an href attribute is supplied. Below, we output both so you can ensure styling for both tag types is identical in appearance.

<button> <a>
Subtle button

.button-subtle
Should typically have a transparent idle state. Therefore is useful for secondary actions, or navigational icons.

Default button

.button
The default button style is used in most cases for linking between pages where the action is not impactful enough to be the primary action for the viewable area. Also the default style for <ev:button>

Action button

.button-primary
Use a primary button to call attention to an action on a form or to highlight the strongest call to action on a page or viewable area.

Proceed button
Danger button

.button-danger
Represents an irreversible/destructive action such as deleting. Very rarely used on websites.

Inverse button

.button-inverse
Typically used in overlays over background images.


Rounded buttons

The .shape-round modifier is intended for use with icon buttons, or numbering (e.g. with pagination).



1 2 3

Button sizes

Using a .size-* modifier.

Default Large .size-large

Button loading state

Use the .is-loading modifier only with <ev:button> when implementing load interactions.

Button with icons

The <ev:button> tag supports both webfont and SVG icons.

<ev:button icon="cart" value="Add to cart" />
<ev:button icon-end="go.forward" value="Continue" />
<ev:button icon-start="cart" icon-end="go.forward" value="Continue" />
<ev:button icon="wishlist.off" class="shape-round" />

Forms

Form fields

Input fields MUST have a minimum font-size of 16px/1rem to avoid zoom-in on focus on mobile devices.

<ev:textfield>
Text fields should default to full-width of their available space and should have the same size variations as <ev:button>.

Hellohello

<ev:textarea>
Text areas should have the same border and highlights as <ev:textfield>.

255 Characters remaining

<ev:switch>

<ev:checkbox>

<ev:radio>

<ev:select>

Untitled Button

<?ev:bubble?> test

  • First item in bubble
  • Second item in bubble
  • Third item in bubble

Aspect Ratio Test

memberships & certifications