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

sassline

v2.1.2

Published

Set text on the web to a baseline grid with Sass & rems using a responsive modular-scale.

Downloads

15

Readme

Sassline

Set text on the web to a baseline grid with Sass & rems using a responsive modular-scale.

Do one thing well

Sassline has one aim and one aim only – to spread better typography across the responsive environment of the web.

The idea is to have easy to use and maintain SCSS partials utilising the power of Sass to make the complex calculations to set type on a baseline grid on the web, with a production ready CSS output. Using rems for the font-sizing and the spacing measurements gives a simple way to use the proportions of the baseline grid throughout the design. Sass mixins do all the heavy lifting so your job is easy.

OpenType features are enabled with font-feature-settings to give the most appropriate formatting of text and some flourishes in the headings if available in the web font and supported in the browser.

Sassline includes some basic layouts, and includes mixins to create a main column with optimal measure and a sidebar that doesn’t get too narrow.

Root font-size = ½ line-height

Sassline works by setting the root font-size as half the line-height of the standard paragraph text. The height of the baseline grid is then effectively set at 2rem, with increments at each 1rem. This makes it nice and easy to work proportionally from the baseline with integer rem values to create harmony in your layout and typography. This is based off a technique for setting text in print documents.

Documentation

Sassline is fully commented with details in the SCSS. Set the font sizes with the fontsize mixin, set the spacing using the baseline mixin or set both at once with the sassline mixin. Use rems for everything else. Full documentation is in the works.

Running / compiling

You can also use your preferred methods for compiling Sass as long as you have Sass 3.3.7+. To just include the necessary partials in your existing sass project, you only need to import sassline-base.scss.

If you want to run Sassline as a standalone project use the gulp setup included (or modify it to your needs).

  1. Clone the repo or grab the zip file
  2. Open a terminal window and cd into this directory
  3. Run npm install -g gulp (this may need sudo in front)
  4. Run npm install

Once that is done you can start the server with gulp and stop it with ctrl + c.

The pages will run at http://localhost:1234/

Sass file structure

My preferred method is to work along the lines of the SMACSS & BEM method. In the sass folder there there are two folders — sassline-base and modules. The base folder has the Sassline base SCSS partials. The modules folder contains some demo SCSS partials with styles you can keep or remove. All new partials should be added to the modules folder and referenced in style.scss to be compiled into your CSS.

More on information on using Sassline

Please see this blog post.

Responsive Nav

Viljami Salminen’s responsive-nav.js plugin is included to provide a mobile-ready navigation to work from.

Browsers

Sassline will set text to the baseline in recent versions of Chrome and Firefox, IE 11+ and Safari 8+.

Roadmap

  • Full documentation

========

License

Sassline is licensed under the MIT license. (http://opensource.org/licenses/MIT)