Giter Club home page Giter Club logo

Active CSS Logo

A CSS / JavaScript hybrid language.

What if CSS could not only do :hover, but also all the DOM events like :click, :mouseover, etc.?

Quick to code, low maintenance event handling, dynamic CSS, easy DOM manipulation and lots more.

The language is in continual development, but work now tends to stay offline until in a stable condition to be put on the latest branch. Then it gets tested on a wider scale until it seems stable enough for release. It's cross-browser, so will work on all modern browsers back to ES6.

Please, if you see a bug, do report it so it gets fixed. All bugs are fixed as rapidly as possible.

ACSS is all about manual coding and taking back control of UI with a method that is scalable for complex websites. It has a near instant load-time, due to minimal JavaScript compilation in the browser itself.

This is event-driven programming, so like any programming language use a good comment structure to label your code.

Here's are a couple of tasters:

/***************
 * When the day theme button is clicked, add a "day" property to the "data-theme"
   attribute on the body tag that can be used to set the CSS for the whole page.
**/
#dayTheme:click {
    body {
        set-attribute: data-theme "day";
    }
}
/***************
 * Expand or contract a card when it is clicked.
**/
.card:click {
    toggle-class: .expand;
}

Example of a privately scoped component:

button:click {
    render-after-end: "<hello-world></hello-world>";
}

@component hello-world private {
    html {
        <p>Hello world</p>
    }
    p:click {
        alert: "Why are you clicking me, you crazy!";
    }
}

Ultra-fast. No pre-processing. No virtual DOM. Runs in real-time in the browser.
All DOM events are supported, plus CSS commands up to level 4 (if browser supported).
Works on chromium browsers (Chrome, Edge, Opera, etc.) and Firefox. (ES6+)

See the docs

Installation

The Active CSS installation instructions are on the website.

If you are looking for the core script to download, check out the dist folder and then find the version(s) you need.

The production (live) version will look like this:
activecss-2-15-0.min.js

The development (offline) version will look like this:
activecss-dev-2-15-0.min.js

There are also npm versions - links on the website.

Documentation

You can find comprehensive documentation on the website.

Examples

There are loads of examples on the concept examples page.

Want to see it work? Go to the website.

License

Active CSS has a permissive license for web developers, but strict clauses if you want to profit from it or use its ideas. license.

Copyright (c) 2023, River Zend Dynamics Ltd.

Active CSS's Projects

active-css icon active-css

The epic event-driven browser language for UI with functionality in one-liner CSS. Over 100 incredible CSS commands for DOM manipulation, ajax, reactive variables, single-page application routing, and lots more. Could CSS be the JavaScript framework of the future?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.