Basics

Source: index.md

Installation

Lightelligence Styles can be integrated to any project by installing the npm package via npm.

$ npm install @lightelligence/styles --save-dev

Usage

In your index.html page you need to make sure you add the index.css file :

<html>
<head>
    <title>My awesome Lightelligence App</title>
    <link href="node_modules/@lightelligence/styles/dist/index.css" rel="stylesheet"/>
</head>
<body>
<div class="olt-Frame">
    <button class="olt-Button">Hello World</button>
</div>
</body>
</html>

The index.css file exist under node_modules/@lightelligence/styles/dist/index.css. In most cases you need to add the whole dist/ directory to your public/dist directory of your project to make those files accessible by the browser

The index.css file itself will load the necessary fonts from dist/fonts, so you don't need to worry about adding those manually.

Make sure that you also wrap your content in a olt-Frame class, which will set defaults for most of the common elements. Part of the properties set by olt-Frame are colors, fonts, box-sizing, etc.

Known issues

Currently there is a bug with cssnano, which affects users of this styleguide to minify the output of their CSS files.

The bug is reported and the following workaround needs to be used until the external library is updated :

In package.json file of your application please include :

{
 "name": "...",
 ...
 "cssnano": {
    "preset": [
      "default",
      {
        "calc": false
      }
    ]
  }
}

Concepts

Source: core/concepts.md

Modular Notation

Lightelligence UI relies on SUIT css naming patterns. If you got used to lowercase and dashes, it might look unfamiliar at first, but this will change very quickly because SUIT just makes sense where classic BEM either gets messy or just isn't suited, i.e. responsive utilities aren't covered by classic BEM.

Namespace

In order to prevent collisions, any of the css names get prefixed with the olt- namespace except for the state-classes which should never go alone.

OLT stands for OSRAM Lightelligence

Components

Component names are denoted in pascalcase, e.g. Card.

Syntax: olt-<Component>

Descendants

Descendant names are camelcase. Separated by their parent component's name by a single dash, e.g. Card-header.

Syntax: olt-<Component> olt-<ComponentName>-<descendant>

Modifiers

Modifier names add up to the component, separated by double-dash, e.g. Card--primary.

Syntax: olt-<Component>--<modifier>

States

State css names are camelcase and prefixed by is-, e.g. Button is-disabled.

Syntax: olt-<Component> is-<state>

Utilities

All utility classes are camelcase and prefixed with u-.

You may target particular screens by adding a breakpoint-infix, e.g. md- targets everything above. Combine multiple classes in order.

Syntax: olt-u-[sm-|md-|lg-|xl-]<utility>{Value1|Value2|...}.

Interactions

All interactive components work out of the box without the need of Javascript. Have a look at the examples to find out what is particularly needed in order to make it happen. However, you could always opt-out of this behavior by simply omitting trigger elements and control state classes via Javascript.

Colors

We support a set of Colors

Color Name Utility Class
Primary olt-u-colorPrimary
Secondary olt-u-colorSecondary
Info olt-u-colorInfo
Warning olt-u-colorWarning
Error olt-u-colorError
Success olt-u-colorSuccess
Light ( White ) olt-u-colorLight
Dark olt-u-colorDark

Screen

Source: core/screen.md

Breakpoints

The styleguide uses the following breakpoints :

Name Extra small Small Medium Large Extra large
Breakpoint <576px ≥576px ≥768px ≥992px ≥1200px
Prefix xs sm md lg xl

Custom media

In order to make your own custom stuff responsive along the lines of this without hardcoding breakpoints in media-queries, @lightelligence/styles provides suitable definitions as @custom-media-rules.

@custom-media --olt-xs-down (max-width: 575.98px);
@custom-media --olt-sm-up (min-width: 576px);
@custom-media --olt-sm-down (max-width: 767.98px);
@custom-media --olt-md-up (min-width: 768px);
@custom-media --olt-md-down (max-width: 991.98px);
@custom-media --olt-lg-up (min-width: 992px);
@custom-media --olt-lg-down (max-width: 1199.98px);
@custom-media --olt-xl-up (min-width: 1200px);

Usage

@media (--olt-md-up) {
  /* Styles for tablet portrait and above */
}

Please note that @custom-media at-rule as being part of "Media Queries Level 5" isn't supported natively by any browser today, so you will need to transpile your css for getting it to work, e.g. using postcss-custom-media.

White labeling

Source: core/white-labeling.md

Description

Lightelligence styles supports limited white labeling that can achieve the effect of having a feel of your application to match different corporate styles.

The white labeling feature includes changing the primary color :

Color Name CSS Custom Property
Primary --olt-colorPrimary

Exposed custom properties

The design system's primary color that can be white labeled is exposed as CSS Custom Properties. However since there are additional shades of that color, which are mainly a mix between white and dark, there are also additional exposed CSS Custom Properties.

All those additional shades, though, can be derived by a color calculation between the Primary / Secondary and a black or white colors. See example below on how to properly use the white labeling feature with JavaScript.

:root {

  /**
   * The two major colors that are selectable
   */
  --olt-primaryColor: #f60;

  /**
   * Color variations that are calculations based on the above colors.
   */
  --olt-primaryColor-white-10: #fff0e6;
  --olt-primaryColor-white-15: #ffe8d9;
  --olt-primaryColor-white-20: #ffe0cc;
  --olt-primaryColor-white-30: #ffd1b3;
  --olt-primaryColor-white-40: #ffc299;
  --olt-primaryColor-white-50: #ffb380;
  --olt-primaryColor-white-60: #ffa366;
  --olt-primaryColor-white-70: #ff944d;
  --olt-primaryColor-white-80: #ff8533;
  --olt-primaryColor-black-10: #1a0a00;
  --olt-primaryColor-black-15: #260f00;
  --olt-primaryColor-black-20: #331400;
  --olt-primaryColor-black-30: #4d1f00;
  --olt-primaryColor-black-40: #662900;
  --olt-primaryColor-black-50: #803300;
  --olt-primaryColor-black-60: #993d00;
  --olt-primaryColor-black-70: #b34700;
  --olt-primaryColor-black-80: #cc5200;
  --olt-primaryColor-secondary-30: #562b1f;
  --olt-primaryColor-secondary-40: #6e341a;
  --olt-primaryColor-secondary-80: #cf5509;

  /**
   * Color that are exposed as read-only.
   */
  --olt-readonly-secondaryColor: #0d122c;
  --olt-readonly-errorColor: #fd5952;
  --olt-readonly-successColor: #02bf1b;
  --olt-readonly-infoColor: #46b4cd;
  --olt-readonly-warningColor: #ffc94d;
  --olt-readonly-lightColor: #fff;
  --olt-readonly-darkColor: #000;
  --olt-readonly-gray100Color: #f5f6f8;
  --olt-readonly-gray200Color: #e9ecef;
  --olt-readonly-gray300Color: #e3e4e5;
  --olt-readonly-gray400Color: #d0d1d3;
  --olt-readonly-gray500Color: #a7a8aa;
  --olt-readonly-gray600Color: #58585a;
  --olt-readonly-gray700Color: #343a40;
  --olt-readonly-gray800Color: #2e3338;
  --olt-readonly-gray900Color: #212529;

}

Example

ActionButton

Source: components/ActionButton/ActionButton.md

Description

ActionButtons can be used with <button> and <a> elements and occupy the olt-ActionButton* class names.

