Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
feat(page): Add dc-page and dc-container. Close #226.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Lovato committed Nov 10, 2016
1 parent 7c76d97 commit 4312620
Show file tree
Hide file tree
Showing 29 changed files with 61 additions and 27 deletions.
11 changes: 0 additions & 11 deletions docs/demo/assets/styles/partials/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ a {
@include border-box;
position: relative;
margin-top: $dc-touch-size;
padding: $dc-space50;
z-index: 0;
min-height: calc(100vh - 4.4rem);
transition: transform .2s ease-out, padding .2s ease-out;
Expand Down Expand Up @@ -60,14 +59,4 @@ a {
}
}

@include breakpoint($dc-large-width)
{
padding: $dc-space100;
}

@include breakpoint($dc-monstrous-width)
{
padding: $dc-space100 $dc-space150;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
notes: |
Use `dc-page` to set up the page space. It applies the default page padding for several screen sizes.

Use `dc-container` to create the main content container. Your content and cards should go inside of this container. Use `dc-container--contained` to limit the maximum size of the container.
---
11 changes: 0 additions & 11 deletions docs/demo/views/02-grid.html

This file was deleted.

11 changes: 11 additions & 0 deletions docs/demo/views/02-structure-and-grid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
fabricator: true
---

<h1 class="dc-h1" data-f-toggle="labels">Page Structure and Grid</h1>

{{#each materials.02-structure-and-grid.items}}

{{> f-item this}}

{{/each}}
6 changes: 4 additions & 2 deletions docs/demo/views/layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@
</header>
{{> f-icons}}
{{> f-menu}}
<div class="f-container">
<div class="f-container dc-page">
<div class="dc-container dc-container--limited">
{{/if}}


{% body %}

{{#if fabricator}}
</div>
</div>
</div>
<div class="dc-grid"></div>

<script src="{{basePath}}/assets/scripts/main.js"></script>
Expand Down
7 changes: 4 additions & 3 deletions src/styles/dress-code.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// core
@import "core/core";

// grid
@import "grid/grid";
// structure and grid
@import "structure/structure";

// atoms
@import "atoms/btn";
Expand Down Expand Up @@ -44,7 +44,8 @@
@include dc-typography-selectors;
@include dc-patterns-selectors;

// grid
// structure and grid
@include dc-structure-selectors;
@include dc-grid-selectors;

// atoms
Expand Down
File renamed without changes.
35 changes: 35 additions & 0 deletions src/styles/structure/_page-container.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@mixin dc-page {

padding: $dc-space75;

@include breakpoint($dc-large-width) {
padding: $dc-space100;
}

@include breakpoint($dc-huge-width) {
padding: $dc-space150;
}

@include breakpoint($dc-giant-width) {
padding: $dc-space150 $dc-space250;
}
}

@mixin dc-container {
margin: 0 auto;

&--limited {
max-width: 120rem;
}
}


@mixin dc-structure-selectors {
.dc-page {
@include dc-page;
}

.dc-container {
@include dc-container;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "grid-variables";
@import "grid-mixins";
@import "grid-classes";
@import "page-container";

0 comments on commit 4312620

Please sign in to comment.