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

protozaur

v1.1.0

Published

Protozaur is semantic, mnemonic, declarative CSS framework, created to avoid wasting time and increase productivity

Downloads

8

Readme

Protozaur is semantic, mnemonic, declarative CSS framework, created to avoid wasting time and increase productivity

Why?

  1. Rapid prototyping
  2. Dramatically Reduce the amount and size of CSS/BEM style modificators in CSS files
  3. Declarative approach to add context-dependent style properties to existed CSS classes or BEM blocks

Protozaur's cheat sheet

  <td style="text-align:left">
    <b>CSS style</b>
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ma
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    margin: auto
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Margin</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    m0 ... m100 &mdash; <em>(step 5)</em>
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    margin: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ml0 ... ml100
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    margin-left: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    mr0 ... mr100
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    margin-right: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    mt0 ... mt100
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    margin-top: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    mb0 ... mb100
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    margin-bottom: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Padding</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    p0 ... p100
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    padding: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    pl0 ... pl100
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    padding-left: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    pr0 ... pr100
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    padding-right: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    pt0 ... pt100
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    padding-top: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    pb0 ... pb100
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    padding-bottom: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Width</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    w10 ... w1200
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    width: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    w5p ... w100p
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    width: <b>X</b>% !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Display</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    inline
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    display: inline !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    block
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    display: block !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    iblock
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    display: inline-block !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Table</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ptz--table
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    display: table
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ptz--row, ptz--tr
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    display: table-row
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ptz--cell, ptz--th, ptz--td
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    display: table-cell; vertical-align: top
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    vat
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    vertical-align: top !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    vam
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    vertical-align: middle !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    vab
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    vertical-align: bottom !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Position</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    posrel
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    position: relative !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    posabs
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    position: absolute !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Common style</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    fs0, fs10 ... fs30 &mdash; <em>(step 1)</em>
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-size: <b>X</b>px !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    lh100 ... lh200
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    line-height: <b>X</b>% !important;
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    tac
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    text-align: center !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    tar
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    text-align: right !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    tal
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    text-align: left !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    taj
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    text-align: justify !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    b
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-weight: bold !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    i
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-style: italic !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    n
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-style: normal !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    u
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    text-decoration: underline !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    fwn
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-weight: normal !important
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    upcase
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    text-transform: uppercase
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    downcase
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    text-transform: lowercase
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ffa
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-family: Arial
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    fft
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-family: Tahoma
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ffv
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-family: Verdana
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ffg
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-family: Georgia
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ffm
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-family: Monospace
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    fftnr
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    font-family: Times New Roman
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    br-off
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    white-space: nowrap
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    br-on
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    white-space: normal
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ls0
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    letter-spacing: 0
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    lsn
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    letter-spacing: normal
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Buttons</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ptz--btn
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    button style
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ptz--size-10 ... ptz--size-25
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    button's size. 10px ... 25px
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Inputs</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ptz--input, ptz--textarea
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    Input style
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ptz--size-10 ... ptz--size-25
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    inputs's size. 10px ... 25px
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'><b>Floating</b></td>
  <td width="400px" valign="top" style='vertical-align:top'>&nbsp;</td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    clearfix
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    no comments
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    pull-left
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    float: left
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    pull-right
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    float: right
  </td>
</tr>

<tr>
  <td width="400px" valign="top" style='vertical-align:top'>
    ofh
  </td>
  <td width="400px" valign="top" style='vertical-align:top'>
    overflow: hidden !important
  </td>
</tr>

How Protozaur works?

<html>
  <head>...</head>
  <body class='ptz--reset'>...</body>
</html>

or

<html>
  <head>...</head>
  <body>

    ...

    <div class='ptz--reset'> ... </div>

    ...

  </body>
</html>

Example 1

<h1 class='fs18 lh130 mt20 mb20'>
  Hello World!
</h1>

Will add to your H1 following css properties:

font-size: 18px;
line-height: 130%;
margin-top: 20px;
margin-bottom: 20px;

Example 2

<a href='http://github.com' class='ptz--btn ptz--size-16'>Button to Github</a>

Will show button based on font-size: 16px;

Example 3


<form action='/action.php'>
  <div class='m20'>

    <div class='mb20'>
      <input name='login' type='text' class='ptz--input ptz--size-16 w300'>
    </div>

    <div class='mb20'>
      <input name='email' type='text' class='ptz--input ptz--size-16 w300'>
    </div>

    <div class='clearfix'>
      <div class='pull-right'>
        <input type='submit' class='ptz--submit ptz--size-16'>
      </div>
    </div>

  </div>
</form>

Protozaur's concept

All CSS properties can be split in 2 groups:

  1. decorative properties (background, color, border etc.)
  2. context-dependent properties (margin, padding, font-size etc.)

Protozaur say:

  • It is pointless to write the most part of context-dependent properties in CSS files. It's reason to create tons of additional css declarations for context-dependent modificators

Protozaur advice:

  • We can create some set of global simple CSS modificators. We can use it for context-dependent customization of existed CSS styles or BEM blocks

Protozaur components

  1. reset.css — just the reset file
  2. framework.css — the heart of framework
  3. base.css — some most common css definitions

also will be better to include inputs-buttons componetns:

  1. inputs-buttons/base.css — for using styles for inputs and buttons
  2. inputs-buttons/sizes.css — for set sizes to buttons and inputs

Features

Protozaur:

  1. based on box-sizing: border-box property
  2. based on px and %

Protozaur [vs] or [with] Bootstrap / Foundation / Any CSS framework

Protozaur it's not a competitor to your CSS framework. Protozaur is assistant. It helps to reduce size of your CSS files and makes your HTML much easer to read and understand.

Fell free to use Protozaur (or it's idea) with any CSS framework.

Customization

As you see Protozaur based on very simple idea and implemented with really simple code.

If you need something special you can copy/paste a part of Protozaur's code and modify it.

Installation

Direct download

Download Protozaur.css

Ruby on Rails

Gemfile

gem 'protozaur'
bundle

app/assets/stylesheets/applicaition.css

/*
  #= require ptz/reset
  #= require ptz/base
  #= require ptz/framework

  #= require ptz/inputs-buttons/base
  #= require ptz/inputs-buttons/sizes
*/

Bower

bower install protozaur

in HTML

<link rel="stylesheet" type="text/css" href="./bower_components/ptz/protozaur.min.css">

NPM

npm install protozaur

you can use following path

node_modules/protozaur/ptz/protozaur.min.css

The MIT License (MIT)

See LICENSE.txt