New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cepheus

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cepheus

functional css

  • 1.0.1-master.945e111
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-60%
Maintainers
2
Weekly downloads
 
Created
Source

cepheus

build status Greenkeeper badge license

Work in progress

Cepheus — functional CSS utility class generator

Overview

We had a problem. We found ourselves writing the same piece of CSS over and over. Handwriting it is very time-consuming, repetitive and results in lots of duplication. “Zombie code” is plenty and nobody risks removing it. This, in turn, results in much more CSS shipped than you really need.

The idea of functional CSS deals with all of these issues. It ensures that the UI is totally predictable and free of side-effects. Functional CSS ensures consistency: it’s easy to compose consistent spacing and typography rules which give your layout beautiful horizontal and vertical rhythm. Each class has a very limited responsibility, hence the risk of mutation — changing a property somewhere and breaking code elsewhere — is eliminated. After reading the class names applied to an element, it becomes immediately obvious what it looks like. UI is updated in only one place — single utility classes. Thanks to this, development time is reduced significantly which makes it very useful for rapid prototyping. Maintenance becomes much easier.

Cepheus is inspired by these ideas. It utilizes modules from tachyons.io. The type-scale module is modified. Modules providing default baseline rhythm and flexible debug options are added. These 53 modules adhere to the principles of atomic, functional design. Every module is self-contained and responsible for its own little, encapsulated functionality. They cover the whole CSS spectrum — typography to spacing, theming to elements. Built mobile-first to ensure it works with all devices — big, small and in-between, Cepheus is lightweight and contains minimal code. It can be used to create modular, reusable UI components, providing the base building blocks. A wide range of Sass variables gives it flexibility and loose coupling. An important thing to note is that users are able to add custom values whenever they need it. Cepheus is built with independent modules, which means you can import only the parts you’re going to use, decreasing import size. The built-in debug grid helps you catch and solve spacing and layout issues.

Usage Example

Applying these principles, we construct a simple button using Cepheus utility classes

<div class="w4 h2 br4 bg-light-red flex justify-center items-center">
  <div class="white-90">Button</div>
</div>
  • w4 — width: 8rem
  • h3 — height: 3rem
  • br4 — border-radius, 1rem
  • bg-light-red — background-color, #ff725c
  • flex — display: flex
  • justify-center — justify-content: center
  • iterms-center — align-items: center
  • white-90 — color: rgba(255, 255, 255, 0.9)

Button created with Cepheus

Installation Instructions

cepheus-cli

Configuration

partial imports options, debug=true : debug=false

FAQs

Package last updated on 29 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc