Git Product home page Git Product logo

elodin's People

Contributors

canrau avatar dependabot[bot] avatar robinweser 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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

canrau coachuhar

elodin's Issues

Plugin: Color

A plugin that covers everything concerning colors. Especially a uniform output format.

Error Messages

In order to provide useful help to the user, we need to have proper error messages for every possible error thrown.

ReasonML Generator

In order to use Elodin with ReasonML, we need to have a proper ReasonML generator with types and everything.
For now we might just render to bs-css.

Support all CSS pseudo classes / elements

Right now, only a subset of all pseudo classes / elements are allowed.
In order to fully support all use cases, we want to expand to all.

This applies to both @elodin/generator-css-in-js and @elodin/generator-reason.

ConditionalDeclaration Abilities

We want to validate the comparison and add more abilities to it as well.
Especially dynamic conditions might be interesting.

view Box {
  [$withPadding] {
    paddingLeft: 10
    paddingRight: 10
  }
}

Plugin: Resolve shorthand/longhand properties

We should have a deterministic way of resolving shorthand/longhand properties.

The simplest idea would be: Longhands > Shorthands

As we only have a couple of shorthands and they're all just 1-level shorthands this would be fine.

Dynamic Value Validation

We need a way to enable hard value validation even for dynamic values.
This can be achieved in two different ways:

  • generating typings (TypeScript)
  • adding runtime validation (devMode only?)

Built-in functions

To reduce complexity of style definitions and passed dynamic values, we might want to introduce some logical functions.

if

if($variable trueValue falseValue)

This function accepts a dynamic boolean value and returns different values whether its true or false. It can also be nested.

view Box {
  paddingLeft: if($withPadding 10 0)
  paddingRight: if($withPadding 10 0)
}

fallback

fallback($variable fallbackValue)

This function is similar to if but rather than having a boolean variable with 2 hard-coded options it acts as an fallback value if the variable is not defined.

view Box {
  color: fallback($color red)
}

Deterministic Variant Order

In order to correctly generate variant maps, we need to make sure that class names with variants are applied in a deterministic order.

We should always apply variants in the order they're defined.

Theming

We need a way to distinguish dynamic values from theme values in order to support static extraction with theme values.
We can achieve that leveraging:

  • CSS Values
  • Passing a theme during compilation
  • Having a naming convention

Shorthand Properties

In order to support shorthand properties, we need a deterministic way to resolve them.
Maybe we should look at how React Native does it.

We could also have a plugin that expands shorthand properties in a deterministic way.

Note: Shorthand properties are only possible with single values e.g. padding: 10 due to the enforced limitation in Elodin. Once the value changes for different longhand values, so have to be used instead.

Documentation

We need to document several things:

  • Language Syntax / Features
  • Generators
  • Setup
  • Properties
  • Types
  • Plugins

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.