The Wayback Machine - https://web.archive.org/web/20230804015928/https://github.com/ItsJonQ/hstack-vstack-css
Skip to content

ItsJonQ/hstack-vstack-css

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

🗄 HStack and VStack in CSS

CSS layout components that (basically) horizontally and vertically stack anything.

Usage

✌️ Check out the code here.

Horizontally Stacking

The .spacer is used in the (below) example to push the items apart.

<div class="flex hstack">
	<div>🌭</div>
	<div>🍕</div>
	<div class="spacer"></div>
	<div>🍟</div>
</div>

Vertically Stacking

<div class="flex vstack">
	<div>🌭</div>
	<div>🍕</div>
	<div>🍟</div>
</div>

Swapping from VStack to HStack (responsively)

The example below stacks items vertically on mobile. However, the items stack horizontally at the medium breakpoint for tablets.

<div class="flex vstack hstack@md">
	<div>🌭</div>
	<div>🍕</div>
	<div>🍟</div>
</div>

About

CSS layout components that (basically) horizontally and vertically stack anything.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published