Skip to content

Place

Place utilities for grid and flex display with module mixins for responsive modifiers.

Utilities (anchor)

Place utility names and property values
Utility name Property values
Place content
.place-content-flex-start place-content: flex-start
.place-content-flex-end place-content: flex-end
.place-content-start place-content: start
.place-content-end place-content: end
.place-content-center place-content: center
.place-content-around place-content: space-around
.place-content-between place-content: space-between
.place-content-evenly place-content: space-evenly
Place items
.place-items-flex-start place-items: flex-start
.place-items-flex-end place-items: flex-end
.place-items-start place-items: start
.place-items-end place-items: end
.place-items-center place-items: center
Place self
.place-self-flex-start place-self: flex-start
.place-self-flex-end place-self: flex-end
.place-self-start place-self: start
.place-self-end place-self: end
.place-self-center place-self: center

Responsive mixins (anchor)

Responsive modifier mixins are provided to include where required in custom breakpoints, the utilities available use the following modifier class naming convention:

.place-content-start
.place-content-start-xxl
.place-content-start-xl
.place-content-start-lg
.place-content-start-md
.place-content-start-sm
.place-content-start-xs
.place-content-start-xxs

The optional align and justify and utility styles can also be used with the place utilities if included.

Using the module (anchor)

Load StyleMods as demonstrated (change file path as required) then include the Sass mixin anywhere below.

Each set of utilities can be included individually:

custom.scss
@use "stylemods/scss" as *;
@include place-content-css;
@include place-items-css;
@include place-self-css;

// Example breakpoint
@media (width < 480px) {
  @include place-content-sm-css;
  @include place-items-sm-css;
  @include place-self-sm-css;
}

Or included grouped in a single mixin:

custom.scss
@use "stylemods/scss" as *;
@include place-css;

// Example breakpoint
@media (width < 480px) {
  @include place-sm-css;
}

Using the framework (anchor)

Using the recommended custom setup enable the styles (and required breakpoints) in an overrides document:

overrides.scss
@use "stylemods/scss/configuration" as *;
$enable-place:      true;
$enable-place-sm:   true;

Include the overrides and the framework styles with your custom document for compiling the framework:

custom.scss
@use "overrides";
@use "stylemods/scss/stylemods";

See using the framework for more information.

Source code (anchor)

The Place source file is included with the layout module files, you can view the source code from the latest release (v1.5.0) via the Github link below.

Source document
stylemods/scss/layout/place.scss
View on Github
https://github.com/pmbrown/StyleMods/blob/main/scss/layout/place.scss

Shared documentation about how to customize the default property values for the styles using the Sass and CSS variables is provided on the customizing page.