The Action Button consists of three states, depending on the cursor's distance to the click-area:

  • Default: The label is hidden and only the icon is displayed
  • Approximation: If the cursor is over a containing element (or near the button) the icon's base and the label appear
  • Hover: When the cursor directly approaches the click-area the base will expand and include the label. Also the label and the icon will come closer.

Use --default, --primary, --destructive and --confirmative modifiers to define the type of the button and set its respective color.

Additional modifiers:

  • --fixed ensures that the label is always shown
  • --standalone hides the label
  • --base always shows the base (hover effect)
  • --proximity show the icon base (proximity effect)
  • --proximity-area define a surrounding element as proximity area to apply the proximity effect when the mouse approaches the button
Default
Icon Left
Proximity
Fixed Label
Standalone
Standalone with Base
Icon Right
Icon Right (fixed label w/ base)
Icon Right (proximity)
Default
Primary
Destructive
Confirmative

On Tablet and Mobile Devices the action button is always displayed as the "Standalone with Base" variant to increase and show the click-area. If the standalone version cannot properly represent the action it should be used together with the label ("Fixed Label") depending on the context.

Disabled

The button can be disabled using the --disabled modifier. This overrides any colors being set through other modifiers.

Avatar

Source: components/Avatar/Avatar.md

Description

Avatars can be used with <i> elements and occupy the olt-Avatar* class names.

The default avatar is primary color while size adopts to current font-size.

Colors

The Avatar can be rendered with any of the color classes :

Sizes

To change the size of the Avatar you can use the size modifiers. We currently support :

  • small
  • medium
  • large

Preset modifiers

There are also two pre-configured aliases for semantic class naming :

  1. olt-Avatar--user which is the same as olt-Avatar-primary
  2. olt-Avatar--tenant which is the same as olt-Avatar-info

Button

Source: components/Button/Button.md

Description

Buttons can be used with <button>, <a>, and <input type="button"> elements and occupy the olt-Button* class names.

Buttons enable users to perform clear actions with a single click. There are three levels of emphasis: primary, secondary and tertiary. For labeling purposes please use the Chip Component.

Types

Buttons communicate actions that users can take. They are typically placed throughout the UI, in places like Dialogs, Modals, Forms, Cards, Toolbars...

Different types of buttons communicate different actions.

Progressing Actions

The standard set of buttons can be used whenever an action is part of a process or opens up a variety of options to the user.

Contrasting levels of emphasis help the user to differentiate between important and less important actions. These levels can also be used to guide a user to a preferred outcome.

Light Theme (default)

Default
Decoration Left
Decoration Right
Disabled
Primary
Actions with a clear intention (Filled)
Secondary
Other possible options (Outline)
Tertiary
Less important actions
(Text, Gray 500)
Tertiary / Action
Recurring actions (Text, Primary)

Dark Theme

Default
Decoration Left
Decoration Right
Disabled
Primary
Actions with a clear intention (Filled)
Secondary
Other possible options (Outline)
Tertiary
Less important actions
(Text, Gray 500)
Tertiary / Action
Recurring actions (Text, Primary)

Completing Actions

This set of buttons can be used to complete or terminate an action. The labels should give a clear indication of what the user can expect after clicking.

Destructive Actions

Buttons for destructive actions are available with three levels of emphasis and two to three varations in style. Primary and Secondary Buttons are available with a leading decoration. Tertiary Buttons can also be used with trailing decoration, since they can be part of a Cell when used in Card Table.

Levels of emphasis

  • Primary (Filled)
  • Secondary (Outline)
  • Tertiary (Text, Error)

Light Theme

Default
Decoration Left
Decoration Right
Disabled
Primary
Critical actions without second warning (for example definitely deleting an item)
Secondary
Destructive action as a possibility but not the only option available.
A warning in form of a Modal is necessary to prevent an unexpected outcome.
Tertiary
Less important destructive actions.
A warning in form of a Modal is necessary to prevent an unexpected outcome.

Dark Theme

Default
Decoration Left
Decoration Right
Disabled
Primary
Critical actions without second warning (for example definitely deleting an item)
Secondary
Destructive action as a possibility but not the only option available.
A warning in form of a Modal is necessary to prevent an unexpected outcome.
Tertiary
Less important destructive actions.
A warning in form of a Modal is necessary to prevent an unexpected outcome.

Confirmative Actions

Buttons for confirmative actions are available with three levels of emphasis and two varations in style. Primary and Secondary Buttons are available with a leading decoration.

Levels of emphasis

  • Primary (Filled)
  • Secondary (Outline)
  • Tertiary (Text, Success)

Light Theme

Default
Decoration Left
Decoration Right
Disabled
Primary
A successful outcome of the action is guaranteed
Secondary
Preferred positive actions with medium emphasis
Tertiary
Less important actions

Dark Theme

Default
Decoration Left
Decoration Right
Disabled
Primary
A successful outcome of the action is guaranteed
Secondary
Preferred positive actions with medium emphasis
Tertiary
Less important actions

Emphasis

Buttons can have the following modifiers to indicate its emphasis: olt-Button--primary (default), olt-Button--secondary and olt-Button--tertiary.

Theme

Buttons support two different themes: olt-Button--light (default) and olt-Button--dark.

Types

Besides emphasis and theme a buttons type plays a major role for its appearance. There are four modifiers olt-Button--default (default), olt-Button--desctructive, olt-Button--confirmative and olt-Button--action. The latter olt-Button--action is only available in combination with olt-Button--tertiary (tertiary emphasis).

Disabled

Use the disabled attribute to disable buttons.

Progress

Use the --progress modifier to show the progress animation on your button.

Decorations

To show decorations inside a button, use the olt-Button-icon-left and olt-Button-icon-right class. This will show an icon on the left or right of the label.

The pagination use-case is an exception from the above button rules and uses the olt-Button--pagination-prev and olt-Button--pagination-next modifiers. This will show an icon on the left or right side of the label and render the button as secondary. It also reduces the horizontal padding around the text by 50%.

Card

Source: components/Card/Card.md

Description

You can use the Card component to wrap content inside a card-like block. This component occupies olt-Card* class names.

The card can be a div, button or an a element, which makes it suitable for actions on click, hover, etc.

Examples

Card with title, description and context icon

A Card can be additionally rendered with context icon on the top right, used for drop down menu or additional context actions.

Card with title, description, content and context icon

Any Card can contain additional content inside .olt-Card-content if provided.

Card with title, content and image

A Card can also have an image with an img tag and olt-Card-image class name.

Colors

The Cards can be rendered with any of our background colors :

Selectable Card

By adding olt-Card--selectable you can make a card "selectable", which will add additional :hover and :active states to it.

Edit Card

By adding olt-Card--edit you can make a card "editable", which will add an additional edit button at the top right corner as well as :hover and :active states to it.

Nested Cards

Nested Cards will be shown with a border around them.

Chip

Source: components/Chip/Chip.md

Description

Chip can be used with <span> elements and and occupy the olt-Chip* class names.


Default
Decoration Left
Decoration Right
Count
Count + Decoration Left
Shortened
Selectable
Disabled
Default
Tags, Attributes, Filters
Clickable but no Call To Action
Label
Label
Label
Label 42
Label 42
Lore...sum
Label
Disabled
Dark
Medium Emphasis
Tags, Attributes, Filters
Clickable but no Call To Action
Label
Label
Label
Label 42
Label 42
Lore...sum
Label
Disabled
Light
Medium Emphasis
Tags, Attributes, Filters
Clickable but no Call To Action
Label
Label
Label
Label 42
Label 42
Lore...sum
Label
Disabled
Primary / Active
Medium emphasis
Active Tags, Attributes, Filters
Clickable but no CTA
Label
Label
Label
Label 42
Label 42
Lore...sum
Label
Disabled

