GithubHelp home page GithubHelp logo

anthonybrown / include-media Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eduardoboucas/include-media

0.0 2.0 0.0 3.64 MB

๐Ÿ“ Simple, elegant and maintainable media queries in Sass

Home Page: http://include-media.com

License: MIT License

JavaScript 15.35% CSS 84.65%

include-media's Introduction

'At' sign

include-media Build Status

Simple, elegant and maintainable media queries in Sass

NPM badge

What?

include-media is a Sass library for writing CSS media queries in an easy and maintainable way, using a natural and simplistic syntax.

Why?

I spent quite some time experimenting with different libraries and mixins available out there, but eventually all of them failed to do everything I needed in an elegant way. Some of them wouldn't let me mix set breakpoints with case-specific values, others wouldn't properly handle the CSS OR operator and most of them had a syntax that I found complicated and unnatural.

include-media was the result of that experience and it includes all the features I wish I had found before, whilst maintaining a simplistic and natural syntax.

How to install

  • With npm: npm install include-media
  • With yarn: yarn add include-media
  • With Bower: bower install include-media
  • With Rails: gem 'include_media_rails' (maintained by KaoruDev)
  • Manually: get this file

Finally, include the file in your project using an @import statement.

How to use

Examples can be found here.

Plugins

  • include-media-export - Reference include-media breakpoints in JavaScript.
  • include-media-columns - Generate column classes using the BEMIT naming convention, automatically referencing include-media breakpoints.
  • include-media-spread - Calculates the difference between property values and distributes them through your include-media breakpoints.
  • flex_e_ble - Uses your include-media breakpoints to create your own flexible class naming structure on top of a flex based grid with inline-block fallback for IE8+ compatibility.
  • include-media-grid - An include-media plugin for generating grid classes based on the flex display.
  • im-to-em - A tiny function to convert include-media breakpoints from px to em.
  • include-media-hidden-classes - An include-media plugin to generate classes for hiding elements.

Learn more

Related projects

  • include-media-or - A fork of include-media with support for complex queries with logical disjunctions (maintained by Nirazul).

The authors

We are Eduardo Bouรงas and Hugo Giraudel.

We want to hear from you

We'll be on the lookout for your issues and pull requests โ€” but make sure you read this before submitting any code!

License

This project is licensed under the terms of the MIT license.

include-media's People

Contributors

eduardoboucas avatar kittygiraudel avatar jackmcpickle avatar nathanjessen avatar prisis avatar hinok avatar kaorudev avatar tszarzynski avatar

Watchers

James Cloos avatar Tony Brown avatar

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.