Clone on GitHub
chevron_forward

Sections

First Published On:
April 21, 2024
Last Updated:
July 25, 2024

Figure 1. Animation demonstrating state layer implementation.

Overview

Sections are the most essential building block of a page. There are 5 default utility categories for them.

Class Name Padding (top and bottom) Padding (left-and-right)
.section__leastpadding var(--titleBFontSize) var(--titleBFontSize)
.section__lesspadding var(--display2FontSize) var(--display1FontSize)
.section__default var(--display1FontSize) var(--display1FontSize)
.section__morepadding calc(var(--display1FontSize) * var(--wholeStep)) var(--display1FontSize)
.section__mostpadding calc(var(--display1FontSize) * var(--display2FontSize)) var(--display1FontSize)

You may notice that there’s more variance in top-and-bottom padding than left and right padding. That’s simply because I’ve never had a use case where I needed a least-padding section that had the default left-and-right padding. If user feedback indicates this is a stupid way to do it, I’ll gladly change it.

Recommended Usage

Customization

Resources that mention this topic

No items found.
info

Get Help from a LiftKit Expert

arrow_forward
Book Quick Chat

Give Us Feedback

Click or tap to reveal form.
expand_more
check_circle
Success! An email has been sent to you with more details.
Please allow up to 5 minutes for it to arrive. Mailchimp can take a bit.
error
Error: Something went wrong. Email info@chainlift.io directly for assistance.
.section__leastPadding {
  padding: 1.618em 4.235em;
}

.section__lessPadding {
  padding: 2.618em 4.235em;
}

.section__default {
  padding: 4.235em;
}

.section__morePadding {
  padding: 6.852em 4.235em;
}

.section__mostPadding {
  padding: 11.087em 4.235em;
}

@media screen and (max-width: 991px) {
  .section__lessPadding {
    padding: 2.618em 1.618em;
  }

  .section__default {
    padding: 1.618em;
  }

  .section__morePadding {
    padding: 4.235em 1.618em;
  }

  .section__mostPadding {
    padding: 6.852em 1.618em;
  }

}
content_copy
code snippets will appear here