Default
Decoration Left
Count
Count + Decoration Left
Shortened
Error
Negative Emphasis
No destructive CTA
Not Clickable
Label
Label
Label 42
Label 42
Lore...sum
Success
Positive Emphasis
No confirmative CTA
Not Clickable
Label
Label
Label 42
Label 42
Lore...sum
Info
Neutral Emphasis
Important Notes & Announcements
Not Clickable
Label
Label
Label 42
Label 42
Lore...sum

Colors

Chip can be rendered with different colors by adding one of the following modifiers :

  • --dark
  • --light
  • --primary/--active
  • --error
  • --success
  • --info

Variations

Disabled

Chips which are not --error, --success or --info can have the is-disabled state which will make them disabled

Selectable

Chips which are not --error, --success or --info can have the --selectable modifier which will make them selectable

Decorations

Icons

Each Chip can have an icon rendered on the left or on the right side by adding olt-Chip-icon-left or olt-Chip-icon-right and the desired Icon class to the component's classes.

Bubble

Each Chip can have an additional bubble rendered on the top right side by adding --withBubble modifier and a descendant -bubble component inside the Chip.

The Chip's bubble can also be an icon by adding olt-Chip-bubble-icon and the desired icon class to the bubble element.

Bubble's colors can also be fixed with one of the additional modifier for the bubble's element. They only work with the default Chip.

  • olt-Chip-bubble--info
  • olt-Chip-bubble--success
  • olt-Chip-bubble--warning
  • olt-Chip-bubble--error

Dialog

Source: components/Dialog/Dialog.md

Description

Dialog occupies olt-Dialog* class names. It provides a modal dialog to show any kind of content and is also utilized for dynamic lists and steppers.

The dialog changes to full screen on mobile and tablet devices.

Dialog Title
This is the dialog description.

A title of a card

Lorem ipsum dolor

<input data-toggle="dialog" id="dialog-toggle-1" type="checkbox">
<label class="olt-Button" for="dialog-toggle-1">Open</label>
<div class="olt-Dialog">
  <div class="olt-Dialog-window">
    <label class="olt-Dialog-close" for="dialog-toggle-1"></label>
    <div class="olt-Dialog-title">Dialog Title</div>
    <div class="olt-Dialog-description">This is the dialog description.</div>
    <div class="olt-Dialog-content">
      <div class="olt-Card">
        <div class="olt-Card-header">
          <h4 class="olt-Card-title">
            A title of a card
          </h4>
          <p class="olt-Card-description">
            Lorem ipsum dolor
          </p>
        </div>
      </div>
      <div class="olt-Dialog-footer">
        <label class="olt-Button" for="dialog-toggle-1">Finish</label>
      </div>
    </div>
  </div>
</div>

Filter

Source: components/Filter/Filter.md

Description

You can use the Filter component to show a dropdown that opens a filter popup and displays additional attributes. This component occupies olt-Filter* class names.

You can add any element inside the filters dropdown. The --active modifier identifies an active filter. The olt-Filter-bubble class is used to place a bubble inside the filter intended to show the number of elements being displayed after the filter is applied.

Icon

Source: components/Icon/Icon.md

Description

The Icon component is an interface for the official OLT Icons. This component occupies olt-Icon* class names and can be used with <i> element.

Icons
Icons
account
add-default
add-outline
app
arrow-down
arrow-falling
arrow-left
arrow-raising
arrow-right
arrow-up
attachment
brightness
bullet-big
bullet-small
calendar
cart
check-default
check-filled
check-outline
chevron-down
chevron-left
chevron-right
chevron-up
clock
cloud
code
copy
dashboard
delete
device
document
download
duplicate
edit
emission
enter
failure
favorite-outline
favorite
fill
filter
floorplan
help-filled
help-outline
home
hourglass
humidity
info-filled
info-outline
key
led
lifetime
light
external
live
location
locked
logo
logout
maintenance
message
move
close
handle
menu
ellipsis
notification-active
notification-default
office
power
redirect
redo
refresh
remove-filled
remove-outline
resize
restricted
rocket
save
savings
search
hidden
visible
sensor
settings
success
temperature
undo
unlocked
upload
user-add
user-default
user-filled
warning-critical-filled
warning-critical-outline
warning-low-filled
warning-low-outline
warning-medium-filled
warning-medium-outline
zoom-in
zoom-out

Per default, icons adjust to current color and font-size:

Colors

General

Interactive icons should be used with the primary color. For decorative and non-interactive icons (e.g. input fields) the default is gray 500.

Feedback

The new Icon set has filled and outline icons for feedback. Three different versions indicate the importance of the warning. Depending on the use case the icon color changes - info / warning / error. To assign a color to the icon, use the olt-u-color* classes as listed below. If the icon is placed on a matching background color it has to be white.

  • Circle - low: olt-u-colorInfo
  • Triangle - medium: olt-u-colorWarning
  • Rhomb - critical: olt-u-colorError
  • Circle - success: olt-u-colorSuccess

Sizes

The Icons exist in three different sizes - 24 x 24 / 16 x 16 / 12 x 12. Depending on the use case the correct icon has to be used.

  • olt-Icon--large: 24 x 24 - icons that are used for decoration and standalone
  • olt-Icon--medium: 16 x 16 - for input fields and sometimes for decoration, standalone and the edit action button
  • olt-Icon--small: 12 x 12 - exclusively for buttons - primary, secondary and tertiary
large (24 x 24) medium (16 x 16) small (12 x 12)

You can also change the size of the icon with the Font Size utility classes. This will resize the icon but without making any adjustments to account for smaller or bigger sizes. You can use:

  • olt-u-fontSizeXxSmall
  • olt-u-fontSizeXSmall
  • olt-u-fontSizeSmall
  • olt-u-fontSizeMedium
  • olt-u-fontSizeLarge
  • olt-u-fontSizeXLarge
  • olt-u-fontSizeXxLarge

Notification

Source: components/Notification/Notification.md

Description

The Notification is used to show a message on the bottom of the screen. It occupies the olt-NotificationContainer and olt-Notification* class names, with olt-NotificationContainer being the container element holding the stack of notifications.

On larger screens notifications are placed on the bottom right, on small devices only the header is displayed bottom-centered with full width. Notifications can stack up if they are not closed manually within a very short time. A notification that is not closed manually should hide automatically after a short time. For implementing the logic behind the visibility of the Notifications please use JavaScript ( check "Related JavaScript" section below for a demo ).

An Error Occurred
Everything went well ... and more. This is a long text to see how the notification grows, when the text gets longer ... and it looks good!
This is a Notification
Everything went well.

Notification Types

Like the modals the notifications got different color themes for various use cases. Depending on the use case a fitting color and icon is used.

  • Info - e.g. new information became available
  • Success - e.g. an action has successfully been completed
  • Warning - e.g. something has not been configured correctly
  • Error - e.g. communication has been interrupted

Respectively, we support the following modifiers :

  • olt-Notification--info
  • olt-Notification--success
  • olt-Notification--warning
  • olt-Notification--error

These different types will look as follows:

