Giter VIP home page Giter VIP logo

chameleon's People

Contributors

alex-handley avatar callumacrae avatar djgrant avatar lmn-machine-user avatar mrcthms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chameleon's Issues

Generate mixins for each placeholder class

The code

@include placeholders('myHelper') {
  color: red;
}

for example, generates a placeholder %myHelper.

It should also generate a mixin with the same name.

This allows developers to include style rules directly to a selector rather than just being able to select them.

Allow custom @content to be passed into classes mixin

Allow the custom @content to be passed into the classes mixin:

@include classes('my-selector', $on: 'tablet') {
  padding: 20px;
}

If a placeholder exists with the same selector name, both the styles of @content and %placeholder will be used.

(It's not possible to test if @content is passed so whether it's ideal or not this is the behaviour we're getting).

Progressive enhancement

It seems daft that developers can create many versions of class for different breakpoints but it is not possible to do the same for JS/non-JS states.

Propose adding the ability to generate conditional "if" classes.

@include classes('hidden', $on: ('base', 'mobile', 'no-js', 'js'));
// generates
.hidden {}
.no-js .hidden-if-no-js {}
.js .hidden-if-js {}
@media [mobile media expression] {
  .hidden-on-mobile {}
}

If classes encounters a string not in the breakpoint config it generates a conditional "if" class for the value of that string.

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.