Skip to content

Commit

Permalink
feat(basic and error pages): suite of padding util classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Bull committed Jul 29, 2019
1 parent a3a7a3f commit 359b866
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
Empty file added export
Empty file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- include 'organisms-page-header' -%}
{%- block pageContent %}
<main>
<main class="grav-u-pb-xl">
{% block mainContent -%}
{#
Just some dummy example content.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{%- from 'atoms-ascii-art' import asciiArt -%}

{%- block pageContent %}
<main class="grav-o-container">
<main class="grav-o-container grav-u-pb-xl">
<section class="grav-o-section grav-u-text-centered">
{{ asciiArt( ascii ) | safe }}
<h1>{{title}}</h1>
Expand Down
11 changes: 11 additions & 0 deletions packages/gravity-ui-web/src/sass/06-utilities/_padding.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$grav-sides: (top, bottom, left, right);
$grav-spaces-map: ('xs': $grav-sp-s,'s': $grav-sp-s, 'm': $grav-sp-m, 'l': $grav-sp-l, 'xl': $grav-sp-xl, 'xxl': $grav-sp-xl);

// Generate utility classes for available spacing sizes
@each $name, $space in $grav-spaces-map {
@each $side in $grav-sides {
.grav-u-p#{str-slice($side, 0, 1)}-#{$name} {
padding-#{$side}: #{$space} !important;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
// triangle, eg. hide helper class.
@import 'color-schemes';
@import 'text';
@import 'padding';

0 comments on commit 359b866

Please sign in to comment.