Miva Merchant Elements CSS Cheat Sheet

Miva Merchant Modules and Development
A cheat sheet for Miva Merchant Elements CSS with all CSS elements on one page and in a mostly orderly fashion.

Miva Merchant Elements CSS Cheat Sheet

It takes a while to get used to Elements CSS, this can help.


A cheat sheet for Miva Merchant Elements CSS with all CSS elements on one page and in a mostly orderly fashion.

by Scot Ranney • April 04, 2019

Miva Merchant, Miva Merchant Storemorph


This is a quick list of Elements CSS classes I put together over a couple glasses of scotch at the end of the night. Let me know if you see any problems.

Update Dec 2020: Matt Zimmerman has updated the online style guide which is now a great resource: https://docs.miva.com/readytheme-shadows/#overview-style-guide

CSS Objects

CSS Layout

Breakpoints for grid items for the most part seems to happen automatically in the Elements CSS framework. If a class has known breakpoint modifiers, they ( --s --m --l --w ) can be added to the end of the class name.

Simple layout example. The widths can be 1-12 and can be mixed and matched. Columns will wrap if the widths in a layout add up to more than 12. More information on widths at the bottom of the components section.

  1. ### two columns

  2. <div class="o-layout">
  3. <div class="o-layout__item u-width-6">
  4. </div>
  5. <div class="o-layout__item u-width-6">
  6. </div>
  7. </div>

Layout classes:

  1. o-layout
  2. o-layout__item
  3. o-layout o-layout--row-reverse
  4. o-layout o-layout--column --m --l --w
  5. o-layout o-layout--column-reverse --m --l --w
  6. o-layout o-layhout--full
  7. o-layout o-layout--narrow
  8. o-layout o-layout--wide
  9. o-layout o-layout--flush
  10. o-layout o-layout--spaced

  11. ### vertical alignment

  12. o-layout o-layout--align-top
  13. o-layout o-layout--align-center
  14. o-layout o-layout--align-bottom
  15. o-layout o-layout--align-baseline
  16. o-layout o-layout--align-stretch

  17. ### horizontal alignment

  18. o-layout o-layout--justify-start
  19. o-layout o-layout--justify-center
  20. o-layout o-layout--justify-end
  21. o-layout o-layout--justify-around
  22. o-layout o-layout--justify-between

  23. ### flex ordering

  24. o-layout o-layout__first --s --m --l --w
  25. o-layout o-layout__last

  26. ### growth control

  27. o-layout--grow
  28. o-layout--no-grow
  29. o-layout--shrink
  30. o-layout--no-shrink

  31. ### wrap

  32. o-layout--no-wrap
  33. o-layout--wrap
  34. o-layout--wrap-reverse

Lists

  1. o-list-bare
  2. o-list-block
  3. o-list-inline
  4. o-list-inline o-list-inline--narrow
  5. o-list-inline o-list-inline--wide

