Chapters

This Page

    CSS Components

    Introduction

    PageLines Platform 5 has several utility CSS components designed to increase development speed and consistency.

    The components that are included are meant to be very simple and non intrusive, and reflect common UX elements present in nearly every extension.

    Components and handling that is included is:

    • 12-Column Responsive Grid with multiple breakpoint formats
    • Button Components and Styles
    • Form Components and Styles
    • Color Scheme Handling
    • Alignments Handling
    • Icons Library

    Components

    Grid

    The basic grid system consists of a 12-column grid. To employ it simply wrap the columns in a div with class of pl-row.

    Add a class to each column associated with the amount of columns of 12 you've like it to take.

    .pl-col-sm-6
    .pl-col-sm-6
    .pl-col-sm-4
    .pl-col-sm-4
    .pl-col-sm-4
    .pl-col-sm-3
    .pl-col-sm-3
    .pl-col-sm-3
    .pl-col-sm-3
    .pl-col-sm-2
    .pl-col-sm-2
    .pl-col-sm-2
    .pl-col-sm-2
    .pl-col-sm-2
    .pl-col-sm-2

    Platform includes a simple responsive grid system that includes multiple break points depending on the classes used.

    • .pl-col-lg- Breaks at 1200px
    • .pl-col-sm- Breaks at 768px
    • .pl-col-xs- Doesn't break, even on small resolutions

    The following grid will have 4 columns on large screens, 3 columns on smaller screens and 2 columbs on mobile.

    .pl-col-lg-3 .pl-col-sm-4 .pl-col-xs-6
    .pl-col-lg-3 .pl-col-sm-4 .pl-col-xs-6
    .pl-col-lg-3 .pl-col-sm-4 .pl-col-xs-6
    .pl-col-lg-3 .pl-col-sm-4 .pl-col-xs-6

    Buttons

    PageLines Platform 5 provides the basics for creating buttons. Along with controlling their size and coloring.

    Button Colors

    Default Primary Success Info Warning Danger Link Outline Black Outline White
    <span class="pl-btn pl-btn-default">Default</span>
    <span class="pl-btn pl-btn-primary">Primary</span>
    <span class="pl-btn pl-btn-success">Success</span>
    <span class="pl-btn pl-btn-info">Info</span>
    <span class="pl-btn pl-btn-warning">Warning</span>
    <span class="pl-btn pl-btn-danger">Danger</span>
    <span class="pl-btn pl-btn-link">Link</span>
    <span class="pl-btn pl-btn-ol-black">Outline Black</span>
    <span class="pl-btn pl-btn-ol-white">Outline White</span>

    Button Sizes

    Extra Small Small Standard Large
    <span class="pl-btn pl-btn-default pl-btn-xs">Extra Small</span>
    <span class="pl-btn pl-btn-default pl-btn-sm">Small</span>
    <span class="pl-btn pl-btn-default pl-btn-st">Standard</span>
    <span class="pl-btn pl-btn-default pl-btn-lg">Large</span>

    Forms

    PageLines Platform 5 has some very basic handling and configuration used for form elements.

    For standardized formatting just add a class of pl-form-control to any standard form element.

    <p>
      <label class="pl-form-label">Text Input</label>
      <input type="text" class="pl-form-control" placeholder="Text Input" />
    </p>
    
    <p>
      <label class="pl-form-label">Textarea Input</label>
      <textarea class="pl-form-control" placeholder="Textarea Input" /></textarea>
    </p>
    
    <p>
      <label class="pl-form-label">Select Input</label>
      <select class="pl-form-control">
        <option>Option 1</option>
        <option>Option 2</option>
        <option>Option 3</option>
      </select>
    </p>
    
    <p>
      <input type="submit" value="Submit" />
    </p>

    Handling Classes

    Color Schemes

    Platform 5 supports three basic color schemes: default, dark text, and light text. This is the easiest way to accomodate various background colors and background images.

    • .pl-scheme-default Default theme color scheme
    • .pl-scheme-dark Dark colored text and black based elements (borders, etc...)
    • .pl-scheme-light Light colored text and white based elements (borders, etc...)
    Dark Color Scheme
    Light Color Scheme
    <div class="scheme-example pl-scheme-dark">
      <div class="header">Dark Color Scheme</div>
      <div><a href="#">Basic Link</a></div>
    </div>
    
    <div class="scheme-example pl-scheme-light">
      <div class="header">Light Color Scheme</div>
      <div><a href="#">Basic Link</a></div>
    </div>

    Text Alignment

    PageLines supports standard text alignment classes that sections use in various ways to align things. They are simply:

    • .pl-alignment-left
    • .pl-alignment-center
    • .pl-alignment-right
    Left
    center
    right

    Icons

    PageLines supports the full Font Awesome icon library. To use them

    • .pl-icon Base icon class
    • .pl-icon-[key] Add the key for the icon to the element
    <div class="icons-examples">
      <div>
        <i class="pl-icon pl-icon-pagelines"></i>
        <i class="pl-icon pl-icon-pagelines pl-icon-2x"></i>
        <i class="pl-icon pl-icon-pagelines pl-icon-3x"></i>
        <i class="pl-icon pl-icon-pagelines pl-icon-4x"></i>
      </div>
      <div>
        <i class="pl-icon pl-icon-refresh pl-icon-spin"></i>
        <i class="pl-icon pl-icon-refresh pl-icon-2x pl-icon-spin"></i>
        <i class="pl-icon pl-icon-refresh pl-icon-3x pl-icon-spin"></i>
      </div>
      <div>
        <i class="pl-icon pl-icon-facebook"></i>
        <i class="pl-icon pl-icon-twitter"></i>
        <i class="pl-icon pl-icon-random"></i>
        <i class="pl-icon pl-icon-cog"></i>
        <i class="pl-icon pl-icon-code"></i>
        <i class="pl-icon pl-icon-comment"></i>
      </div>
    </div>