Skip to content

Vertically and Horizontally center anything relative to its container

License

Notifications You must be signed in to change notification settings

SPACED-MAN/scss--aligner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2e4a779 · Aug 25, 2022

History

3 Commits
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022

Repository files navigation

Aligner

SCSS Mixin that aligns anything relative to its container vertically, horizontally and more.

Usage

.parent {
	position: relative;
}
.child-1 {
	@include aligner; // Vertically and horizontally center this content inside of .parent
}
.child-2 {
	@include aligner("right", "bottom"); // Place this content in the bottom right corner of .parent
}

Donations

You might find that this saves you time and/or money. A donation of any amount would be very kind and will ensure this is actively maintained. Donations can be made here: https://www.paypal.com/donate/?hosted_button_id=9YRXRN6EJA2DN -- Thank you!

TO DO

  • Add 'Demo' section in README, complete with links to working examples (e.g. Codepen)
  • Add 'Getting Started' section, with npm/yarn install instructions
  • Provide better documentation
  • Support percentage and unit-based adjustments as alignment arguments

About

Vertically and Horizontally center anything relative to its container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages