Coder Social home page Coder Social logo

ctr's Introduction

ctr /// The CSS Framework

npm npm wercker status David

Description

There are many words/examples you can read in the documentation that detail what, why, and how, but I’ll give a brief overview. ctr is a CSS framework built with JavaScript to provide object oriented functionality to allow for a rich hierarchy of inherited CSS components to better facilitate a CSS architecture similar to OOCSS. Albeit ctr and OOCSS differ vastly in application and you construct your CSS in ctr using true objects which allows for ctr to be constructed in YAML, JavaScript, and Less. Although ctr shares the same goal of OOCSS - encouraging code reuse as well as maintainable CSS styles.

The object oriented architecture of ctr also allows for a rich hierarchy of inherited CSS components so that it’s not required to list each class in your HTML every single time. A functionality that is encompassed through the class feature of ctr. An idea presented by Philip Walton and his article The Future of OOCSS: A Proposal. However, to accomplish this, there has to be a supporting framework, and that is what ctr and all its various features provide.

My favorite feature of ctr is its ability to abstract away the tedium and pain-points from creating complex CSS logic for pseudo-classes such as hover, focus, and active. All you need to do is list the CSS properties and values in the state object, and ctr automatically configures the proper pseudo-class and the corresponding negation CSS pseudo-class (:not()). It also configures the transition-property, transition-duration, transition-delay, and transition-timing-function for all CSS properties. Furthermore, ctr provides similar abstractions for animation, elements such as before and after, as well as media queries, and much much more.

Finally, ctr comes pre-packed with some of the best CSS libraries such as:

Status

As I've outlined over at ctr-lang.com and in the documentation, the code base is extended way past its means. That being said, the hope is that I'll be able to secure funding to embark on a rewrite from the ground up. At the same time, things are pretty solid, so it goes without saying I believe and hope it will be nothing but smooth sailing for you as well.

Bugs & Contributions

I'm on the fence as to how I want to handle bug and contributions, but I'll lay down my current thoughts. I initially had hoped to raise funding for a rewrite but that obviously was wishful thinking, although, not all is lost because the code base is workable up to a point. I'll gladly spend the time fixing bugs if they warrant the time. However, if it's a complex edge case I doubt I will spend the time. So if you think it warrants my time and yours by all accounts, please pull an issue.

Structure

For the time being, all ctr assets reside under this repository, that is the, Stylus plugin, Less plugin, YAML API, and the JavaScript API. Hopefully, the rewrite will materialize, and if that's the case, I'll separate assets out to create a much cleaner structure.

  • /lib -> Allz the magic
    • ctr-stylus.js -> Stylus Plugin Logic
    • ctr-less.js -> Less Plugin Logic
    • ctr-js.js -> Js API class constructor
    • /ctr-js-nodes -> All Js methods for the ctr-js.js class
    • /ctr-js-nodes -> The actual logic behind ctr
  • /dist
    • ctr.styl -> The most important file, which is both embarrassing and impressive in its own right. This Stylus file contains two Stylus Functions that act as a janky templating solution to provide the proper syntactical structure. Along the lines of mustache but for CSS. Removing this file; thus the Stylus dependency is one of the main reasons for the rewrite.
  • __tests__ -> Allz the test, and it has it's own README.md

Best, te

ctr's People

Contributors

artisin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

10xcss

ctr's Issues

This would be one of last "frameworks" I would like to use

  • You are basically using the same css syntax and adding a lot of clutter to it.
  • There is no solution proposed to most of the real world problems on css, just a "new" way to type css
  • I don't see the value of paying for it

Can you please explain Why is this a good idea? and What is the purpose of this thing?

remove v6.x.x + 8.x.x wercker test

For some reason commitizen ref is not found on v6.x.x: error Command "--ctr:commitizen_path=node_modules/cz-customizable-te" not found.

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.