comster / Bootstrap-prefixed-Less

Add the same browser prefixes to your CSS with Less instead of the Autoprefixer (since Bootstrap 3.2.0)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bootstrap Less vendor prefixes

Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by Mark Otto and Jacob Thornton, and maintained by the core team with the massive support and involvement of the community. Bootstrap is used for JBST. JBST is a powerful theme framework that can be used as a standalone website builder or as a framework to create child themes for WordPress build on Twitter's Bootstrap 3. Full customizable with LESS.

From version 3.2.0 and futher Bootstrap drops vendor prefixes (and vendor mixins) from the Less code (deprecated with backward compatibillty support) and add the Autoprefixer to their Grunt build system. Autoprefixing and only using normal CSS according to the latest W3C specs seems a good idea. Autoprefixer make it really easy to add or remove support for browsers and the Less code will become as clean as possible.

JBST has a built-in Less compiler based on less.php. The JBST WordPress theme runs on PHP. Currently there is no native PHP version of the autoprefixer. To solve this problem you can use the Less code from this repository to compile Bootstrap's CSS. The final CSS should be equal to that compiled from the original source and autoprefixed with Bootstrap's default browser support. ( browsers: ['last 2 versions', 'ie 8', 'ie 9', 'android 2.3', 'android 4', 'opera 12']). Vendor prefixes are add by Less. See also: backward-compatibility prefixing (and try to understand the gradient mixins)

How it Works

Normal CSS properties which should be prefixed for browser support are replaced with a mixin call. Called mixins are available in mixins/vendor-prefixes.less. These mixins add the required vendor prefixes by Less. mixins/vendor-prefixes.less has been extend with some mixins which are not available in Bootstrap's Less code. Currently the gradient mixins are replaced with that from remove vendor prefixes from gradient mixins Notice using these kind of mixins is deprecated by Bootstrap but usefull for everyone who want to compile Bootstrap latest Less code and can't install 'npm' and / or Grunt.

About

Add the same browser prefixes to your CSS with Less instead of the Autoprefixer (since Bootstrap 3.2.0)


Languages

Language:CSS 100.0%