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

jess

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jess

JavaScript Enhanced Style Sheets

  • 1.0.3-alpha.1
  • npm
  • Socket score

Version published
Weekly downloads
25
decreased by-80.31%
Maintainers
1
Weekly downloads
 
Created
Source

Note: This project is in alpha. Expect (and report) bugs!

Jess

JavaScript Evaluated Style Sheets, from the people who brought you Less.

Why Jess?

Jess looks / functions more like the languages you're used to — CSS and JavaScript — and integrates smoothly with both. Sass / Less are mini-programming languages, which have to manage things like variable scope. Jess is just JavaScript, and Jess variables and mixins are just JavaScript variables and functions, respectively. That means you can export Jess into JavaScript, and you can import JavaScript into Jess. (You can do a lot more than that, but that's the basic premise.)

P.S. Why is the logo a hawk?

A "jess" is defined as "a short leather strap that is fastened around each leg of a hawk".

Usage

yarn install jess
npm install jess

To compile a .jess file into CSS:

jess file.jess

Features

Variables

@let myWidth: 3px;

.box {
  width: $myWidth;
}

Import from JS

@import { constants } from './constants.js';

.box {
  width: $(constants.WIDTH + 10)px;
}

Import from Jess

@import { myWidth } from './stylesheet.jess';

.box {
  width: $myWidth;
}

Include other stylesheets

@import styles from './stylesheet.jess';
@include styles();

Mixins

@mixin square(size) {
  width: $size;
  height: $size;
}

.box {
  @include square(50px);
}

Exporting from Jess

In progress, requires the (unfinished) Rollup or Webpack plugin.

import styles, { square } from './styles.jess'
const css = styles()

export const myComponent = props => {
  return <div className={css.box} style={square(props.size).obj()}>Component</div>
}

Contributing

As this is a WIP, file issues with your ideas/concerns/wants!

FAQs

Package last updated on 24 Jan 2021

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