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

grilles

v1.0.6

Published

A Simple CSS Grid system

Downloads

37

Readme

Grille

Grille is a simple CSS Grid system for building flexible web applications. Grille is pure CSS doesn't involve any javascript. Grille can be used along with any javascript framework. This project is a fork of Raster with simpler semantic syntax and some additional features.

Note: This documentation is WIP

Install

This repository is distributed with npm and yarn. You can get this repo by

npm install grilles 

After installation, you can import grille.css in your main CSS file

@import "grilles/grille.css";

You can also get grille.css directly from cdn by using this link tag

<link rel="stylesheet" href="https://unpkg.com/[email protected]/grille.css">

Grid

Adding the grid class to an element makes them a grid container. By default, the grid container has 4 columns. The columns="<count>" attribute can be used to specify column count. At maximum 30 columns can be created.

For example, to make an 8 column grid, the following markup can be used.

<main class="grid" columns="8">
  ...
</main>

All the immediate children of the grid container act as the grid child. The following strategies can be used to position them.

Positioning Grid Child

  • span="row" spans across the entire row
  • span="3" starts from next column and spans across three columns
  • span="4-7" starts from 4th and spans till 7th column
  • span="2.." starts from 2nd and spans till the last column
  • span="2+3" starts from 2nd and spans next three columns

for example, the template for a simple blog may look like

<!-- Grid Container with 8 columns -->
<main class="grid" columns="8"> 
  
  <!-- header spans across the entire row -->
  <header span="row">...</header> 
  
  <!-- nav starts from 1st column and spans next two column -->
  <nav span="1+2">...</nav>

  <!-- article starts from next column and spans across next 4 column -->
  <article span="4">...</article> 

  <!-- aside starts from 7th column and spans till last column -->
  <aside span="7..">...</aside> 
  
  <!-- footer spans across the entire row -->
  <footer span="row">...</footer>
</main>

Fonts

Grille comes with a great set of fonts that are designed explicitly for user interfaces. They work well even in low-resolution displays. They are licensed under "SIL Open Font License" and served through Google font API.

Sans Font → Inter
Mono Font → JetBrains Mono, Roboto Mono

The fonts automatically get switched to their variable version if the browser supports them. Further, the custom font can be used by overriding the following properties.

  --sansFont: helvetica, sans-serif;
  --monoFont: courier, monospace;

The browser's default font size (usually it's 16px) is taken into account. Changing the default font size will cause the UI to be scaled accordingly, such that it will be accessible for the users. But for this to happen seamlessly, every UI element should be sized in relative units, based on font size like rem, em, ex.

Further, the font size can be customized by overriding unitless values for the following properties.

  --baseSansFontSize: 14;
  --baseMonoFontSize: 14;