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

@cryptohub/coco

v2.1.2

Published

Modern CSS framework based on Flexbox

Downloads

12

Readme

COCO

COCO is an open source CSS framework based on Flexbox without any piece of ~~JavaScript~~.

100% Responsive 💻 | Modular 🗂 | Modern 💈 | Free ⚗️ --- | --- | --- | --- Designed for multi device support | Import what you need | Built with flexbox | Open Source

CDN

Latest version

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/cryptohub-digital/coco/dist/css/coco.min.css" />

Minor updates and patch fixes within a major version

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/cryptohub-digital/coco@2/dist/css/coco.min.css" />

Patch fixes within a minor version

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/cryptohub-digital/[email protected]/dist/css/coco.min.css" />

Using SRI with the exact version

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/cryptohub-digital/[email protected]/dist/css/coco.min.css" integrity="sha384-{hash}" crossorigin="anonymous" />

Please, replace {hash} with hash generated for chosen specific version. You can use for example this SRI Hash Generator.

Install

NPM

npm i @cryptohub/coco

or

npm install "https://github.com/cryptohub-digital/coco.git#semver:^2.0" --save

Yarn

yarn add @cryptohub/coco

or

yarn add "https://github.com/cryptohub-digital/coco.git#semver:^2.0"

Bower

bower install cryptohub-digital/coco

Import

After installation, you can import the CSS file into your project using this snippet:

CSS version

@import '@cryptohub/coco/dist/css/coco.css'

Minified CSS version

@import '@cryptohub/coco/dist/css/coco.min.css'

SASS version

@import '@cryptohub/coco/dist/sass/coco.sass'

If you want to use a right-to-left version, just append -rtl after the name.

Customize distribution

COCO is a CSS framework. Output is a single CSS file coco.css or SASS distribution.

You can either use that file, "out of the box", or download the Sass source files to customize the variables.

// Import a Google Font
@import url('https://fonts.googleapis.com/css?family=Nunito:400,700')

// Set your brand colors
$purple: #8A4D76
$pink: #FA7C91
$brown: #757763
$beige-light: #D0D1CD
$beige-lighter: #EFF0EB

// Update COCO's global variables
$family-sans-serif: "Nunito", sans-serif
$grey-dark: $brown
$grey-light: $beige-light
$primary: $purple
$link: $pink

// Update some of COCO's component variables
$control-border-width: 2px
$input-background-color: $beige-lighter
$input-border-color: transparent
$input-shadow: none

// Import the rest of COCO
@import "coco/sass/coco.sass"

Get started

The simplest grid system

Just add columns, they will resize themselves

<div class="columns">
  <div class="column">1</div>
  <div class="column">2</div>
  <div class="column">3</div>
  <div class="column">4</div>
  <div class="column">5</div>
</div>

Features

Sticky footer

Sticky footer with one class

<body class="has-sticky-footer">
  <header></header>
  <main></main>
  <footer></footer>
</body>

Tabs

Tabs without the JavaScript

<div class="tabs">
  <ul>
    <li><a href="#tab-1">Tab 1</a></li>
    <li><a href="#tab-2">Tab 2</a></li>
    <li><a href="#tab-3">Tab 3</a></li>
  </ul>
</div>
<section class="tab-content">
  <article id="tab-2">Content of second tab</article>
  <article id="tab-3">Content of third tab</article>
  <!-- Default tab -->
  <article id="tab-1">Content of first tab</article>
</section>

Hamburger menu

Hamburger menu without the JavaScript

  1. Add <input type="checkbox" id="coco-navbar-toggle" aria-hidden="true" /> into the .navbar
  2. Change link to label: <label for="coco-navbar-toggle" role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbarMenu">...</label>
  3. Optional: Your menu id should be the same as defined in label[data-target] for compatibility with JavaScript
  4. Test the hamburger menu

em.oji

You can use Emoji as icons with effects on it

<em class="oji flat">📥</em>

Custom theme

You can create your theme and add your variables into: style/utilities/themes.sass

To set the theme, please add into HTML tag data-theme="theme".

Natively we are supporting the light/dark theme.

Theme switch

If you would like the switch between dark/light theme, you can put it in nav pane.

To implement, start with:

  1. Add input directly after the body tag: <input type="checkbox" id="coco-theme-switch" />
  2. Add label into path input#coco-theme-switch[type=checkbox] ~ header > nav > .navbar-menu > div > div > label[for=coco-theme-switch], with the following content:
<label for="coco-theme-switch">
  <div class="sun"></div>
</label>

Note: Theme switch is dependent on :has().

Current version

You can call the current version with the following code:

<span class="coco version">version </span>

Browser Support

COCO uses autoprefixer to make (most) Flexbox features compatible with earlier browser versions. According to Can I use, COCO is compatible with recent versions of:

  • Chrome
  • Edge
  • Firefox
  • Opera
  • Safari

Internet Explorer (10+) is only partially supported.

Documentation

Browse the online documentation on the Online manual.

Informational notice

Why are we putting underscore in front of the file and when to do so?

A Sass file starting with an underscore is partial. Files with _ (underscore) are ignored by the compiler.

Copyright and license

Code copyright 2018 Crypto ▪ Hub®; Jeremy Thomas. Code released under the CORE license.