<div class="olt-NotificationContainer">
    <div class="olt-Notification olt-Notification--info">
        <div class="olt-Notification-dialog">
            <header class="olt-Notification-header">Info Notification</header>
            <div class="olt-Notification-content">
                Everything went well.
            </div>
        </div>
        <button type='button' class="olt-Notification-close">
            <i class="olt-Icon olt-Icon--medium olt-Icon-close"></i>
        </button>
    </div>
    <div class="olt-Notification olt-Notification--error">
        <div class="olt-Notification-dialog">
            <header class="olt-Notification-header">Error Notification</header>
            <div class="olt-Notification-content">
                Nothing went well.
            </div>
        </div>
        <button type='button' class="olt-Notification-close">
            <i class="olt-Icon olt-Icon--medium olt-Icon-close"></i>
        </button>
    </div>
</div>

States

A Notification is hidden by default. It can be rendered by adding is-open state class at the main element. It will appear inside the NotificationContainer, which is rendered at the bottom right of the page.

<div class="olt-NotificationContainer">
    <div class="olt-Notification olt-Notification--info is-open">
        <div class="olt-Notification-dialog">
            <header class="olt-Notification-header">Info Notification</header>
            <div class="olt-Notification-content">
                Everything went well.
            </div>
        </div>
        <button type='button' class="olt-Notification-close" />
    </div>
    <div class="olt-Notification olt-Notification--error is-open">
        <div class="olt-Notification-dialog">
            <header class="olt-Notification-header">Error Notification</header>
            <div class="olt-Notification-content">
                Nothing went well.
            </div>
        </div>
        <button type='button' class="olt-Notification-close" />
    </div>
</div>

The following JS snippet is used to show, hide and close notifications for the demo in this guide.

Spinner

Source: components/Spinner/Spinner.md

Description

A loading spinner for your pending states. The Spinner occupies olt-Spinner* class names and it scales by font-size.

Colors

The Spinner can be rendered with any of our colors :

Sizes

The Spinner can be rendered in different sizes as well using the fontSize utility classes. You can use :

  • olt-u-fontSizeSmall
  • olt-u-fontSizeMedium
  • olt-u-fontSizeLarge
  • olt-u-fontSizeXLarge
  • olt-u-fontSizeXxLarge

StepperDialog

Source: components/StepperDialog/StepperDialog.md

Description

StepperDialog occupies olt-StepperDialog* class names. It provides a modal dialog to show any kind of content and is also utilized for dynamic lists and steppers.

The dialog changes to full screen on mobile and tablet devices.

Create Device Type Category
2/5
Select Type
Create Device
Add Info
Define Parameters
Set up monitoring
Create the Device
This is the dialog description. This is the dialog description. This is the dialog description.
<input data-toggle="stepperdialog" id="demo-1" type="checkbox">
<label class="olt-Button" for="stepper-dialog-demo-1">Open</label>
<div class="olt-StepperDialog">
  <div class="olt-StepperDialog-window">
    <div class="olt-StepperDialog-stepper">
      <div class="olt-StepperDialog-stepper-header">Create Device Type Category</div>
      <div class="olt-StepperDialog-stepper-counter">
        2/5
      </div>
      <div class="olt-StepperDialog-stepper-step olt-StepperDialog-stepper-step--done">Select Type</div>
      <div class="olt-StepperDialog-stepper-step olt-StepperDialog-stepper-step--current">Create Device</div>
      <div class="olt-StepperDialog-stepper-step">Add Info</div>
      <div class="olt-StepperDialog-stepper-step">Define Parameters</div>
      <div class="olt-StepperDialog-stepper-step olt-StepperDialog-stepper-step--last">Set up monitoring</div>
    </div>
    <div class="olt-StepperDialog-content">
      <label class="olt-Dialog-close" for="stepper-dialog-demo-1"></label>
      <div class="olt-Dialog-title">Create the Device</div>
      <div class="olt-Dialog-description">This is the dialog description. This is the dialog description. This is the dialog description.</div>
      <div class="olt-Dialog-content">
        <label class="olt-Label">
          <input class="olt-Input" type="text" placeholder="Device Name" />
          <span class="olt-Label-text">Name</span>
        </label>
        <label class="olt-Label">
          <input class="olt-Input" type="text" placeholder="Device Location" />
          <span class="olt-Label-text">Location</span>
        </label>
        <label class="olt-Label">
          <textarea class="olt-TextArea" placeholder="Description"></textarea>
          <span class="olt-Label-text">Description</span>
        </label>
      </div>
      <div class="olt-Dialog-footer">
        <label class="olt-StepperDialog-back" for="stepper-dialog-demo-1">Back</label>
        <label class="olt-StepperDialog-proceed" for="stepper-dialog-demo-1">Proceed</label>
      </div>
    </div>
  </div>
</div>

Tabs

Source: components/Tabs/Tabs.md

Description

Tabs render a tab-like navigation, with links that can point to the tab content.

  • olt-Tabs - The tab bar
  • olt-Tabs-link - The tab link

The Tabs are centered on large screens and right aligned on small screens. The active tab is decorated via is-active state class name.

Use the --forceScroll modifier to ensure the menu does not overflow, but scrolls whenever it is too large for the screen.

To add a gradient to show that there are more elements available, use has-gradient-left and has-gradient-right state class name. The gradient overlay on either side is used to indicate that more content is available outside of the visible area. note: you need a relatively positions container around the navigation for this.

Tooltip

Source: components/Tooltip/Tooltip.md

Description

Tooltips can be added as a wrapper around another component and render a small bubble on hover containing specific text

The tooltip can also be rendered on the bottom side of the element by adding --bottom modifier.

Color

Card Table

Source: content/CardTable/CardTable.md

Description

The CardTable component can be used to show table-like content that is represented as a list of cards on tablet and mobile. The component occupies olt-CardTable* class names and must be structured with a specific layout.

Card Table on gray background:

Card Table are responsive. In desktop mode they are rendered as a table (table mode) and on tablet/mobile as a list of cards (list mode). We will refer to these modes in this document, because often modifiers or functionalities only apply to one of them.

In addition to these modes Card Table have two different underlying layout systems: flex layout and table layout. They can be enabled with the corresponding modifers: olt-CardTable--useFlexLayout and olt-CardTable--useTableLayout. These modifiers do only apply when the component is in table mode. In list mode they behave exactly the same.

Card Table Flex Layout

With olt-CardTable--useFlexLayout, every card in table mode is rendered with the flexbox layout model.

Card Table Table Layout

By default the Card Table component uses the flex layout to render data cards in table mode. This means that rows are rendered independent from each other. One issue with this approach is that the width of every column must be defined explicitly in order to have the same space distribution on all cards. By default all columns have a flex-basis value of 0 which causes the available space to be distributed evenly.

In order to support more complex use cases it is possible to enable table layout rendering with olt-CardTable--useTableLayout. Data cards will then use the same layout model as HTML-tables. This has the advantage that every card distributes the available space equally based on a common 2-dimensional grid.

Modifiers (table and flex layout)

Enforce table mode on smaller screens

Card Table are responsive by default. This means that the table layout changes to a list layout on smaller screens. Sometimes it might be desirable to enforce the table layout on all screens. Use olt-CardTable--alwaysTable to achieve this.

Selectable cards

Cards do not react to mouse events by default. To make them behave like buttons, add the olt-CardTable--selectable modifier. This modifer adds proper hover states to each card.

Adjust column sizes (table mode only)

Normally all column widths are evenly distributed. By applying the classes olt-CardTable--tableCellWidthXX to olt-CardTable-headItem and olt-DataCads-item elements this can be customized. Valid values for XX are: 5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90. Be careful when not using the table layout. In flex-mode (default), those modifiers have to be added to all cardItems and headItems in order to avoid a broken layout.

Align header titles and card content (table mode only)

Header titles and contents in table mode are left aligned by default. To align them differently use olt-CardTable--alignCenter and olt-CardTable--alignRight.

Vertical align header titles and card content (table mode only)

Header titles and contents in table mode are middle/center aligned by default. To vertical align them differently use olt-CardTable--verticalAlignTop and olt-CardTable--verticalAlignBottom. This modifier has no effect when in list mode.

Displaying items more concisely (list mode only)

In list-mode (small screens) card items occupy the full size by default. The olt-CardTable--halfSize modifier decreases the item size to 50% instead of 100%. This allows displaying content more concise.

Conditional Content

In some circumstances it's useful to show or hide content based on the current viewing mode. For those cases use olt-CardTable--tableOnly and olt-CardTable--listOnly.

In this example we use the modifiers on cardItems:

In this case they are applied to the content of the cardItem.

Increased horizontal card padding (list mode only)

For specific cases the horizontal padding of the card can the increased with olt-CardTable--largeCardPadding. This has only an effect in list-mode.

Modifiers (table layout only)

Fixed table layout (table mode only)

By default table layout uses auto as value for the table-layout css property. This can be changed to fixed by using the olt-CardTable--tableLayoutFixed modifier. A fixed layout distributes the space between all columns evenly independent of their content. This is identical to the default behaviour of flex-mode.

Adjust Column to use minimal space (table mode only)

The table-layout enables additional options to control the width of card items. To decrease the size of a column to it's minimal width use olt-CardTable--tableCellMinimalWidth in combination with the corresponding headItem and cardItem.

Fixing table layout quirks (table mode only)

Using olt-CardTable--listOnly on the last item of a card could lead to a visual glitch in combination with olt-CardTable--useTableLayout. The right border of a card is not applied correctly because it's impossible with css-only to figure out the last visible item inside of a card. For such cases the olt-CardTable--lastTableItem modifier exists. An olt-CardTable-cardItem with this modifier is styled in the same way as the last element of the row and therefor fixes the glitch.

There is an equivalent olt-CardTable--firstTableItem modifier. It fixes the same glitch for the first visual element of a card. In contrast to the last item the usage of this modifier is rarely required, because common cases are already applied via css.

Floating List

Source: content/FloatingList/FloatingList.md

Description

A Floating List allows to display a list of items with a gap inbetween them.

Items are floating horizontally in general, but they can wrap. In such a case the gap is also applied vertically.

Modifiers

Adjust the gap size

Normally a list uses 4px as a gap between elements. The --gap{size} modifiers allow to change the default behaviour. It supports values 0, 1, 2, 4, 8, 16, 24, 32, 48, 72,and 96 for size.

Change Alignment

By default all items are left aligned or in flex terms the content is positioned at flex-start. This can be changed with the --justifyEnd modifier.

Image

Source: content/Image/Image.md

Description

Images must be used with <img> elements and give any image width: 100% and height: auto css styles. This gives harmony when an image is being used

Variations

Natural

Images preserve image ratio unless the --natural-modifier is applied.

Round corners

Image also has --round modifier, which sets border radius of the image.

InputList

Source: content/InputList/InputList.md

Description

The InputList component is used to render a list element for dropdown or autocomplete elements. This component occupies olt-InputList* class names and can be used with <ul> element, with nested <li>s.

A typical InputList consists of a ul, li and a elements nested inside :

List

Source: content/List/List.md

Description

List is normally used with <ul> elements in which <li> is contained but can be used with arbitrary elements as well.

For Definition Lists the semantic elements are <dl>, <dt> and <dd>.

The List occupies olt-List* class names.

Variations

Unordered List

Unordered lists is the default HTML unordered list with extra styles that match this styleguide. Semantic tag for starting this list is <ul>.

No additional modifiers are necessary in order to make an unordered list.

Ordered List

Same as Unordered list above, it represents HTML ordered list with extra styles that match this styleguide. Semantic tag for ordered list is <ol>.

In order to produce Ordered list, you need to add --ordered modifier.

Definition List

The definition list represents HTML definition list. Semantic tag for definition list is <dl>.

The definition list works with additional modifier --definition next to the olt-List class.

Definition list with 2 columns

You can display a definition list in 2 columns with the --2columns modifier. The modifier is responsive:

  • olt-List--xs-2columns for only extra small screen
  • olt-List--sm-2columns for <= small screen
  • olt-List--lg-2columns for <= large screen
  • olt-List--xl-2columns for all screens

Vertically stacked definition list

You can display a definition list vertically stacked in a single column with the --vertical modifier. The modifier is responsive as well :

  • olt-List--xs-vertical for only extra small screen
  • olt-List--sm-vertical for <= small screen
  • olt-List--lg-vertical for <= large screen
  • olt-List--xl-vertical for all screens

It can be combined with --2columns modifier.

Paragraph

Source: content/Paragraph/Paragraph.md

Description

Paragraphs are used with <p> elements and are styled with harmonized spacing between them. Paragraph uses olt-Paragraph class name.

Colors

You can modify the color of the paragraph by using the color utility classes. You can use :

  • olt-u-colorPrimary
  • olt-u-colorSecondary
  • olt-u-colorInfo
  • olt-u-colorSuccess
  • olt-u-colorError
  • olt-u-colorDark
  • olt-u-colorWhite

Checkbox

Source: controls/Checkbox/Checkbox.md

Description

Checkbox is used with a wrapped <label> element that contain <input type="checkbox"/>. It occupies olt-Checkbox* class names.


Active
Active Disabled
Indeterminate
Indeterminate Disabled
Inactive
Inactive disabled
Light Theme
Dark Theme

HTML Input states

The checkbox control is a native browser input[type="checkbox"] so you can apply disable, checked attributes directly to the input field

Indeterminate Checkbox

To set the indeterminate state of a checkbox you can either use the olt-Checkbox--indeterminate class or set the :indeterminate pseudo-class active via Javascript. Note: Activating the pseudo-class cannot be done with HTML.

Copyable

Source: controls/Copyable/Copyable.md

Description

Copyable occupies olt-Copyable* class names and adds a copy-to-clipboard icon to any element

Input

Source: controls/Input/Input.md

Description

Input is used with a wrapped <label> element that contain <input />. It occupies olt-Input* class names.


Empty
Floating
Filled
Disabled
Required
Icon
Count
Error
Hint
Light Theme
Dark Theme

Floating

By default the input label is not floating meaning even without an input value or without focus the label stays on top of the input. To have a floating label the olt-Label--floating class has to be added to the label element. When the input contains a value the has-value class has to be set additionally in order to move the label text on top of the input.

Disabled

The input field can be disabled. The styles of the label and additional elements will change accordingly.

Required

Setting the input element as required appends * to the label.

Icon

The input can render an icon on its right side. It has different colors when the input is empty, contains a value or is disabled.

Count

For inputs that are limited to a certain amount of characters you can render that information for better user experience.

Error

If the user input is invalid the error can be indicated by adding the has-error class to the label. The color of the input and label change. The error messsage can be displayed below the input.

Hint

If the user input is validated a hint can be shown below the input for better user experience.

Label

Source: controls/Label/Label.md

Description

Label represents a label in form fields, input fields, etc. Label is normally used with <label> elements and occupies olt-Label* class names.

Check Input or Select for information on how to use Label together with input elements.

Floating

By default the label is not floating meaning even without an input value or without focus the label stays on top of the input. To have a floating label the olt-Label--floating class has to be added to the label element. When the input contains a value the has-value class has to be set additionally in order to move the label text on top of the input.

has-value

When an input element contains a value the has-value class has to be added to the label.

has-error

