npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nomensa/pfe-layouts

v1.0.5

Published

Layouts helper classes for PatternFly Elements

Downloads

16

Readme

PFElements Layouts

Usage

PFElements Layouts, like Bootstrap, is based on a 12 column grid with similar breakpoints available. We've just made the usage simpler.

Including pfe-layouts

To get started, included a link to pfe-layouts.css

<link rel="stylesheet" type="text/css" href="/path/to/pfe-layouts.min.css">

Grid

Since PFElements Layouts is not a Web Component, its classes can be applied to any element, giving you lots of control over where and how you utilize its layouts.

If you want a simple 3 column grid with gutters, use the following:

<div class="pfe-l-grid pfe-m-gutters pfe-m-all-4-col">
  <div>4 cols wide</div>
  <div>4 cols wide</div>
  <div>4 cols wide</div>
  <div>4 cols wide</div>
  <div>4 cols wide</div>
</div>

Grid Layout Classes & Modifiers

Parent Grid Element classes:

| Class | Description | | -------------- | ----------- | | pfe-l-grid | Base grid class required | | pfe-l-grid-fill-height | Allows children elements to fill their container's height completely; equivalent of flex-grow | | pfe-m-gutters | Adds gutters based on --pfe-theme--container-spacer | | pfe-m-all-*[1-12]*-col | Sets width of children in grid to [1-12] columns | | pfe-m-all-*[1-12]*-col-on-[xs-xl] | Sets width of children to [1-12] columns on specified breakpoint [xs-xl] |

Child Grid Element Classes:

| Class | Description | | -------------- | ----------- | | pfe-l-grid__item | Base grid item class optional | | pfe-m-*[1-12]*-col | Sets width of this child to [1-12] columns | | pfe-m-*[1-12]*-col-on-[xs-xl] | Sets width of this child to [1-12] columns on specified breakpoint [xs-xl] | | pfe-m-startat-*[1-12]*-col | Start/indent this child to column #[1-12] | | pfe-m-startat-*[1-12]*-col-on-[xs-xl] | Start/indent this child to column #[1-12] on specified breakpoint [xs-xl] |

Example:

<div class="pfe-l-grid pfe-m-gutters pfe-m-all-4-col">
  <div class="pfe-m-8-col">8 cols wide</div>
  <div>4 cols wide</div>
  <div class="pfe-m-startat-9-col">4 cols, indented</div>
  <div class="pfe-m-8-col">8 cols wide</div>
  <div>4 cols wide</div>
</div>

Breakpoints

// Small devices
@media (min-width: 576px) { ... }

// Medium devices
@media (min-width: 768px) { ... }

// Large devices
@media (min-width: 992px) { ... }

// Extra large devices
@media (min-width: 1200px) { ... }

Bullseye

Use a bullseye layout when there is a single child element, and that child is centered both vertically and horizontally in the parent.

| Class | Description | | -------------- | ----------- | | pfe-l-bullseye | Centers child element vertically & horizontally |

Exampe:

<div class="pfe-l-bullseye">
  <div>Perfectly centered child</div>
</div>

Text Alignment

Text alignment helper classes can also be applied to any block-level element.

| Class | Description | | -------------- | ----------- | | pfe-l--text-align--left | Align text to left | | pfe-l--text-align--center | Align text to center | | pfe-l--text-align--right | Align text to right |

Developers

Test

npm run test

Build

npm run build

Demo

From the PFElements root directory, run:

npm start

Code style

Card (and all PFElements) use Prettier to auto-format JS and JSON. The style rules get applied when you commit a change. If you choose to, you can integrate your editor with Prettier to have the style rules applied on every save.