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

@master/css

Package Overview
Dependencies
Maintainers
2
Versions
430
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@master/css

A Virtual CSS language with enhanced syntax. ( ~13KB )

  • 1.35.12
  • Source
  • npm
  • Socket score

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



logo

CSS

A Virtual CSS language with enhanced syntax. ~13KB

MIT License Latest Release Bundle Size Package Size Documentation Github Discord CI

image

On this page

Core Concept

This is your current/traditional code:

<style>
    .home-section {
        background-color: blue;
        padding: 2rem;
        text-align: center;
    }

    .home-section:hover {
        background-color: red;
    }

    @media (min-width: 1024px) {
        .home-section {
            padding: 3rem;
        }
    }
</style>

<section class="home-section">...</section>

Now, writing CSS in a whole new language makes UI development easier. ↓ 86% code

<section class="bg:blue bg:red:hover p:32 p:48@md text:center">...</section>

Quick Start

This is just a quick start guide, the official documentation here.

1. Download

npm install @master/css

Or use a CDN

<script src="https://cdn.jsdelivr.net/npm/@master/css"></script>

2. Import

import '@master/css'

Hello World

<h1 class="font:40 font:heavy bg:blue:hover m:50 text:center@md">
    Hello World
</h1>

Next, learn the structured Syntax - Master CSS!

Original Design

  • Master CSS Syntax - As a whole new language, Master created our own unique syntax.
  • Class Highlight - Master is the first language to highlight class names in markup.
  • Hybrid Rendering - Apply both JIT and AOT to CSS compilation. Similar to Hydration technology.
  • Group Styles - The one of groundbreaking features that allows you to extract the same selectors and media query styles and make it short. Inspired by SerKo.
  • Reactive Styles - The one of groundbreaking features that allows you style an element based on parent/sibling state.
  • Arbitrary selectors and media queries - Apply arbitrary selectors and media queries directly in class="", which is the most powerful and comprehensive language on the market.

Inspiration

Some of our core concepts and designs are inspired by these giants.

  • Language - Master is a language, but it was originally inspired by ACSS's concept of atomic classes.
  • Virtual CSS - Difference algorithms, virtual models, etc. are inspired by Virtual DOM.

Keywords

FAQs

Package last updated on 16 Aug 2022

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