If the user input is invalid the error can be indicated by adding the has-error class to the label. The colors of the contained elements change accordingly.

Radio

Source: controls/Radio/Radio.md

Description

Radio is used with a wrapped <label> element that contain <input type="radio"/>. It occupies olt-Radio* class names.


Active
Active Disabled
Inactive
Inactive disabled
Light Theme
Dark Theme

HTML Input states

The radio control is a native browser input[type="radio"] so you can apply disable, checked attributes directly to the input field

Use as radio group

You can use several radios as a radio group by using the same name for all of them as in the HTML radio specs.

Select

Source: controls/Select/Select.md

Description

Select is used with a wrapped <label> element that contain <select />. It occupies olt-Select* class names.


Empty
Floating
Selected
Disabled
Required
Error
Hint
Light Theme
Dark Theme

Floating

By default the input label is not floating meaning even without an input value or without focus the label stays on top of the input. olt-Label--floating class has to be added to the input label. When the input contains a value the has-value class has to be set additionally in order to move the label text on top of the input.

Disabled

The select field can be disabled. The styles of the label and additional elements will change accordingly.

Required

Setting the select element as required appends * to the label.

Error

If the user input is invalid the error can be indicated by adding the has-error class to the label. The color of the input and label change. The error messsage can be displayed below the input.

Hint

If the user input is validated a hint can be shown below the input for better user experience.

The pagination use-case is an exception from the above button rules and uses the olt-Select--pagination modifier. This will show a border around the element.

TextArea

Source: controls/TextArea/TextArea.md

Description

Input is used with a wrapped <label> element that contains <textarea />. It occupies olt-TextArea* class names.


Empty
Floating
Filled
Disabled
Required
Count
Error
Hint
Light Theme
Dark Theme

Floating

By default the input label is not floating meaning even without an input value or without focus the label stays on top of the input. To have a floating label the olt-Label--floating class has to be added to the label element. When the input contains a value the has-value class has to be set additionally in order to move the label text on top of the input.

Disabled

The input field can be disabled. The styles of the label and additional elements will change accordingly.

Required

Setting the input element as required appends * to the label.

Count

For inputs that are limited to a certain amount of characters you can render that information for better user experience.

Error

If the user input is invalid the error can be indicated by adding the has-error class to the label. The color of the input and label change. The error messsage can be displayed below the input.

Hint

If the user input is validated a hint can be shown below the input for better user experience.

Toggle

Source: controls/Toggle/Toggle.md

Description

Toggle is used with a wrapped <label> element that contain <input type="checkbox"/>. It occupies olt-Toggle* class names.

Active
Active Disabled
Inactive
Inactive disabled
Light Theme
Dark Theme

HTML Input states

The toggle control is a native browser input[type="checkbox"] so you can apply disable, checked attributes directly to the input field

Display mode Inline

The display mode can be set to inline-flex instead of flex with the --inline modifier.

Reversed display order

To display the label on the left of the toggle button use --reversed.

Container

Source: layout/Container/Container.md

Description

Container wraps content in a block and adds default padding around it, as well as additional responsive-friendly margin on screens wider than 576px. The Container occupies olt-Container* class names.

In general the container occupies the full screen size minus some margin. Only on very large screens the max-width is limited to a maximum of 1248px. You can check the behaviour by reducing the screen size and look at the example below :

Modifiers

Flexible width

By default the Container has max-width css property which is being set, this can be overridden by adding --fluid modifier to the container. By default this only effects the rendering of the xl breakpoint.

No padding

You can remove the default padding of the Container by setting --noPadding modifier class name. This will only remove the left and the right padding, making it useful in situations where additional spacing is not needed.

Frame

Source: layout/Frame/Frame.md

Description

A Frame represents the entry point of your application. It is usually applied to the <body> or <html> of the document. Use Frame to inject fonts and basic typography into your site. It is used with the olt-Frame class name.

Styles applied by Frame globally :

  • Font family and weight, as well as line height
  • Enables font smoothing where available
  • Changes the box model to border-box

Making layout with Frame

Frame also provides site layout building blocks : header, footer, body and main. Below is example layout using Frame component.

Grid

Source: layout/Grid/Grid.md

Description

Grid is our main layout component, which can be used to create responsive grid layouts of your application. It occupies olt-Grid* class names.

Grid implements typical 12-columns based grid by using Flexbox

Grid is used with typically a div.olt-Grid having div.olt-Grid-item nested inside.

Note: The grid applies the gutter vertically and horizontally by default.

Modifiers

Fixed size columns

You can specify the column size of each item via -item-- modifier. The olt-Grid-item elements must add up to 12 and can be different for each column.

Auto size columns

With olt-Grid-item--auto modifier, your columns get a flexible width, based on their content.

Offsets

You can use olt-Grid-item--offset modifier to specify if a column should take pre-defined space before being rendered.

Responsive modifiers

All modifiers of the Grid item can be used per breakpoint in order to create different visual representation on different screen sizes. The prefixes are the very same used for our media queries :

Name Extra small Small Medium Large Extra large
Breakpoint <576px ≥576px ≥768px ≥992px ≥1200px
Prefix xs sm md lg xl

Here is a table of how to use the Grid's modifiers with the prefixes above :

Prefix Column fixed size Column auto size Offset
xs olt-Grid-item--xs-1 olt-Grid-item--xs-auto olt-Grid-item--xs-offset1
sm olt-Grid-item--sm-1 olt-Grid-item--sm-auto olt-Grid-item--sm-offset1
md olt-Grid-item--md-1 olt-Grid-item--md-auto olt-Grid-item--md-offset1
lg olt-Grid-item--lg-1 olt-Grid-item--lg-auto olt-Grid-item--lg-offset1
xl olt-Grid-item--xl-1 olt-Grid-item--xl-auto olt-Grid-item--xl-offset1

Try checking the example below in another page and change the screen size accordingly to get a feeling of how the grid works.

Note: You can open the example in an external tab by clicking the Example button on top left.

Layout

Source: navigation/Layout/Layout.md

Description

Layout is used to create the layout of your application. It occupies olt-Layout class names.

Align Items

Source: utils/alignItems/alignItems.md

Syntax

olt-u-[sm-|lg-|md-|xl-]alignItems{Start|Center|End|Stretch|Baseline}

Description

Align items utility can be used to set the align-items property of an element. It is helpful for making custom Flexbox layouts.

Class name CSS properties
olt-u-alignItemsStart align-items: flex-start
olt-u-alignItemsCenter align-items: center
olt-u-alignItemsEnd align-items: flex-end
olt-u-alignItemsStretch align-items: stretch
olt-u-alignItemsBaseline align-items: baseline

Responsive

Align items can also be used with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-alignItemsStart Will set align-items: flex-start on the element when rendered on extra small screen
sm olt-u-sm-alignItemsCenter Will set align-items: center on the element when rendered on a small screen
md olt-u-md-alignItemsStart Will set align-items: flex-start on the element when rendered on a medium sized screen
lg olt-u-lg-alignItemsEnd Will set align-items: flex-end on the element when rendered on a large screen
xl olt-u-xl-alignItemsStart Will set align-items: flex-start on the element when rendered on extra large screen

Background Color

Source: utils/background/background.md

Syntax

olt-u-[sm-|md-|lg-|xl-]backgroundColor{Primary|Secondary|Info|Error|Success}

Description

Background Color utility can be used to set background-color property of an element. It is helpful when you want to use one of the default colors on a custom HTML element.

It supports all of our conceptual colors :