Tables (see below in the components section for code example)

  1. o-table
  2. o-table o-table--fixed
  3. o-table o-table--narrow
  4. o-table o-table--wide
  5. o-table o-table-borderless

    Wrapper

    1. o-wrapper
    2. o-site-wrapper
    3. o-wrapper o-wrapper--full
    4. o-wrapper--flush

    Components

    Buttons

    1. c-button c-button--tiny
    2. c-button c-button--small
    3. c-button
    4. c-button c-button--large
    5. c-button c-button--huge

    6. c-button c-button--full

    7. c-button c-button--hollow
    8. c-button c-button--clear
    9. c-button disabled=""
    10. c-button is-error
    11. c-button c-button--glossy
    12. c-button-primary

    Control Groups: make button groups

    1. <div class="c-control-group">
    2. <button class="c-button c-control-group__button">Button 1</button>
    3. <button class="c-button c-control-group__button">Button 2</button>
    4. <button class="c-button c-control-group__button">Button 3</button>
    5. </div>

    6. ### Modifiers: <div class="c-control-group c-control-group--rounded">...</div>

    7. c-button c-control-group--rounded
    8. c-button c-control-group--rounded-right
    9. c-button c-control-group--rounded-left
    10. c-button c-control-group--stacked

    Divider

    1. c-divider
    2. c-divider c-divider--top

    Forms

    1. <form>
    2. <fieldset>
    3. <legend>Example</legend>
    4. <ul class="c-form-list">
    5. <li class="c-form-list__item">
    6. <label class="c-form-label" for="example1">Example</label>
    7. <input id="example1" class="c-form-input" type="text" placeholder="something">
    8. <button class="c-button c-control-group__button">Submit</button>
    9. </li>
    10. </ul>
    11. </fieldset>
    12. </form>

    13. ### select

    14. <select id="example2" class="c-form-select">
    15. <option value="abc">Option ABC</option>
    16. <option value="def">Option DEF</option>
    17. </select>

    18. ### textarea

    19. <textarea id="example3" class="c-form-input c-form-input--long" placeholder="something here"></textarea>

    20. ### checkbox

    21. <label class="c-form-checkbox">
    22. <input class="c-form-checkbox__input" type="checkbox">
    23. <span class="c-form-checkbox__caption">Check Me</span>
    24. </label>

    25. ### inline checkbox

    26. <li class="c-form-list__item">
    27. <label class="c-form-checkbox c-form-checkbox--inline">
    28. <input class="c-form-checkbox__input" type="checkbox">
    29. <span class="c-form-checkbox__caption">Inline 1</span>
    30. </label>
    31. <label>...</label>
    32. etc
    33. </li>

    34. ### radio

    35. <label class="c-form-checkbox c-form-checkbox--radio">
    36. <input class="c-form-checkbox__input" type="radio" name="agree" value="yes">
    37. <span class="c-form-checkbox__caption">Yes</span>
    38. </label>

    39. ### inline radio

    40. <li class="c-form-list__item">
    41. <label class="c-form-checkbox c-form-checkbox--radio c-form-checkbox--inline">
    42. <input class="c-form-checkbox__input" type="radio" name="inline-radio" value="1">
    43. <span class="c-form-checkbox__caption">Radio 1</span>
    44. </label>
    45. <label>...</label>
    46. etc...
    47. </li>

    48. ### inline/grid form

    49. <ul class="c-form-list o-layout">
    50. <li class="c-form-list__item o-layout__item">...</li>
    51. </ul>

    Keyline

    1. c-keyline
    2. c-keyline--thick
    3. c-keyline--small

    Menu

    1. <nav class="c-menu">
    2. <h5 class="c-menu__title u-text-uppercase">Quick Links</h5>
    3. <ul class="c-menu__list u-text-uppercase">
    4. <li><a class="c-menu__link" href="">About Us</a></li>
    5. <li><a class="c-menu__link" href="">FAQs</a></li>
    6. <li><a class="c-menu__link" href="">Contact Us</a></li>
    7. <li><a class="c-menu__link" href="">Become an Affiliate</a></li>
    8. </ul>
    9. </nav>

    Mini-Modal

    1. <a data-mini-modal="" href="LARGE_IMAGE_URL" title="image">
    2. <img src="IMAGE_URL">
    3. </a>

    Navigation

    1. <nav class="u-text-uppercase c-navigation">
    2. <input id="mainNavButton" class="c-navigation__trigger" type="checkbox">
    3. <label class="c-navigation__label" for="mainNavButton">Menu</label>
    4. <ul class="c-navigation__row">
    5. <li class="c-navigation__list"><a class="c-navigation__link" href="#">All Products</a></li>
    6. <li class="c-navigation__list"><a class="c-navigation__link" href="#">Category 1</a></li>
    7. <li class="c-navigation__list"><a class="c-navigation__link" href="#">Category 2</a></li>
    8. <li class="c-navigation__list"><a class="c-navigation__link" href="#">Category 3</a></li>
    9. <li class="c-navigation__list"><a class="c-navigation__link" href="#">More</a></li>
    10. </ul>
    11. </nav>

    Tables

    1. <table class="c-table-simple">
    2. <thead>
    3. <tr class="c-table-simple__row">
    4. <th class="c-table-simple__cell">Name</th>
    5. <th class="c-table-simple__cell">Age</th>
    6. <th class="c-table-simple__cell">Feet</th>
    7. </tr>
    8. </thead>
    9. <tbody>
    10. <tr class="c-table-simple__row">
    11. <td class="c-table-simple__cell">Tim Smith</td>
    12. <td class="c-table-simple__cell">25</td>
    13. <td class="c-table-simple__cell">2</td>
    14. </tr>
    15. </tbody>
    16. </table>

    17. ### striped

    18. <table class="c-table-stripped">...</table>

    19. <table class="c-table-responsive">...</table>

    Headings

    1. <h1 class="c-heading-alpha">Heading Alpha <span class="c-heading--subheading">Subheading</span></h1>

    2. <h1 class="c-heading-alpha">...</h1>
    3. <h2 class="c-heading-bravo">...</h2>
    4. <h3 class="c-heading-charlie">...</h3>
    5. <h4 class="c-heading-delta">...</h4>
    6. <h5 class="c-heading-echo">...</h5>
    7. <h6 class="c-heading-foxtrot">...</h6>

    8. <p class="c-text-body">...</p>

    9. <h1 class="c-heading-alpha c-heading--keyline">...</h1> (adds a little divider under the heading)

    Utilities

    Borders: Borders can be used on any element. The example below shows border classes being used on buttons.

    1. u-border-none
    2. u-border-thick
    3. u-border-rounded
    4. u-border-square

    5. ### border color classes: these are based on theme, so try other color names as well as those below.

    6. u-border-red
    7. u-border-yellow
    8. u-border-blue
    9. u-border-green
    10. u-border-black

    11. ### button examples

    12. <button class="c-button u-border-none">No Border</button>
    13. <button class="c-button u-border-thick">Thick Border</button>
    14. <button class="c-button u-border-rounded">Rounded Border</button>
    15. <button class="c-button u-border-square">Square Border</button>

    Clear Fix

    1. u-clear-fix

    Colors

    Background colors:

    1. u-bg-red
    2. u-bg-yellow
    3. u-bg-blue
    4. u-bg-green
    5. u-bg-black
    6. u-bg-gray-50
    7. u-bg-gray-40
    8. u-bg-gray-30-gray-10
    9. u-bg-gray-20
    10. u-bg-gray-10
    11. u-bg-white
    12. u-bg-primary
    13. u-bg-secondary
    14. u-bg-tertiary
    15. u-bg-accent
    16. u-bg-highlight

    Text colors:

    1. u-color-red
    2. u-color-yellow
    3. u-color-blue
    4. u-color-green
    5. u-color-black
    6. u-color-gray-50
    7. u-color-gray-40
    8. u-color-gray-30
    9. u-color-gray-20
    10. u-color-gray-10
    11. u-color-white
    12. u-color-primary
    13. u-color-secondary
    14. u-color-tertiary
    15. u-color-accent
    16. u-color-highlight

    Display: These can take breakpoint modifiers. They work from small to wide. 

    If you hide on small, it will hide on everything unless you specifically tell it not to: --s --m --l --w

    1. u-hide-visually - hide visually but not for screen readers
    2. u-hidden - hide from everything
    3. u-invisible - visually hidden but no layout change
    4. u-flex
    5. u-block
    6. u-shown
    7. u-inline
    8. u-inline-block
    9. u-visible

    10. ### Add bBreakpoint modifiers to the class, such as:

    11. u-hidden--s

    12. ### Hide on small screen, show on all others:

    13. <div class="u-hidden--s u-shown--m">...</div>

    14. ### Hide on large and wide screen, show on small and medium:

    15. <div class="u-hidden--l">...</div>

    Grids: Create auto columns that wrap intelligently

    1. o-layout u-grids2
    2. o-layout u-grids3
    3. o-layout u-grids4
    4. etc...

    5. u-grids-1
    6. u-grids-2
    7. u-grids-3
    8. u-grids-4
    9. u-grids-5
    10. u-grids-6
    11. u-grids-7
    12. u-grids-8
    13. u-grids-9
    14. u-grids-10
    15. u-grids-11
    16. u-grids-12

    17. ### Example

    18. <div class="o-layout u-grids-3">
    19. <div class="o-layout__item">
    20. </div>
    21. <div class="o-layout__item">
    22. </div>
    23. <div class="o-layout__item">
    24. </div>
    25. <div class="o-layout__item">
    26. </div>
    27. <div class="o-layout__item">
    28. </div>
    29. </div>

    30. ### breakpoints: all grid classes can have breakpoints added, --s --m --l --w

    31. ### breakpoint exmaple, show one column on small, show three on medium and up:

    32. o-layout u-grids-1 u-grids-3--m

    Use with breakpoints:

    1. o-layout u-grids-1 u-grids-3--m

    Iconography

    Go here for a list of available icons: https://docs.miva.com/elements/iconography/demo.html

    1. <span class="u-icon-question"></span>
    2. <span class="u-icon-envelope"></span>
    3. etc...

    Print

    Print styles are handled automatically (from HTML5 Boilerplate)

    1. ### only display on printout

    2. u-printable__content

    Typography

    1. ### font-families

    2. u-font-primary
    3. u-font-secondary

    4. ### alignment --s --m --l --w

    5. u-text-left
    6. u-text-center
    7. u-text-right
    8. u-text-justify

    9. ### sizing

    10. u-font-tiny
    11. u-font-small
    12. u-font-medium
    13. u-font-large
    14. u-font-huge

    15. ### weight, transformations, decorations

    16. u-text-light
    17. u-text-regular
    18. u-text-medium
    19. u-text-bold
    20. u-text-boldest
    21. u-text-italic
    22. u-text-lowercase
    23. u-text-uppercase
    24. u-text-caps
    25. u-text-strike
    26. u-text-underline
    27. u-text-normal
    28. u-text-revert

    29. u-text-constrain (max 75chars per line)

    Vertical Alignment

    1. u-align-baseline
    2. u-align-bottom
    3. u-align-middle
    4. u-align-top

    5. u-vertical-align-parent
    6. u-vertical-align-center

    Widths: These give a fluid width to whichever element they are applied to and include breakpoints --s --m --l --w

    1. u-width-# --s --m --l --w (# is the number of columns wide, out of 12)

    2. <div class="o-layout">
    3. <div class="o-layout__item u-width-6">
    4. </div>
    5. <div class="o-layout__item u-width-6">
    6. </div>
    7. </div>

    8. ### with various breakpoints, can be included in one o-layout and cols will auto wrap to fit

    9. o-layout__item u-width-12 u-width-4--m
    10. o-layout__item u-width-6 u-width-4--m
    11. o-layout__item u-width-6 u-width-4--m

    12. ### width classes, each can take a breakpoint as well --s --m --l --w (width of 1 on small, width of 6 on medium and up: u-width-1--s u-width-6--m)

    13. u-width-1
    14. u-width-2
    15. u-width-3
    16. u-width-4
    17. u-width-5
    18. u-width-6
    19. u-width-7
    20. u-width-8
    21. u-width-9
    22. u-width-10
    23. u-width-11
    24. u-width-12

    25. ### offset classes, also can take breakpoints --s --m --l --w

    26. u-offset-1
    27. u-offset-2
    28. u-offset-3
    29. u-offset-4
    30. u-offset-5
    31. u-offset-6
    32. u-offset-7
    33. u-offset-8
    34. u-offset-9
    35. u-offset-10
    36. u-offset-11
    37. u-offset-12

    Z-Index

    1. u-below-content
    2. u-over-content
    3. u-over-control
    4. u-over-page
    5. u-over-screen
    6. u-over-everything

    Extensions

    These are css/html components that can be used in different readythemes, a sort of plug-n-play system.

    AJAX Add-to-Cart

    Adds a product to the basket without reloading the page.

    Breadcrumbs

    Category Tree

    Hero

    Hero Slider

    Image carousel header/section

    Messages

    Alerts, success, info, etc...

    Mini-Basket

    Mini basket that flies out from the right edge of the browser.

    Navigation

    Use dropdown, overlfow, and overlay style navigations.

    Product Carousel

    Search Preview

    Spinner

    Ajax spinner icon.


    overall rating:
    ★★★★★
    ★★★★★
    ★★★★★
    my rating: log in to rate

    css elements miva merchant readytheme shadows stormorph

    The blog posts on Scot's Scripts are made using by Scot's Blogger, a full featured Wordpress replacement Miva Merchant blogging module.