Documentation

Layout

Containers

Containers dictate the width of the content and give the inner-content a slight amount of padding from the outer border. A div with a class of M will extend the full width of the page and a div with a class of M-container--narrow will have a max-width of 960px and will be centered with margin: auto. You can nest a M-container--narrow inside of a M.

Container-narrow

<div class="M-container--narrow">

<!--your web content here-->

</div>

<div class="M-container--narrow">

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit iusto aspernatur vitae cum obcaecati itaque rem aut voluptatem possimus ullam accusantium veniam, ipsum non, enim magni dolorum. Dicta harum quo deserunt quae corporis?

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat quod voluptatem ratione perferendis quo. Voluptatibus repudiandae placeat rerum asperiores voluptate, voluptatum quo ipsum! Dolor eius velit perspiciatis cumque ab ullam, id impedit in! Minima eligendi est id incidunt molestiae amet expedita possimus, magni quam. Reprehenderit earum atque minima vitae amet quod magnam, voluptatem nostrum ullam. Quisquam nobis eos quos iste! Aliquid dolorum voluptas eum, tenetur sint aspernatur itaque iusto perferendis voluptates, veniam velit libero aperiam, explicabo, esse. Vel suscipit scipit odit sequi reprehenderit esse. Placeat iure distinctio quasi labore autem officiis, sed, voluptate

Container-full

<div class="M-container--full">

   <!--your web content here-->

</div>

<div class="M-container--full">

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit iusto aspernatur vitae cum obcaecati itaque rem aut voluptatem possimus ullam accusantium veniam, ipsum non, enim magni dolorum. Dicta harum quo deserunt quae corporis?

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat quod voluptatem ratione perferendis quo. Voluptatibus repudiandae placeat rerum asperiores voluptate, voluptatum quo ipsum! Dolor eius velit perspiciatis cumque ab ullam, id impedit in! Minima eligendi est id incidunt molestiae amet expedita possimus, magni quam. Reprehenderit earum atque minima vitae amet quod magnam, voluptatem nostrum ullam. Quisquam nobis eos quos iste! Aliquid dolorum voluptas eum, tenetur sint aspernatur itaque iusto perferendis voluptates, veniam velit libero aperiam, explicabo, esse. Vel suscipit scipit odit sequi reprehenderit esse. Placeat iure distinctio quasi labore autem officiis, sed, voluptate

Grid

Grids must have an outer-div with a class of M-grid :

<div class="M-grid">

The grid-items (columns) are nested inside grid-container and have the following format:

<div class="
    M-grid__sm-[n]-of-12
    M_grid__md-[n]-of-12
    M-grid__lg-[n]-of-12">

The default column sizes for three screen-widths:

    sm < 750px,
    md > 750px
    lg > 1000px.

<div class="grid-container">

<div class="M-grid__sm-[n]-of-12 M-grid__md-[n]-of-12 M-grid__lg-[n]-of-12">
<!--your contents here-->
</div>

</div>

Thus, the grid-item with classes:
    M-grid__sm-12-of-12
    M-grid__md-6-of-12
    M-grid__lg-3-of-12

Live Example
multiple grid-items in a grid-container

M-grid__sm-12-of-12
M-grid__md-6-of-12
M-grid__lg-4-of-12
M-grid__sm-12-of-12
M-grid__md-6-of-12
M-grid__lg-4-of-12
M-grid__sm-12-of-12
M-grid__md-6-of-12
M-grid__lg-4-of-12
M-grid__sm-6-of-12
M-grid__md-4-of-12
M-grid__lg-3-of-12
M-grid__sm-6-of-12
M-grid__md-4-of-12
M-grid__lg-3-of-12
M-grid__sm-8-of-12
M-grid__md-6-of-12
M-grid__lg-3-of-12
M-grid__sm-4-of-12
M-grid__md-6-of-12
M-grid__lg-3-of-12
M-grid__sm-4-of-12
M-grid__md-3-of-12
M-grid__lg-2-of-12
M-grid__sm-4-of-12
M-grid__md-3-of-12
M-grid__lg-2-of-12
M-grid__sm-4-of-12
M-grid__md-3-of-12
M-grid__lg-2-of-12
M-grid__sm-4-of-12
M-grid__md-3-of-12
M-grid__lg-2-of-12
M-grid__sm-4-of-12
M-grid__md-9-of-12
M-grid__lg-2-of-12
M-grid__sm-4-of-12
M-grid__md-3-of-12
M-grid__lg-2-of-12

General Formatting

Typography

Heading Tags

Heading : <h1>

Heading : <h2>

Heading : <h3>

Heading : <h4>

Heading : <h5>
Heading : <h6>

Text Formats

The text right here is inside of a <p> tag. All font sizes and line heights are calculated based on rems. If you want to change the default font-size, you can set a baseline font-size value on the html and all of the typography will scale accordingly. The standard paragraph text is sized at 1rem. And the default line-height is set to 1.625 on tablet/desktop for ideal legibility and 1.25 on mobile to accomodate the lesser screen height.

link example
( in<a> tag )
code syntax
( in<code> tag )
highlighted text
( in <mark> tag )
line-through text
( in <del> )
small text
(in <small> tag )

Buttons

Default

M-btn
M-btn--sm

M-btn
M-btn--md

M-btn
M-btn--lg

M-btn M-btn--block

Extra

M-btn
M-btn--primary

M-btn
M-bg--disabled

M-btn
M-btn--block
M-btn--sm
M-bg--warn

Lists

Unordered List

  • Order
  • Eggs
  • Sugar
    • Chocolate Chips
    • Pecans
    • Peanut Butter
  • Butter
<ul>
  <li>Order</li>
  <li>Eggs</li>
  <li>Sugar</li>
<ul>
  <li>Chocolate Chips</li>
  <li>Pecans</li>
  <li>Peanut Butter</li>
</ul>
  <li>Butter</li>
</ul>

Ordered List

  1. Milk
  2. Eggs
  3. Flour
    1. Apple
    2. Orange
    3. Carrot
  4. Sugar
<ol>
<li>Milk</li>
  <li>Eggs</li>
  <li>Flour</li>
<ol>
  <li>Apple</li>
  <li>Orange</li>
  <li>Carrot</li>
</ol>
  <li>Sugar</li>
</ol>

Tables + Forms

Tables

The Margo <table> element follows the convention of having an inner <thead> for the table header row and <tbody> for the data rows.

Short Table

Name Age Bed Time Favorite Animal
Zoey 4 9:30 Giraffe
Haley 2 8:00 Tiger
Rylan 1 7:30 TBD
<table class="M-table">
   <thead>
      <tr>
         <th>Name</th>
         <th>Age</th>
         <th>Bed Time</th>
         <th>Favorite Animal</th>
      </tr>
   </thead>
   <tbody>
      <tr>
         <td>Zoey</td>
         <td>4</td>
         <td>8:00</td>
         <td>TBD</td>
      </tr>
   </tbody>

</table>

Full Width Table

<table class="M-table M-table--full-width M-table--striped">
   ...
</table>
Rank Team W-L Record Pts For
1 food fight 8-4 1,137.88
2 Foxy Tacos 7-5 1,184.96
3 DorkTron 7-5 912.22
4 It's Just A Name 6-6 1,158.42

Configuration Options

Forms

<form class="form-group">

Simple Form

Forms often contain a pair of <label> + <input> tags. In Margo, these should be encapsulated inside a <div> with a class of form-field

<form class="M-form-group">

   <div class="M-form-group__field">
       <label > Username</label>
       <input type="text"/>
   </div>

   <div class="M-form-group__field">
       <label >Password </label>
       <input type="password"/>
   </div>

   <br/>

   <div class="M-form-group__field">
       <input type="submit" class="M-btn" value="Login"/ >
   </div>

</form>

Long Form
with grid-container and grid-item elements

<div class="
  M-form-group__field
  M-grid__sm-[n]-of-12
  M-grid__md-[n]-of-12 ...">

<form class="M-form-group M-grid">
   <div class="M-form-group__field M-grid__sm-12-of-12 M-grid__md-4-of-12">
       <label class="M-form-group__field_label" > First </label>
       <input class="M-form-group__field_input" type="text"/>
   </div>

   <div class="form-field M-grid__sm-12-of-12 M-grid__md-4-of-12">
       <label class="M-form-group__field_label" >Middle </label>
       <input class="M-form-group__field_input" type="text"/>
   </div>

   <div class="form-field M-grid__sm-12-of-12 M-grid__md-4-of-12">
       <label class="M-form-group__field_label" >Last</label>
       <input class="M-form-group__field_input" type="text"/>
   </div>

   <div class="form-field M-grid__sm-12-of-12 M-grid__md-6-of-12">
       <label class="M-form-group__field_label" >Email </label>
       <input class="M-form-group__field_input" type="email"/>
   </div>

   <div class="form-field M-grid__sm-12-of-12 M-grid__md-6-of-12">
       <label class="M-form-group__field_label" >State </label>
       <select class="M-form-group__field_input" >
         <option value="CA">California </option>
         <option value="NY">New York </option>
         <option value="TX">Texas </option>
     </select>
   </div>

   <div class="M-grid__sm-12-of-12 md-12-of-12 M-form-group__field">
      <label class="M-form-group__field_label" >Description </label>
      <textarea class="M-form-group__field_input" rows="6"> </textarea>
   </div>

    <div class="M-grid__sm-12-of-12 M-grid__md-4-of-12 M-form-group__field">
        <label class="M-form-group__field_label" >Do you like me?</label>
        <label class="M-form-group__field_input M-radiocheck"><input type="radio" value="no" name="shampoo" ><span>No</span></label>
        <label class="M-form-group__field_input M-radiocheck"><input type="radio" value="yes" name="shampoo" ><span>Yes</span></label>
    </div>

    <div class="M-grid__sm-12-of-12 M-grid__md-4-of-12 M-form-group__field">
        <label class="M-form-group__field_label" >Pizza Toppings?</label>
        <label class="M-form-group__field_input M-radiocheck"><input type="checkbox" value="mushrooms" name="pizza" ><span>Mushrooms</span></label>
        <label class="M-form-group__field_input M-radiocheck"><input type="checkbox" value="pepperoni" name="pizza" ><span>Pepperoni</span></label>
        <label class="M-form-group__field_input M-radiocheck"><input type="checkbox" value="deviant" name="pizza"><span>Pineapple</span></label>
    </div>

    <div class="M-grid__sm-6-of-12 M-grid__md-6-of-12 M-form-group__field">
        <input type="submit" class="M-btn M-btn--md" value="Update" / >
    </div>

</form>

Other

Radio Buttons

<label class="M-radiocheck">
   <input class="M-radio" type="radio" value="pass" name="pass_or_fail">
   <span>Pass</span>
</label>

Check boxes

<label class="M-radiocheck">
   <input class="M-checkbox" type="checkbox" value="bill_later" name="pizza" >
   <span>Bill Me Later</span><
</label>

Components

Callout Segment

Use a callout segment for any kind of content that you want to emphasize. To use this component, you use the HTML5 <section> tag with a class of segment.

Example

Places that start with M

  • Minneapolis
  • Marfa
  • Madison

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident earum modi corrupti exp edita, accusantium numquam nesciunt non eum ipsa iste voluptate saepe, sit quibusdam odio suscipit inventore velit quos aperiam ducimus dicta perspiciatis.

<section class="M-segment">

   <h4>Cities that start with M</h4>

   <ul>
      <li>Minneapolis</li>
      <li>Marfa</li>
      <li>Madison</li>
   </ul>

   <p>
      Lorem ipsum...
   </p>

</section>

Block Quotes

Repellendus iusto ex, officia est optio labore quam et, illo necessitatibus consectetur quaerat repudiandae, quae.

Maiores facere tempore animi mollitia. Facilis quibusdam amet nam consequuntur quidem, deleniti nobis, accusamus autem voluptas rerum odit at, labore numquam exercitationem id porro, modi veniam aspernatur commodi blanditiis ipsam. Animi eaque et veritatis quis. Eum excepturi repellendus, aut iusto, non earum consectetur. Quas architecto facere sint incidunt praesentium! Veniam omnis dignissimos eius, officia, deleniti recusandae libero.

Someone important from A Credible Source
<blockquote class="M-blockquote">

  <p>
    ....
  </p>
  <cite class="M-cite">
    ....
  </cite>

</blockquote>

Responsive Tiles

Create responsive tiles that retain their proportions with fluid (%-based) widths

M-tile M-tile--sm-1-x-1

1:1

M-tile M-tile--sm-4-x-3

4:3

M-tile M-tile--sm-3-x-2

3:2

M-tile M-tile--sm-16-x-9

16:9

M-tile M-tile--sm-2-x-1

2:1

M-tile M-tile--sm-3-x-1

3:1

M-tile M-tile--sm-4-x-1

4:1

Miscellaneous

Context Colors

class="... M-bg--success"

Something good happened

class="... M-bg--info"

Something notable happened

class="... M-bg--warn"

Something peculiar happened

class="... M-bg--fail"

Something bad happened


class="... M-bg--inverted"

Something needs to be contrasted

class="... M-bg--disabled"

Something needs to be disabled

Text Formatting Helpers

Aligned left
class="... M-text--left"

Aligned center
class="... M-text--center"

Aligned right
class="... M-text--right"


class="... M-text--muted"
will subdue the text with a light gray color

class="... M-text--primary"
will emphasize the text with the primary color.

Code Blocks

Encapsulated in <pre> ... </pre>. Be mindful of whitespace inside of <pre> tag.

<pre>
  
  <h2>This is code</h2>
  <p>And this is what might happen if you extend past the width of the <pre> container-- a scroll bar will appear. No word-wrap.</p>
  
</pre>