Class name Sets background color to
olt-u-backgroundColorPrimary
olt-u-backgroundColorSecondary
olt-u-backgroundColorInfo
olt-u-backgroundColorError
olt-u-backgroundColorSuccess
olt-u-backgroundColorGray100
olt-u-backgroundColorGray200
olt-u-backgroundColorGray300
olt-u-backgroundColorGray400
olt-u-backgroundColorGray500
olt-u-backgroundColorGray600
olt-u-backgroundColorGray700
olt-u-backgroundColorGray800
olt-u-backgroundColorGray900

Responsive

Background color can also be used with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-backgroundColorPrimary Will set primary background color on the element when rendered on extra small screen
sm olt-u-sm-backgroundColorSecondary Will set secondary background color on the element when rendered on a small screen
md olt-u-md-backgroundColorPrimary Will set primary background color on the element when rendered on a medium sized screen
lg olt-u-lg-backgroundColorError Will set error background color on the element when rendered on a large screen
xl olt-u-xl-backgroundColorInfo Will set info background color on the element when rendered on extra large screen

Border

Source: utils/border/border.md

Syntax

olt-u-[sm-|md-|lg-|xl-]border[Top|Right|Bottom|Left][None]

Description

Border utility can be used to set border property of an element. It sets the default border width and the default border color and can be easily combined with Border Color utility.

The default border-width is 1px and the default border color is #e3e4e5

Class name CSS Properties
olt-u-border border: 1px solid #E3E4E5;
olt-u-borderTop border-top: 1px solid #E3E4E5;
olt-u-borderRight border-right: 1px solid #E3E4E5;
olt-u-borderBottom border-bottom: 1px solid #E3E4E5;
olt-u-borderLeft border-left: 1px solid #E3E4E5;
olt-u-borderNone border: none;
olt-u-borderTopNone border-top: none;
olt-u-borderRightNone border-right: none;
olt-u-borderBottomNone border-bottom: none;
olt-u-borderLeftNone border-left: none;

Responsive

Border can also be used with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-border Will set border on the element when rendered on extra small screen
sm olt-u-sm-borderTop Will set top border the element when rendered on a small screen
md olt-u-md-borderNone Will remove border of the element when rendered on a medium sized screen
lg olt-u-lg-borderBottomNone Will remove bottom border of the element when rendered on a large screen
xl olt-u-xl-borderLeft Will set left border on the element when rendered on extra large screen

Border Color

Source: utils/border/border-color.md

Syntax

olt-u-[sm-|md-|lg-|xl-]borderColor{Primary|Secondary|Info|Error|Success|Gray[100-900]}

Description

Border color utility can be used to set border-color property of an element. Can be used in a combination with Border utility.

It supports all of our conceptual colors :

Class name Sets border color to
olt-u-borderColorPrimary
olt-u-borderColorInfo
olt-u-borderColorError
olt-u-borderColorSuccess
olt-u-borderColorGray100
olt-u-borderColorGray200
olt-u-borderColorGray300
olt-u-borderColorGray400
olt-u-borderColorGray500
olt-u-borderColorGray600
olt-u-borderColorGray700
olt-u-borderColorGray800
olt-u-borderColorGray900

Responsive

Background color can also be used with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-borderColorPrimary Will set primary border color on the element when rendered on extra small screen
sm olt-u-sm-borderColorSecondary Will set secondary border color on the element when rendered on a small screen
md olt-u-md-borderColorPrimary Will set primary border color on the element when rendered on a medium sized screen
lg olt-u-lg-borderColorError Will set error border color on the element when rendered on a large screen
xl olt-u-xl-borderColorInfo Will set info border color on the element when rendered on extra large screen

Color

Source: utils/color/color.md

Syntax

olt-u-[sm-|md-|lg-|xl-]color{Primary|Secondary|Info|Error|Success}

Description

Color utility can be used to set color property of an element. It is helpful when you want to use one of the default colors on a custom HTML element. It is similar to Background Color utility.

It supports all of our conceptual colors :

Class name Sets color to
olt-u-colorPrimary
olt-u-colorSecondary
olt-u-colorInfo
olt-u-colorWarning
olt-u-colorError
olt-u-colorSuccess
olt-u-colorGray100
olt-u-colorGray200
olt-u-colorGray300
olt-u-colorGray400
olt-u-colorGray500
olt-u-colorGray600
olt-u-colorGray700
olt-u-colorGray800
olt-u-colorGray900

Responsive

Color can also be used with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-colorPrimary Will set primary the color on the element when rendered on extra small screen
sm olt-u-sm-colorSecondary Will set secondary the color on the element when rendered on a small screen
md olt-u-md-colorPrimary Will set primary the color on the element when rendered on a medium sized screen
lg olt-u-lg-colorError Will set error the color on the element when rendered on a large screen
xl olt-u-xl-colorInfo Will set info the color on the element when rendered on extra large screen

Display

Source: utils/display/display.md

Syntax

olt-u-[sm-|md-|lg-|xl-]display{None|Inline|InlineBlock|Block|Table|TableRow|TableCell|Flex|InlineFlex}

Description

Display utility can be used to set display property of an element. It can be used to hide, inline elements or to create a Flexbox wrapper for other elements.

Class name CSS properties
olt-u-displayNone display: none
olt-u-displayInline display: inline
olt-u-displayInlineBlock display: inline-block
olt-u-displayBlock display: block
olt-u-displayTable display: table
olt-u-displayTableRow display: table-row
olt-u-displayTableCell display: table-cell
olt-u-displayFlex display: flex
olt-u-displayInlineFlex display: inline-flex

Responsive

Display utility becomes very handy, when used in a combination with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-displayNone Will set display: none on the element when rendered on extra small screen
sm olt-u-sm-displayInline Will set display: inline on the element when rendered on a small screen
md olt-u-md-displayBlock Will set display: block on the element when rendered on a medium sized screen
lg olt-u-lg-displayFlex Will set display: flex on the element when rendered on a large screen
xl olt-u-xl-displayNone Will set display: none on the element when rendered on extra large screen

Note: You can open the example in an external tab by clicking the Example button on top left.

Flex

Source: utils/flex/flex.md

Syntax

olt-u-[sm-|md-|lg-|xl-]flex{Row|RowReverse|Column|ColumnReverse|Wrap|WrapReverse|Nowrap}

Description

Flex utility sets flex-direction or flex-wrap CSS properties. It can be used with olt-u-displayFlex to make a Flexbox layout without additional class names or inline styles.

Class name CSS properties
olt-u-flexRow flex-direction: row
olt-u-flexRowReverse flex-direction: row-reverse
olt-u-flexColumn flex-direction: column
olt-u-flexColumnReverse flex-direction: column-reverse
olt-u-flexWrap flex-wrap: wrap
olt-u-flexWrapReverse flex-wrap: wrap-reverse
olt-u-flexNowrap flex-wrap: nowrap

Responsive

Flex utility becomes very handy, when used in a combination with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-flexRow Will set flex-direction: row on the element when rendered on extra small screen
sm olt-u-sm-flexColumn Will set flex-direction: column on the element when rendered on a small screen
md olt-u-md-flexRow Will set flex-direction: row on the element when rendered on a medium sized screen
lg olt-u-lg-flexWrap Will set flex-wrap: wrap on the element when rendered on a large screen
xl olt-u-xl-flexNowrap Will set flex-wrap: nowrap on the element when rendered on extra large screen

Font

Source: utils/font/font.md

Syntax

olt-u-[H100 ... H500|Content|Description|Support|Code]

Description

Class name Reponsive Sets the font to
olt-u-H500 x
Page Title
olt-u-H400 x
Card Title
olt-u-H300
Subtitle
olt-u-H200
Content Title
olt-u-H100
Stepper Title
olt-u-content
Content
olt-u-description
Description
olt-u-support
Support
olt-u-code x
Code

Responsiveness

Font L M S
Page Title (H500)
24px, bold, 32px line height 22px, bold, 26px line height 20px, bold, 24px line height
Card Title (H400)
20px, bold, 24px line height 20px, bold, 24px line height 18px, bold, 20px line height
Code
14px, 22px line height 14px, 22px line height 18px, 24px line height

Justify Content

Source: utils/justifyContent/justifyContent.md

Syntax

olt-u-[sm-|md-|lg-|xl-]justifyContent{Start|Center|End|Between|Around|Evenly}

Description

Justify Content utility sets justify-content CSS property. It can be used with Flex Utility to create Flexbox layouts.

Class name CSS properties
olt-u-justifyContentStart justify-content: flex-start
olt-u-justifyContentCenter justify-content: center
olt-u-justifyContentEnd justify-content: flex-end
olt-u-justifyContentBetween justify-content: space-between
olt-u-justifyContentAround justify-content: space-around
olt-u-justifyContentEvenly justify-content: space-evenly

Responsive

Justify Content utility becomes very handy, when used in a combination with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-justifyContentStart Will set justify-content: start on the element when rendered on extra small screen
sm olt-u-sm-justifyContentEnd Will set justify-content: end on the element when rendered on a small screen
md olt-u-md-justifyContentBetween Will set justify-content: between on the element when rendered on a medium sized screen
lg olt-u-lg-justifyContentEnd Will set justify-content: end on the element when rendered on a large screen
xl olt-u-xl-justifyContentStart Will set justify-content: start on the element when rendered on extra large screen

Margin

Source: utils/margin/margin.md

Syntax

olt-u-[sm-|md-|lg-|xl-]margin{Top|Right|Bottom|Left|X|Y}{<size>|Auto}

size= 0|1|2|4|8|16|24|32|48|72|96

Description

Margin utility sets margin CSS property

Class name CSS properties
olt-u-margin4 margin: 4px;
olt-u-marginTopAuto margin-top: auto;
olt-u-marginRight96 margin-right: 96px;
olt-u-marginBottom8 margin-bottom: 8px;
olt-u-marginLeftAuto margin-left: auto;
olt-u-marginXAuto margin-left: auto; margin-right: auto;
olt-u-marginY16 margin-top: 16px; margin-bottom: 16px;

Allowed sizes are 0, 1, 2, 4, 8, 16, 24, 32, 48, 72, 96.

Responsive

Margin can also be used with the default screen prefixes, where it can be very handy :

Prefix Example Description
xs olt-u-xs-margin8 Will set margin: 8px on the element when rendered on extra small screen
sm olt-u-sm-marginTop16 Will set margin-top: 16px; on the element when rendered on a small screen
md olt-u-md-marginXAuto Will set margin-left: auto; margin-right: auto; on the element when rendered on a medium sized screen
lg olt-u-lg-marginBottom16 Will set margin-bottom: 16px; to the element when rendered on a large screen
xl olt-u-xl-marginLeft4 Will set margin-left: 4px; to the element when rendered on extra large screen

Overflow

Source: utils/overflow/overflow.md

Syntax

olt-u-[sm-|md-|lg-|xl-]overflow[X|Y]{Auto|Visible|Hidden|Scroll|Initial} olt-u-[sm-|md-|lg-|xl-]overflowSnap

Description

Overflow utility sets overflow, overflow-x and overflow-y CSS properties. It will also set -webkit-overflow-scrolling: touch; to the element, when being used.

Class name CSS properties
olt-u-overflowAuto overflow: auto
olt-u-overflowVisible overflow: visible
olt-u-overflowHidden overflow: hidden
olt-u-overflowScroll overflow: scroll
olt-u-overflowInitial overflow: initial

Overflow Snap

Setting olt-u-overflowSnap will add the following CSS properties :

.olt-u-overflowSnap {
  scroll-snap-type: mandatory;
  scroll-snap-points-y: repeat(100vw);
  scroll-snap-type: x mandatory;
}

Setting X / Y

Overflow Utility also supports setting overflow-x and overflow-y by adding x or y to the class name :

Class name CSS properties
olt-u-overflowXAuto overflow-x: auto
olt-u-overflowYHidden overflow-y: hidden

Responsive

Overflow utility can be used as well with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-overflowXauto Will set overflow-x: auto on the element when rendered on extra small screen
sm olt-u-sm-overflowScroll Will set overflow: scroll on the element when rendered on a small screen
md olt-u-md-overflowYVisible Will set overflow-y: visible on the element when rendered on a medium sized screen
lg olt-u-lg-overflowScroll Will set overflow: scroll on the element when rendered on a large screen
xl olt-u-xl-overflowHidden Will set overflow: hidden on the element when rendered on extra large screen

Padding

Source: utils/padding/padding.md

Syntax

olt-u-[sm-|md-|lg-|xl-]padding{Top|Right|Bottom|Left|X|Y}{<size>}

size= 0|1|2|4|8|16|24|32|48|72|96

Padding utility sets padding CSS property

Class name CSS properties
olt-u-padding4 padding: 4px;
olt-u-paddingTop8 padding-top: 8px;
olt-u-paddingRight96 padding-right: 96px;
olt-u-paddingBottom8 padding-bottom: 8px;
olt-u-paddingLeft16 padding-left: 16px;
olt-u-paddingX16 padding-left: 16px; padding-right: 16px;
olt-u-paddingY16 padding-top: 16px; padding-bottom: 16px;

Allowed sizes are 0, 1, 2, 4, 8, 16, 24, 32, 48, 72, 96.

Responsive

Margin can also be used with the default screen prefixes, where it can be very handy :

Prefix Example Description
xs olt-u-xs-padding8 Will set padding: 8px on the element when rendered on extra small screen
sm olt-u-sm-paddingTop16 Will set padding-top: 16px; on the element when rendered on a small screen
md olt-u-md-paddingX24 Will set padding-left: 24px; padding-right: 24px; on the element when rendered on a medium sized screen
lg olt-u-lg-paddingBottom16 Will set padding-bottom: 16px; to the element when rendered on a large screen
xl olt-u-xl-paddingLeft4 Will set padding-left: 4px; to the element when rendered on extra large screen

Text Align

Source: utils/textAlign/textAlign.md

Syntax

olt-u-[sm-|md-|lg-|xl-]textAlign{Left|Center|Right|Justify|Initial}

Description

Text Align utility sets text-align CSS property.

Class name CSS properties
olt-u-textAlignLeft text-align: left
olt-u-textAlignCenter text-align: center
olt-u-textAlignRight text-align: right
olt-u-textAlignJustify text-align: justify
olt-u-textAlignInitial text-align: initial

Responsive

Text Align utility can be used as well with the default screen prefixes :

Prefix Example Description
xs olt-u-xs-textAlignLeft Will set text-align: left on the element when rendered on extra small screen
sm olt-u-sm-textAlignCenter Will set text-align: center on the element when rendered on a small screen
md olt-u-md-textAlignRight Will set text-align: right on the element when rendered on a medium sized screen
lg olt-u-lg-textAlignCenter Will set text-align: center on the element when rendered on a large screen
xl olt-u-xl-textAlignJustify Will set text-align: justify on the element when rendered on extra large screen

Lightelligence Styles

No matches.