Skip to content

Commit

Permalink
More grid refactoring -- need to redo how we are doing gutters to use…
Browse files Browse the repository at this point in the history
… custom properties (next todo item)
  • Loading branch information
roblevintennis committed Sep 25, 2020
1 parent 1f91c53 commit a016599
Show file tree
Hide file tree
Showing 5 changed files with 541 additions and 337 deletions.
124 changes: 63 additions & 61 deletions agnosticui-css/flexboxgrid-custom.css
Expand Up @@ -352,6 +352,69 @@
order: initial;
}


/* This enables us to opt back in for gutters for things like cards.
These are only meant to be applied to the row element */

.gutter-4 {
margin-left: -2px;
margin-right: -2px;
}
.gutter-4 .auto:not(:first-child) {
padding-left: 2px;
}
.gutter-4 .auto:not(:last-child) {
padding-right: 2px;
}

.gutter-8 {
margin-left: -4px;
margin-right: -4px;
}
.gutter-8 .auto:not(:first-child) {
padding-left: 4px;
}
.gutter-8 .auto:not(:last-child) {
padding-right: 4px;
}

.gutter-16 {
margin-left: -8px;
margin-right: -8px;
}
.gutter-16 .auto:not(:first-child) {
padding-left: 8px;
}
.gutter-16 .auto:not(:last-child) {
padding-right: 8px;
}

.gutter-24 {
margin-left: -12px;
margin-right: -12px;
}
.gutter-24 .auto:not(:first-child) {
padding-left: 12px;
}
.gutter-24 .auto:not(:last-child) {
padding-right: 12px;
}

.gutter-32 {
margin-left: -16px;
margin-right: -16px;
}
.gutter-32 .auto:not(:first-child) {
padding-left: 16px;
}
.gutter-32 .auto:not(:last-child) {
padding-right: 16px;
}

.auto {
flex: 1 1 auto;
}

@media only screen and (min-width: 576px) {
.col-sm {
flex-grow: 1;
Expand Down Expand Up @@ -1093,67 +1156,6 @@
order: initial;
}

/* This enables us to opt back in for gutters for things like cards.
These are only meant to be applied to the row element */

.gutter-4 {
margin-left: -2px;
margin-right: -2px;
}
.gutter-4 .auto:not(:first-child) {
padding-left: 2px;
}
.gutter-4 .auto:not(:last-child) {
padding-right: 2px;
}

.gutter-8 {
margin-left: -4px;
margin-right: -4px;
}
.gutter-8 .auto:not(:first-child) {
padding-left: 4px;
}
.gutter-8 .auto:not(:last-child) {
padding-right: 4px;
}

.gutter-16 {
margin-left: -8px;
margin-right: -8px;
}
.gutter-16 .auto:not(:first-child) {
padding-left: 8px;
}
.gutter-16 .auto:not(:last-child) {
padding-right: 8px;
}

.gutter-24 {
margin-left: -12px;
margin-right: -12px;
}
.gutter-24 .auto:not(:first-child) {
padding-left: 12px;
}
.gutter-24 .auto:not(:last-child) {
padding-right: 12px;
}

.gutter-32 {
margin-left: -16px;
margin-right: -16px;
}
.gutter-32 .auto:not(:first-child) {
padding-left: 16px;
}
.gutter-32 .auto:not(:last-child) {
padding-right: 16px;
}

.auto {
flex: 1 1 auto;
}
}

@media only screen and (max-width: 576px) {
Expand Down
9 changes: 1 addition & 8 deletions showcase/src/App.vue
Expand Up @@ -2,7 +2,7 @@
<div id="app">
<div :class="$style.layout">
<AppHeader />
<main :class="$style.main">
<main>
<SystemCards />
<InputCards />
<LayoutCards />
Expand Down Expand Up @@ -121,11 +121,4 @@ export default {
min-height: 100vh;
flex-direction: column;
}
.main {
/* TODO -- once we've got everything in the flexgrid I think we'll turn all this off */
width: var(--app-width-initial);
margin: 0 auto;
flex: 1 1 auto;
}
</style>

0 comments on commit a016599

Please sign in to comment.