Full Bleed Square

HTML

<main class="cf w-100">
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0006.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0002.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0003.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0004.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0007.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0008.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0009.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0010.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0011.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0012.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0013.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0014.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0015.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0016.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0017.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0018.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0019.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0020.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0021.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
  <div class="fl w-50 w-third-m w-25-ns">
    <div class="aspect-ratio aspect-ratio--1x1">
      <img style="background-image:url(http://mrmrs.github.io/images/0022.jpg);"
        class="db bg-center cover aspect-ratio--object" />
    </div>
  </div>
</main>

css

.aspect-ratio {
    height: 0;
    position: relative;
}

.aspect-ratio--1x1 {
    padding-bottom: 100%;
}

.aspect-ratio--object {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
}

.cover {
    background-size: cover !important;
}

.bg-center {
    background-repeat: no-repeat;
    background-position: center center;
}

.cf:before, .cf:after {
    content: " ";
    display: table;
}

.cf:after {
    clear: both;
}

.cf {
    *zoom: 1;
}

.db {
    display: block;
}

.fl {
    float: left;
    _display: inline;
}

.w-50 {
    width: 50%;
}

.w-100 {
    width: 100%;
}

@media screen and (min-width: 30em) {
    .w-25-ns {
        width: 25%;
    }
}

@media screen and (min-width: 30em) and (max-width: 60em) {
    .w-third-m {
        width: calc(100% / 3);
    }
}

Css stats for this component

Gzipped Size
376B
Selectors
15
Declarations
25

Install via npm Only installs the needed tachyons-modules for this component

npm i --save tachyons-aspect-ratios tachyons-background-size tachyons-background-position tachyons-clears tachyons-display tachyons-floats tachyons-widths

Other Components

Article Lists

Title Preview Author Media Flipped Title Preview Author Media

Articles

Feature Full Bleed Background Headline Title Text Large Title Text Left Title Top Border Left Title Photo Essay Single Column Large Title Title Highlight Header Cover Title Text Image Title Text

Avatars

Circle Border Circle Double Ring Rounded Large Rounded Medium Rounded Small Square

Banners

Basic Info Single Cta

Buttons

Basic Previous Next Basic Rounded Extra Small Basic Rounded Small Basic Rounded Basic Centered Icons Pill Grow Pill

Cards

Album Centered Album Left Basic Text Card News Card Product Card Profile Card Title Subtitle Profile Card Suggested Profile Text Card

Collections

Albums Movies Posters Dim Posters Square Title Subtitle Vinyl

Definition Lists

Inline Simple

Error Pages

404

Footers

Centered Icons Hover Glow Inline Text Simple Large Type Small Print Social Circles Social Simple Text Social Simple Social Text Social Studios

Forms

Checkbox List Input Text Label Newsletter Subscription Password Sign In Sign Up Textarea Label

Headers

Circle Avatar Title Subtitle Rounded Avatar Title Subtitle Startup Hero

Layout

Aspect Ratio 16x9 Aspect Ratio 1x1 Aspect Ratio 3x4 Aspect Ratio 4x3 Aspect Ratio 4x6 Aspect Ratio 5x7 Aspect Ratio 5x8 Aspect Ratio 6x4 Aspect Ratio 7x5 Aspect Ratio 8x5 Aspect Ratio 9x16 Centered Container Five Column Collapse Alternate Five Column Collapse Asymmetrical Five Column Collapse Mixed Five Column Collapse One Five Column Fixed Table Layout Grid Mixed Rows Fixed Table Layout Grid Flag Object Bottom Flag Object Collapse Flag Object Top Flag Object Four Column Collapse Two Collapse One Four Column Collapse Two Four Column Full Bleed 16x9 Full Bleed 4x6 Full Bleed 5x7 Full Bleed 5x8 Full Bleed 6x4 Full Bleed 7x5 Full Bleed 8x5 Full Bleed 9x16 Full Bleed Square Full Screen Centered Title Horizontal Aspect Ratios Three Column Collapse One Three Column Two Column Collapse One Two Column

Links

Animate Background Color Animate Color Dim No Underline Underline On Hover

Lists

Block Item Dotted Border Border Spaced Border Tight Contact Phone Follower Notifications Rounded Square Avatar Follower Notifications Hashtags Items Image Title Price Large Links Inline Links Animate Color Links Inline Links With Borders Inline Slab Stat Large Slab Stat Small Slab Stat Title Text

Marketing

Iphone App

Nav

Fixed Semi Transparent Large Title Link List List Overflow Logo Links Inline Collapse Logo Links Inline Logo Titles Links Centered Minimal Sign Up Title Link List

Pages

4x4 Mixed Grid Double Portfolio Project Swiss Cover Five Columns

Quotes

Left Border Pull Quote

Tables

Basic Striped Dark

Text

Large Paragraph Narrow Paragraph Paragraph Small Narrow Paragraph Small Paragraph Title Subtitle Centered Wide Paragraph