autoprefixer-rails-8.6.5/0000755000175000017500000000000013414333620014402 5ustar pravipraviautoprefixer-rails-8.6.5/sprockets4.gemfile0000644000175000017500000000026413414333620020037 0ustar pravipravisource 'https://rubygems.org' gemspec gem 'execjs' gem 'rails', '>= 5.0.0.beta2' gem 'sprockets', '>= 4.0.0.beta1' eval_gemfile "#{ File.dirname(__FILE__) }/shared.gemfile" autoprefixer-rails-8.6.5/CHANGELOG.md0000644000175000017500000006705113414333620016224 0ustar pravipravi# Change Log ## 8.6.5 * Do not show Grid warnings if IE was not selected. ## 8.6.4 * Fix `stretch` prefix in Chrome >= 46. ## 8.6.3 * Add warnings for unsupported Grid features. * Add warnings about wrong Grid properties. * Add note about `grid` option for grid properties in `rake autoprefixer`. ## 8.6.2 * Fix error during adding Grid prefixes in `@media` (by Evgeny Petukhov). ## 8.6.1 * Fix `grid-template` with media queries (by Evgeny Petukhov). ## 8.6 “Follow Reason” * Add `gap` support (by Evgeny Petukhov). * Add two values support for `grid-gap` and `gap` (by Evgeny Petukhov). ## 8.5.2 * Fix `grid-template` support wit auto row sizes (by Yury Timofeev). ## 8.5.1 * Remove unnecessary warning on `-webkit-fill-available`. ## 8.5 “Muito Nobre e Sempre Leal” * Add `grid-gap` support (by Evgeny Petukhov). * Fix radial gradients direction fix. ## 8.4.1 * Fix non-related to Ruby issue. ## 8.4 “Non in aves, sed in angues” * Add `/* autoprefixer: ignore next */` control comment (by Pavel Vostrikov). ## 8.3.0.1 * Remove Opera Mobile 12.1 from default browsers. * Update Can I Use data. ## 8.3 “Benigno Numine” * Add `@media` support to `grid-template` (by Evgeny Petukhov). * Fix `radial-gradient` direction warning (by Gustavo Real). ## 8.2 “Ad Astra per Aspera” * Add `color-adjust` (by Sergey Lysenko, Stanislav Botev, and Yuriy Alekseyev). ## 8.1.0.1 * Add more clear error on missed browser version. ## 8.1 “Rex, Familia et Ultio” * Add `overscroll-behavior` support. * Add `grid-template` shortcut support (by Evgeny Petukhov). * Add better `grid-column-end` and `grid-row-end` support (by Evgeny Petukhov). * Fix Grid properties support in `@supports`. ## 8.0 “Excelsior” * Use Browserslist 3.0. * Remove `break-*` to `page-break-*` conversion for Firefox. ## 7.2.6 * Fix `-ms-` prefix for grid cells with same `grid-area` (by Evgeny Petukhov). ## 7.2.5 * Fix multiple prefixes in declaration value. ## 7.2.4 * Update Can I Use data. ## 7.2.3 * Fix `grid-template-areas` in `@media` (by Evgeny Petukhov). ## 7.2.2 * Fix `_autoprefixerDisabled is undefined` issue. ## 7.2.1 * Fix IE and other old JS runtimes support. ## 7.2 “Ordem e Progresso” * Add `grid-template-areas` support (by Evgeny Petukhov). * Add `grid-template` support (by Evgeny Petukhov). * Add `grid-area` support (by Alexey Komarov). * Add `autoprefixer-info` CLI tool. * Add wrong `radial-gradient` properties warning. * Use current working dir on missed `from` in `info()` (by Phil Dokas). * Fix `grid-row` and `grid-column` support (by Alexey Komarov). * Do not prefix `reverse` animation direction. * Improve test coverage (by Dmitry Semigradsky). ## 7.1.6 * Add warning for using `browserslist` option instead of `browsers`. * Add warning for multiple control comments in the same scope. * Fix `Invalid array length` error during indent changes. ## 7.1.5 * Fix `::placeholder` prefix for Edge. * Fix `inherit`/`initial`/`unset` values for `flex-direction`. * Fix RegExp usage in gradients (by Yet Another Minion). ## 7.1.4.1 * Update PostCSS. * Update Can I Use data. ## 7.1.4 * Fix `radial-gradient` direction conversion. * Fix `image-set` in `cursor`. ## 7.1.3 * Add warning for old `radial-gradient` direction syntax. * Add `last n major versions` browser query. ## 7.1.2.6 * Fix `.browserslistrc` support ## 7.1.2.5 * Fix `> 0` query for browsers with one version. * Update Can I Use data. ## 7.1.2.4 * Add `unreleased versions` and `unreleased Chrome versions` browsers queries. * Update Can I Use data. ## 7.1.2.3 * Add region usage statistics support. * Fix base64 decoding for old Node.js. * Update Can I Use data. ## 7.1.2.2 * Fix working with empty `autoprefixer.yml` (by Murahashi Kenichi). ## 7.1.2.1 * Fix loading `autoprefixer.yml` from engines (by Jim Ryan). ## 7.1.2 * Fix `text-decoration` shortcut support. ## 7.1.1.3 * Update Can I Use data. * Update PostCSS. ## 7.1.1.2 * Update Can I Use data. * Update Browserslist. ## 7.1.1.1 * Update Can I Use data. * Update Browserslist. * Update PostCSS. ## 7.1.1 * Remove non-`-webkit-` intrinsic prefixes in Grid Layout (by 一丝). ## 7.1 “Universitas litterarum” * Add `unicode-bidi` support. * Add `-webkit-appearance` support for Edge. * Fix intrinsic widths prefixes in Grid Layout. ## 7.0.1 * Fix `therubyracer` support. ## 7.0 “Coelestem adspicit lucem” * Remove node.js 0.12 support. * Use PostCSS 6.0. * Use Browserslist 2. * Use `caniuse-lite` instead of `caniuse-db` (by Ben Briggs). * Rewrite project from CoffeeScript to Babel (by Dmitry Semigradsky). * Disable Grid Layout prefixes for IE by default. * Fix `-ms-grid-column-align`. ## 6.7.7.2 * Update Can I Use data. * Update PostCSS. ## 6.7.7.1 * Update Firefox ESR. * Update Can I Use data. ## 6.7.7 * Fix `order` for non-digit values. ## 6.7.6 * Fix `font-kerning` (by Chi Vinh Le). ## 6.7.5 * Fix `text-decoration-skip` in iOS (by Chi Vinh Le). * Fix `clip-path` (by Chi Vinh Le). ## 6.7.4 * Improve `browsers` option perfomance. * Update CoffeeScript compiler. ## 6.7.3 * Fix compatibility with “Intrinsic & Extrinsic Sizing” spec update. ## 6.7.2 * Do not prefix grid/flexbox in `@supports` on `grid: false`/`flexbox: false`. ## 6.7.1 * Update Browserslist to fix `last n version` query. * Update Can I Use data. ## 6.7 “Krungthep doot thep saang” * Add Electron support in browsers list (by Kilian Valkhof). * Add `flex-flow` partial support for Flexbox 2009 specification. * Fix browsers `0` version issue in some Can I Use data. ## 6.6.1 * Update Can I Use data. ## 6.6 “Kaiyuan” * Add support for separated environments in browserslist config. ## 6.5.4 * Fix unitless 0 basis in IE10/IE11 shorthand flex (by Google). ## 6.5.3.1 * Update PostCSS to 5.2.6. * Update Can I Use data. ## 6.5.3 * Add error for popular mistake with `browser` option instead of `browsers`. ## 6.5.2 * Clean prefixes data (by Reinaldo Schiehll). ## 6.5.1.1 * Better syntax error messages with PostCSS 5.2.5. * Update Can I Use data. ## 6.5.1 * Fix selectors with `:--` prefix support. ## 6.5.0.2 * Better CSS highlight by PostCSS 5.2.4. * Update Can I Use data. ## 6.5.0.1 * Better syntax error output by PostCSS 5.2.3. * Update Can I Use data. ## 6.5 “Einigkeit und Recht und Freiheit” * Add `defaults` keyword to browsers requirements. * Fix CSS Grid Layout support. * Fix `align-self` cleaning. ## 6.4.1.1 * Better syntax error output by PostCSS 5.2. * Update Can I Use data. ## 6.4.1 * Fix node cloning. ## 6.4.0.3 * Update Browserslist. * Update Can I Use data. ## 6.4.0.2 * Fix `autoprefixer.js` loading path in some cases (by Pavan Trikutam) * Update Can I Use data. ## 6.4.0.1 * Fix Sprockets 3 support (by Eda Riedl). ## 6.4 “Hic et ubique terrarum” * Add `:any-link` selector support. * Add `text-decoration-skip` support. * Add `transition: duration property` support. * Fix `-webkit-` prefix for `backface-visibility`. * Fix `rad` unit support in gradients (by 刘祺). * Fix `transition` support in Opera 12. * Fix warning in Sprokets 3. * Removed Safari TP Grid prefixes support. ## 6.3.7 * Fix `browserslist` path detection (by Jose Luis Salas). * Fix rare `Cannot read property 'constructor' of null` issue. * Add space-less `>1%` and `>.5%` syntax support. * Clean `0` versions in some country-based requests. * Update Can I Use data. ## 6.3.6.2 * Update Firefox ESR. * Update Can I Use data. ## 6.3.6.1 * Fix source map for Sprockets 4 (by Richard Schneeman). ## 6.3.6 * Add Safari TP prefix support for Grid Layout. ## 6.3.5 * Fix duplicate prefixes for `-ms-interpolation-mode`. ## 6.3.4 * Show users coverage for selected browsers in `.info` and Rake task. ## 6.3.3.1 * Add Sprockets 4 support (by Richard Schneeman). * Add `AutoprefixerRails.uninstall()`. * Use `bundle_processor` for Sprockets 4 (by Adam Becker). * Clean gem dependency from `json` (by deepj). ## 6.3.3 * Fix transition warning. ## 6.3.2 * Update Can I Use data. ## 6.3.1 * Fix compatibility with Flexibility polyfill. ## 6.3 “Pro rege et lege” * Add Grid Layout support. * Add `text-spacing` support. * Add `> 10% in my stats` browsers query with custom usage statistics. * Add options to disable `@supports`, Flexbox or Grid support. * Fix compatibility with other PostCSS plugins. ## 6.2.3 * Fix error on broken transition with double comma. ## 6.2.2 * Fix issues in broken transitions. ## 6.2.1 * Fix AST error in transition warning (by @jvdanilo). ## 6.2 “Fluctuat nec mergitur” * Use `fill` instead of `fill-available` according spec changes (by 一丝). * Add `fill` support for logical dimension properties (by 一丝). * Add `text-emphasis` support (by 一丝). * Add prefixes to `@supports` only for compatible browsers. * Add `rad`, `grad` and `turn` units support to linear gradients. * Add some `deg` directions support for old WebKit linear gradients. * Fix `@supports` parenthesis (by @heady). * Fix Rails without Assets Pipeline support (by Zach Denton). * Add warning when prefixes could not be generated for complicated `transition-property` values. * Add warning for outdated `fill-available` value. * Add warning for wrong `text-emphasis-position` value. * Add “time capsule” warning for prefix-less future. * Normalizes all warning messages. ## 6.1.2 * Fix gradient hack on some parameters (by Alexey Efremov). ## 6.1.1 * Fix `cursor: grab` and `cusror: grabbing` support. ## 6.1.0.1 * Return old Rails integration to fix strange issues. ## 6.1 “Bil-shaʿb wa lil-shaʿb” * Change `transition` support to output more robust CSS. * Add `:read-only` support. * Add support for `appearance` with any values. * Add loud `/*! autoprefixer: off */` control comments support. * Convert `rotateZ` to `rotate` for `-ms-transform`. * Use `postcss-value-parser` to carefully work with gradients. * Remove `-ms-transform-style` and `-o-transform-style` that never existed. ## 6.0.3 * Fix old gradient direction warning. ## 6.0.2 * Remove unnecessary `-khtml-` prefix too. ## 6.0.1 * Fix `cross-fade()` support (by 一丝). ## 6.0 “Eureka” * Remove Ruby on Rails 3 support. * Remove Ruby 1.9 support. * Remove `safe` option. * Remove Opera 12.1 from default query. * Add `image-set` support (by 一丝). * Add `mask-border` support (by 一丝). * Add `filter()` function support (by Vincent De Oliveira). * Add `backdrop-filter` support (by Vincent De Oliveira). * Add `element()` support (by Vincent De Oliveira). * Add CSS Regions support. * Add Scroll Snap Points support. * Add `writing-mode` support. * Add `::backdrop` support. * Add `cross-fade()` support. * Add other `break-` properties support. * Add Microsoft Edge support (by Andrey Polischuk). * Add `not` keyword and exclude browsers by query. * Add version ranges `IE 6-9` (by Ben Briggs). * Fix `filter` in `transition` support on Safari. * Fix `url()` parsing. * Fix `pixelated` cleaning. * Always show old gradient direction warning. ## 5.2.1.3 * Update Can I Use database. * Update internal libraries. ## 5.2.1.2 * Update Can I Use database. * Update internal libraries. ## 5.2.1.1 * Update Can I Use database. * Update internal libraries. ## 5.2.1 * Fix parent-less node issue on some cases (by Josh Gillies) ## 5.2.0.1 * Update Can I Use database. ## 5.2 “Dont tread on me” * Add `appearance` support. * Warn users on old gradient direction or flexbox syntax. * Add `add: false` option to disable new prefixes adding. * Make Autoprefixer 30% faster. * Add prefixes for `pixelated` instead of `crisp-edges` in `image-rendering`. * Do not add `::placeholder` prefixes for `:placeholder-shown`. * Fix `text-decoration` prefixes. ## 5.1.11 * Update num2fraction to fix resolution media quuery (by 一丝). ## 5.1.10 * Do not generate `-webkit-image-rendering`. ## 5.1.9 * Fix DynJS compatibility (by Nick Howes). ## 5.1.8.1 * Update Can I Use database. ## 5.1.8 * Fix gradients in `mask` and `mask-image` properties. * Fix old webkit prefix on some unsupported gradients. ## 5.1.7.1 * Update Can I Use database and JS libraries. * Better support with Alaska runtime (by Jon Bardin). ## 5.1.7 * Fix placeholder selector (by Vincent De Oliveira). # 5.1.6 * Use official `::placeholder-shown` selector (by Vincent De Oliveira). * Fix problem with rails-html-sanitizer (by Alexey Vasiliev). # 5.1.5 * Add transition support for CSS Masks properties. # 5.1.4 * Use `-webkit-` prefix for Opera Mobile 24. # 5.1.3.1 * Fix Rails 5 support (by Joshua Peek). # 5.1.3 * Add IE support for `image-rendering: crisp-edges`. # 5.1.2 * Add never existed `@-ms-keyframes` to common mistake. ## 5.1.1 * Safer value split in `flex` hack. ## 5.1 “Jianyuan” * Add support for resolution media query (by 一丝). * Higher accuracy while removing prefixes in values. * Add support for logical properties (by 一丝). * Add `@viewport` support. * Add `text-overflow` support (by 一丝). * Add `text-emphasis` support (by 一丝). * Add `image-rendering: crisp-edges` support. * Add `text-align-last` support. * Return `autoprefixer.defaults` as alias to current `browserslist.defaults`. * Save code style while adding prefixes to `@keyframes` and `@viewport`. * Do not remove `-webkit-background-clip` with non-spec `text` value. * Fix `-webkit-filter` in `transition`. * Better support for browser versions joined on Can I Use like `ios_saf 7.0-7.1` (by Vincent De Oliveira). * Fix compatibility with `postcss-import` (by Jason Kuhrt). * Fix Flexbox prefixes for BlackBerry and UC Browser. * Fix gradient prefixes for old Chrome. ## 5.0.0.3 * Fix error on `nil` in processor params. ## 5.0.0.2 * Fix for non-Rails environments. * Add notice about unsupported ExecJS runtimes. * Update Can I Use data. ## 5.0.0.1 * Fix issue on node.js runtime. ## 5.0 “Pravda vítězí” * Use PostCSS 4.0. * Use Browserslist to parse browsers queries. * Use global `browserslist` config. Key `browsers` in `config/autoprefixer.yml` is now deprecated. * Add `> 5% in US` query to select browsers by usage in some country. * Add `object-fit` and `object-position` properties support. * Add CSS Shape properties support. * Fix UC Browser name in debug info. ## 4.0.2.2 * Update Can I Use data. * Update some npm dependencies. ## 4.0.2.1 * Fix IE filter parsing with multiple commands. * Update Can I Use dump. ## 4.0.2 * Remove `o-border-radius`, which is common mistake in legacy CSS. ## 4.0.1.1 * Use PostCSS 3.0.5 to parse complicated cases of CSS syntax. * Update Can I Use dump. ## 4.0.1 * Fix `@supports` support with brackets in values (by Vincent De Oliveira). * Fix Windows support (by Kamen Hursev). ## 4.0.0.1 * Update PostCSS to fix issue with empty comment. ## 4.0 “Indivisibiliter ac Inseparabiliter” * Become 2.5 times fatser by new PostCSS 3.0 parser. * Do not remove outdated prefixes by `remove: false` option. * `map.inline` and `map.sourcesContent` options are now `true` by default. * Add `box-decoration-break` support. * Do not add old `-webkit-` prefix for gradients with `px` units. * Use previous source map to show origin source of CSS syntax error. * Use `from` option from previous source map `file` field. * Set `to` value to `from` if `to` option is missing. * Trim Unicode BOM on source maps parsing. * Parse at-rules without spaces like `@import"file"`. * Better previous `sourceMappingURL` annotation comment cleaning. * Do not remove previous `sourceMappingURL` comment on `map.annotation: false`. ## 3.1.2 * Update Firefox ESR version from 24 to 31. ## 3.1.1 * Use Flexbox 2009 spec for Android stock browser < 4.4. ## 3.1 “Satyameva Jayate” * Do not remove comments from prefixed values (by Eitan Rousso). * Allow Safari 6.1 to use final Flexbox spec (by John Kreitlow). * Fix `filter` value in `transition` in Webkits. * Show greetings in Rake task if your browsers don’t require any prefixes. * Add `<=` and `<` browsers requirement (by Andreas Lind). ## 3.0.1 * Update Can I Use data. ## 3.0 “Liberté, Égalité, Fraternité” * All methods now receive browsers as options key, not separated argument. * GNU format for syntax error messages from PostCSS 2.2. ## 2.2.20140804 * Fix UTF-8 support in inline source maps. * Allow to miss `from` and `to` options in inline source maps. * Update Can I Use data. ## 2.2 “Mobilis in mobili” * Allow to disable Autoprefixer for some rule by control comment. * Use PostCSS 2.1 with Safe Mode option and broken source line in CSS syntax error messages. ## 2.1.1 * Fix `-webkit-background-size` hack for `contain` and `cover` values. * Don’t add `-webkit-` prefix to `filter` with SVG (by Vincent De Oliveira). ## 2.1 “Eleftheria i thanatos” * Add support for `clip-path` and `mask` properties. * Return `-webkit-` prefix to `filter` with SVG URI. ## 2.0.2 * Add readable names for new browsers from 2.0 release. * Don’t add `-webkit-` prefix to `filter` with SVG URI. * Don’t add `-o-` prefix 3D transforms. ## 2.0.1 * Save declaration style, when clone declaration to prefix. ## 2.0 “Hongik Ingan” * Based on PostCSS 1.0. See [options changes](https://github.com/postcss/postcss/releases/tag/1.0.0). * Restore visual cascade after declaration removing. * Prefix declareation in `@supports` at-rule conditions. * Add all browsers from Can I Use: `ie_mob`, `and_chr`, `and_ff`, `op_mob` and `op_mini`. ## 1.3.1 * Fix gradient hack, when `background` property contains color. ## 1.3 “Tenka Fubu” * Add `text-size-adjust` support. * Add `background-size` to support Android 2. * Update Can I Use data. ## 1.2 “Meiji” * Use Can I Use data from official `caniuse-db` npm package. * Change versions to `x.x.x.y`, where `x.x.x` is Autoprefixer npm version and `y` is a `caniuse-db` date. ## 1.1 “Nutrisco et extingo” * Add source map annotation comment support. * Add inline source map support. * Autodetect previous inline source map. * Fix source maps support on Windows. * Fix source maps support in subdirectory. * Prefix selector even if it is already prefixed by developer. * Change CSS indentation to create nice visual cascade of prefixes. * Fix flexbox support for IE 10 (by Roland Warmerdam). * Better `break-inside` support. * Fix prefixing, when two same properties are near. ### 20140222: * Add `touch-action` support. ### 20140226: * Chrome 33 is moved to released versions. * Add Chrome 36 data. ### 20140302: * Add `text-decoration-*` properties support. * Update browsers usage statistics. * Fix `cascade` options without `browsers` option (by Dominik Porada). * Use new PostCSS version. ### 20140319: * Check already prefixed properties after current declaration. * Normalize spaces before already prefixed check. * Firefox 28 is moved to released versions. * Add Firefox 31 data. * Add some Blackberry data. ## 20140327: * Don’t use `-ms-transform` in `@keyframes`, because IE 9 doesn’t support animations. * Update BlackBerry 10 data. ## 20140403: * Update browsers usage statistics. * Opera 20 is moved to released versions. * Add Opera 22 data. ## 20140410: * Chrome 34 is moved to released versions. * Add Chrome 37 data. * Fix Chrome 36 data. ## 20140429: * Fix `display: inline-flex` support by 2009 spec. * Fix old WebKit gradient converter (by Sergey Belov). ## 20140430: * Separate 2D and 3D transform prefixes to clean unnecessary `-ms-` prefixes. * Firefox 29 is moved to released versions. * Add Firefox 32 data. ### 20140510 * Do not add `-ms-` prefix for `transform` with 3D functions. * Update browsers global usage statistics. ### 20140512 * Remove unnecessary `-moz-` prefix for `wavy` in `text-decoration`. * Update Safari data for font properties. ### 20140521 * Chrome 36 is moved to released versions. * Add Chrome 38 data. ### 20140523 * Opera 21 is moved to released versions. * Add Opera 23 data. ### 20140605 * Allow to parse gradients without space between color and position. * Add iOS 8, Safari 8 and Android 4.4.3 data. * Update browsers usage statistics. ## 1.0 “Plus ultra” * Source map support. * Save origin indents and code formatting. * Change CSS parser to PostCSS. * Keep vendor hacks, which does right after unprefixed property. * Show syntax errors if fixed sass-rails version if used. * Rename compile() to process() and return result object, instead of CSS string. * Rename inspect() to info(). * Allow to select last versions for specified browser. * Add full browser names aliases: `firefox`, `explorer` and `blackberry`. * Ignore case in browser names. * Change license to MIT. * Add prefixes inside custom at-rules. * Add only necessary prefixes to selector inside prefixed at-rule. * Safer backgrounds list parser in gradient hack. * Prefix @keyframes inside @media. * Don’t prefix values for CSS3 PIE properties. * Use browserify to build standalone version. ### 20131225: * Add ::placeholder support for Firefix >= 18. * Fix vendor prefixes order. ### 20140103: * Add webkit prefix for sticky position. * Update browsers popularity statistics. ### 20140109: * Add selectors and at-rules sections to debug info. * Fix outdated prefixes cleaning. ### 20140110: * Add `Firefox ESR` browser requirement. * Opera 18 is moved to released versions. * Add Opera 20 data. ### 20140117: * Chrome 32 is moved to released versions. * Add Opera 34 data. ### 20140130: * Fix flexbox properties names in transitions. * Add Chrome 35 and Firefox 29 data. ### 20140203: * Android 4.4 stock browser and Opera 19 are moved to released versions. * Add Opera 21 data. * Update browsers usage statistics. ### 20140213: * Add case insensitive to IE’s filter hack (by Dominik Schilling). * Improve selector prefixing in some rare cases (by Simon Lydell). * Firefox 27 is moved to released versions. * Add Firefox 30 data. ## 0.8 “Unbowed, Unbent, Unbroken” * Add more browsers to defaults ("> 1%, last 2 versions, ff 17, opera 12.1" instead of just "last 2 browsers"). * Keep vendor prefixes without unprefixed version (like vendor-specific hacks). * Convert gradients to old WebKit syntax (actual for Android 2.3). * Better support for several syntaxes with one prefix (like Flexbox and gradients in WebKit). * Add intrinsic and extrinsic sizing values support. * Remove never existed prefixes from common mistakes (like -ms-transition). * Add Opera 17 data. * Fix selector prefixes order. * Fix browser versions order in inspect. ### 20130903: * Fix old WebKit gradients convertor on rgba() colors. * Allow to write old direction syntax in gradients. ### 20130906: * Fix direction syntax in radial gradients. * Don’t prefix IE filter with modern syntax. ### 20130911: * Fix parsing property name with spaces. ### 20130919: * Fix processing custom framework prefixes (by Johannes J. Schmidt). * Concat outputs if several files compiled to one output. * Decrease standalone build size by removing unnecessary Binary class. * iOS 7 is moved to released versions. * Clean up binary code (by Simon Lydell). ### 20130923: * Firefox 24 is moved to released versions. ### 20131001: * Add support for grab, grabbing, zoom-in and zoom-out cursor values. ### 20131006: * Chrome 30 is moved to released versions. ### 20131007: * Don’t add another prefixes in rule with prefixed selector. ### 20131009: * Opera 17 is moved to released versions. ### 20131015: * Fix converting multiple gradients to old webkit syntax (by Aleksei Androsov). ### 20131017: * Fix @host at-rule parsing. ### 20131020: * IE 11 and Andrid 4.3 is moved to released versions. * Add Opera 18 data. * Add @namespace support. * Sort browser versions in data file. ### 20131029: * Add Safari 6.1 data. * Add fx alias for Firefox. ### 20131104: * Update Android future version to 4.4. * Google Chrome 32 added to future versions list. * Firefox 25 now is actual version, 27 and 28 added to future versions. * Browsers statistics are updated. ### 20131205: * Google Chrome 33 added to future releases list. * Google Chrome 31 moved to current releases list. ### 20131209: * Fix Autoprefixer initializer on Heroku (by Jason Purcell). * Use old webkit gradients for old iOS and Safari (by Chad von Nau). * Fix direction conversion for old webkit gradients (by Chad von Nau). * Update browsers popularity statistics. ### 20131213: * Firefox ESR in default browsers was changed to 24 version. * Firefox 26 was moved to current releases list. * Firefox 28 was added to future releases list. ## 0.7 “We Do Not Sow” * Add vendor prefixes to selectors. * Add ::selection and ::placeholder selectors support. * Allow to load support data from Can I Use pull requests. * Remove deprecated API. ### 20130806: * Add hyphens support. ### 20130807: * Add tab-size support. * Add :fullscreen support. ### 20130808: * Allow to select browser versions by > and >= operator. * Fix flex properties in transition. ### 20130810: * Add Firefox 25 data. ### 20130824: * Add Chrome 31 and 30 data. * Fix CSS comments parsing (by vladkens). ## 0.6 “As High As Honor” * New faster API, which cache preprocessed data. Old API is deprecated. * A lot of perfomance improvements. * Add Opera 15 -webkit- prefix support. * Update Chrome 29 and Safari 7 prefixes data. * Add minor browsers in popularity select. * Better syntax error messages. ### 20130721: * Add Chrome 30 data. ### 20130728: * Don’t remove non-standard -webkit-background-clip: text. * Don’t remove IE hack on CSS parse. * Fix loading into Rails without Sprockets. ### 20130729: * Add Opera 16 data. * Fix “Invalid range in character class” error on JRuby. ### 20130730: * Fix correct clone comments inside keyframes (by Alexey Plutalov). * Fix angle recalculation in gradients (by Roman Komarov). ### 20130731: * Add border-image support. ## 0.5 “Ours is the Fury” * Rewrite Autoprefixer to be more flexible. * Use css, instead of Rework, to fix CSS parsing errors faster. * Fix a lot of CSS parsing errors. * Fix sass-rails 4.0.0.rc2 compatibility. ### 20130616: * More useful message for CSS parsing errors. * Remove old WebKit gradient syntax. * Fix parsing error on comment with braces. ### 20130617: * Remove old Mozilla border-radius. * Don’t prefix old IE filter. * Remove old background-clip, background-size and background-origin prefixes. * Speed up regexps in values. * Allow to hack property declarations. ### 20130625: * Convert flexbox properties to 2009 and 2012 specifications. * Add support for sass-rails 4 final. ### 20130626: * Add Firefox 24 data. * Add prefixes for font-feature-settings. ### 20130629: * Fix convert flex properties to old box-flex. * Fix Sinatra (sprockets-sass) suuport. ## 0.4 “Winter Is Coming” * Remove outdated prefixes. * Add border-radius and box-shadow properties to database. * Change degrees in webkit gradients. ### 20130515: * Add old syntax in gradient direction. * Add old syntax for display: flex. * Update browser global usage statistics. ### 20130521: * Add Firefox 23 data. * Update css-parse to fix @-moz-document issue. ### 20130523: * Update Rework’s libraries to fix @page statement. ### 20130524: * Add Chrome 29 data. ### 20130527: * Fix new css-stringify issue. ### 20130528: * Fix compatibilty with Rework from git master. * Add minor browsers to data, which can be selected only directly. ### 20130530: * Add Opera 15 and iOS 6.1 data. * Fix iOS versions in properties and values data. ### 20130603: * Use latest Rework 0.15 with a lot of CSS parsing fixes. * Update browsers usage statistics. ## 0.3 “Growing Strong” * Use own filters instead of Rework’s `prefix` and `prefixValue`. * Smarter value prefixer without false match “order” in “border”. * 40% faster. * Don’t add unnecessary properties instead of Rework’s `prefixValue`. * Don’t change properties order. * Sort properties and values in inspect output. ### 20130424: * Fix value override in prefixer. ### 20130427: * Prefix several same values in one property. ### 20130502: * Don’t add -webkit- prefix to IE filter. * Don’t duplicate already prefixed rules. ## 0.2 “Hear Me Roar!” * Update parse libraries. * Add inspect method and rake tast. ## 0.1 “Fire and Blood” * Initial release. autoprefixer-rails-8.6.5/vendor/0000755000175000017500000000000013414333620015677 5ustar pravipraviautoprefixer-rails-8.6.5/README.md0000644000175000017500000001334713414333620015671 0ustar pravipravi# Autoprefixer Rails [![Build Status][ci-img]][ci] [Autoprefixer] is a tool to parse CSS and add vendor prefixes to CSS rules using values from the [Can I Use] database. This gem provides Ruby and Ruby on Rails integration with this JavaScript tool. Sponsored by Evil Martians [Autoprefixer]: https://github.com/postcss/autoprefixer [Can I Use]: http://caniuse.com/ [ci-img]: https://travis-ci.org/ai/autoprefixer-rails.svg [ci]: https://travis-ci.org/ai/autoprefixer-rails ## Differences The best way to use Autoprefixer is with webpack or Gulp. Autoprefixer Rails doesn’t support these Autoprefixer features: * Browsers in `package.json`. * Custom browsers usage statistics. ## Usage Windows users should install [node.js](http://nodejs.org/). Autoprefixer Rails doesn’t work with old JScript in Windows. ### Ruby on Rails Add the `autoprefixer-rails` gem to your `Gemfile`: ```ruby gem "autoprefixer-rails" ``` Clear your cache: ```sh rake tmp:clear ``` Write your CSS (Sass, Stylus, LESS) rules without vendor prefixes and Autoprefixer will apply prefixes for you. For example in `app/assets/stylesheet/foobar.sass`: ```sass :fullscreen a display: flex ``` Autoprefixer uses the Can I Use database with browser statistics and properties support to add vendor prefixes automatically using the Asset Pipeline: ```css :-webkit-full-screen a { display: -webkit-box; display: -webkit-flex; display: flex } :-moz-full-screen a { display: flex } :-ms-fullscreen a { display: -ms-flexbox; display: flex } :fullscreen a { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex } ``` If you need to specify browsers for your Rails project, you can save them to * `browserslist` and place it under `app/assets/stylesheets/` or any of its ancestor directories ``` > 1% last 2 versions IE > 8 # comment ``` * Or `config/autoprefixer.yml` ```yaml flexbox: no-2009 browsers: - "> 1%" - "last 2 versions" - "IE > 8" ``` See [Browserslist docs] for config format. But `> 5% in US` query is not supported in Rails, because of ExecJS limitations. You should migrate to webpack or Gulp if you want it. __Note: you have to clear cache (`rake tmp:clear`) for the configuration to take effect.__ You can get what properties will be changed using a Rake task: ```sh rake autoprefixer:info ``` To disable Autoprefixer just remove postprocessor: ```ruby AutoprefixerRails.uninstall(Rails.application.assets) ``` [Browserslist docs]: https://github.com/ai/browserslist [Firefox ESR]: http://www.mozilla.org/en/firefox/organizations/faq/ ### Sprockets If you use Sinatra or another non-Rails framework with Sprockets, just connect your Sprockets environment with Autoprefixer and write CSS in the usual way: ```ruby assets = Sprockets::Environment.new do |env| # Your assets settings end require "autoprefixer-rails" AutoprefixerRails.install(assets) ``` ### Ruby If you need to call Autoprefixer from plain Ruby code, it’s very easy: ```ruby require "autoprefixer-rails" prefixed = AutoprefixerRails.process(css, from: 'main.css').css ``` You can specify browsers with the `browsers` option: ```ruby AutoprefixerRails.process(css, from: 'a.css', browsers: ['> 1%', 'ie 10']).css ``` ### Compass You should consider using Gulp instead of Compass binary, because it has better Autoprefixer integration and many other awesome plugins. But if you can’t move from Compass binary right now, there’s a hack to run Autoprefixer after `compass compile`. Install `autoprefixer-rails` gem: ``` gem install autoprefixer-rails ``` and add post-compile hook to `config.rb`: ```ruby require 'autoprefixer-rails' on_stylesheet_saved do |file| css = File.read(file) map = file + '.map' if File.exists? map result = AutoprefixerRails.process(css, from: file, to: file, map: { prev: File.read(map), inline: false }) File.open(file, 'w') { |io| io << result.css } File.open(map, 'w') { |io| io << result.map } else File.open(file, 'w') { |io| io << AutoprefixerRails.process(css) } end end ``` ## Visual Cascade By default, Autoprefixer will change CSS indentation to create nice visual cascade of prefixes. ```css a { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box } ``` You can disable this by specifying `cascade: false` in `config/autoprefixer.yml` or in `process()` options. ## Source Map Autoprefixer will generate a source map if you set `map` option to `true` in `process` method. You must set input and output CSS files paths (by `from` and `to` options) to generate correct map. ```ruby result = AutoprefixerRails.process(css, map: true, from: 'main.css', to: 'main.out.css') ``` Autoprefixer can also modify previous source map (for example, from Sass compilation). Just set original source map content (as string) to `map` option: ```ruby result = AutoprefixerRails.process(css, { map: File.read('main.sass.css.map'), from: 'main.sass.css', to: 'main.min.css') result.map #=> Source map from main.sass to main.min.css ``` See all options in [PostCSS docs]. AutoprefixerRails will convert Ruby style to JS style, so you can use `map: { sources_content: false }` instead of camelcase `sourcesContent`. [PostCSS docs]: https://github.com/postcss/postcss#source-map-1 autoprefixer-rails-8.6.5/autoprefixer-rails.gemspec0000644000175000017500000000175113414333620021600 0ustar pravipravirequire File.expand_path('../lib/autoprefixer-rails/version', __FILE__) Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = 'autoprefixer-rails' s.version = AutoprefixerRails::VERSION.dup s.date = Time.now.strftime('%Y-%m-%d') s.summary = 'Parse CSS and add vendor prefixes to CSS rules using ' + 'values from the Can I Use website.' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {spec}/*`.split("\n") s.extra_rdoc_files = ['README.md', 'LICENSE', 'CHANGELOG.md'] s.require_path = 'lib' s.required_ruby_version = '>= 2.0' s.author = 'Andrey Sitnik' s.email = 'andrey@sitnik.ru' s.homepage = 'https://github.com/ai/autoprefixer-rails' s.license = 'MIT' s.add_dependency 'execjs', '>= 0' s.add_development_dependency 'rake' s.add_development_dependency 'rails' s.add_development_dependency 'compass' s.add_development_dependency 'rspec-rails' end autoprefixer-rails-8.6.5/sprockets3.gemfile0000644000175000017500000000026513414333620020037 0ustar pravipravisource 'https://rubygems.org' gemspec gem 'rails', '< 5' gem 'sprockets', '>= 3.4.0', '< 4.0' gem 'sprockets-rails' eval_gemfile "#{ File.dirname(__FILE__) }/shared.gemfile" autoprefixer-rails-8.6.5/lib/0000755000175000017500000000000013414333620015150 5ustar pravipraviautoprefixer-rails-8.6.5/lib/rake/0000755000175000017500000000000013414333620016072 5ustar pravipraviautoprefixer-rails-8.6.5/lib/rake/autoprefixer_tasks.rb0000644000175000017500000000123013414333620022335 0ustar pravipravirequire 'rake' require 'rake/tasklib' require 'autoprefixer-rails' module Rake # Define task to inspect Autoprefixer browsers, properties and values. # Call it from your `Rakefile`: # # AutoprefixerTasks.new(['> 1%', 'opera 12']) class AutoprefixerTasks < Rake::TaskLib attr_reader :browsers def initialize(params = {}) @params = params @processor = AutoprefixerRails.processor(@params) define end def define namespace :autoprefixer do desc 'Show selected browsers and prefixed CSS properties and values' task :info do puts @processor.info end end end end end autoprefixer-rails-8.6.5/lib/autoprefixer-rails/0000755000175000017500000000000013414333620020775 5ustar pravipraviautoprefixer-rails-8.6.5/lib/autoprefixer-rails/result.rb0000644000175000017500000000071213414333620022640 0ustar pravipravimodule AutoprefixerRails # Container of prefixed CSS and source map with changes class Result # Prefixed CSS after Autoprefixer attr_reader :css # Source map of changes attr_reader :map # Warnings from Autoprefixer attr_reader :warnings def initialize(css, map, warnings) @warnings = warnings @css = css @map = map end # Stringify prefixed CSS def to_s @css end end end autoprefixer-rails-8.6.5/lib/autoprefixer-rails/processor.rb0000644000175000017500000001726213414333620023351 0ustar pravipravirequire 'pathname' require 'execjs' require 'json' IS_SECTION = /^\s*\[(.+)\]\s*$/ module AutoprefixerRails # Ruby to JS wrapper for Autoprefixer processor instance class Processor def initialize(params = { }) @params = params || { } end # Process `css` and return result. # # Options can be: # * `from` with input CSS file name. Will be used in error messages. # * `to` with output CSS file name. # * `map` with true to generate new source map or with previous map. def process(css, opts = { }) opts = convert_options(opts) apply_wrapper = "(function(opts, pluginOpts) {" + "return eval(process.apply(this, opts, pluginOpts));" + "})" pluginOpts = params_with_browsers(opts[:from]).merge(opts) processOpts = { from: pluginOpts.delete(:from), to: pluginOpts.delete(:to), map: pluginOpts.delete(:map) } begin result = runtime.call(apply_wrapper, [css, processOpts, pluginOpts]) rescue ExecJS::ProgramError => e contry_error = 'BrowserslistError: ' + 'Country statistics is not supported ' + 'in client-side build of Browserslist' if e.message == contry_error raise 'Country statistics is not supported in AutoprefixerRails. ' + 'Use Autoprefixer with webpack or other Node.js builder.' else raise e end end Result.new(result['css'], result['map'], result['warnings']) end # Return, which browsers and prefixes will be used def info runtime.eval("autoprefixer(#{ js_params }).info()") end # Parse Browserslist config def parse_config(config) sections = { 'defaults' => [] } current = 'defaults' config.gsub(/#[^\n]*/, '') .split(/\n/) .map(&:strip) .reject(&:empty?) .each do |line| if line =~ IS_SECTION current = line.match(IS_SECTION)[1].strip sections[current] ||= [] else sections[current] << line end end sections end private def params_with_browsers(from = nil) unless from if defined? Rails and Rails.respond_to?(:root) and Rails.root from = Rails.root.join('app/assets/stylesheets').to_s else from = '.' end end params = @params if not params.has_key?(:browsers) and from file = find_config(from) if file env = params[:env].to_s || 'development' config = parse_config(file) params = params.dup if config[env] params[:browsers] = config[env] else params[:browsers] = config['defaults'] end end end params end # Convert params to JS string and add browsers from Browserslist config def js_params '{ ' + params_with_browsers.map { |k, v| "#{k}: #{v.inspect}"}.join(', ') + ' }' end # Convert ruby_options to jsOptions def convert_options(opts) converted = { } opts.each_pair do |name, value| if name =~ /_/ name = name.to_s.gsub(/_\w/) { |i| i.gsub('_', '').upcase }.to_sym end value = convert_options(value) if value.is_a? Hash converted[name] = value end converted end # Try to find Browserslist config def find_config(file) path = Pathname(file).expand_path while path.parent != path config1 = path.join('browserslist') return config1.read if config1.exist? and not config1.directory? config2 = path.join('.browserslistrc') return config2.read if config2.exist? and not config1.directory? path = path.parent end nil end # Lazy load for JS library def runtime @runtime ||= begin if ExecJS.eval('typeof(Array.prototype.map)') != 'function' raise "Current ExecJS runtime does't support ES5. " + "Please install node.js." end ExecJS.compile(build_js) end end # Cache autoprefixer.js content def read_js @@js ||= begin root = Pathname(File.dirname(__FILE__)) path = root.join("../../vendor/autoprefixer.js") path.read.gsub(/Object.setPrototypeOf\(chalk[^)]+\)/, '') end end def polyfills <<-JS if (typeof Uint8Array === "undefined") global.Uint8Array = Array; if (typeof ArrayBuffer === "undefined") global.ArrayBuffer = Array; if (typeof Set === "undefined") { global.Set = function (values) { this.values = values } global.Set.prototype = { has: function (i) { return this.values.indexOf(i) !== -1 } } } if (typeof Map === "undefined") { global.Map = function () { this.data = { } } global.Map.prototype = { set: function (k, v) { this.data[k] = v }, get: function (k) { return this.data[k] }, has: function (k) { return Object.keys(this.data).indexOf(k) !== -1 }, } } Math.log2 = Math.log2 || function(x) { return Math.log(x) * Math.LOG2E; }; Math.sign = Math.sign || function(x) { x = +x; if (x === 0 || isNaN(x)) return Number(x); return x > 0 ? 1 : -1; }; Array.prototype.fill = Array.prototype.fill || function(value) { var O = Object(this); var len = O.length >>> 0; var start = arguments[1]; var relativeStart = start >> 0; var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); var end = arguments[2]; var relativeEnd = end === undefined ? len : end >> 0; var final = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); while (k < final) { O[k] = value; k++; } return O; }; if (!Object.assign) { Object.assign = function(target, firstSource) { var to = Object(target); for (var i = 1; i < arguments.length; i++) { var nextSource = arguments[i]; if (nextSource === undefined || nextSource === null) continue; var keysArray = Object.keys(Object(nextSource)); for (var n = 0, len = keysArray.length; n < len; n++) { var nextKey = keysArray[n]; var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); if (desc !== undefined && desc.enumerable) { to[nextKey] = nextSource[nextKey]; } } } return to; } } if (!Array.isView) { Array.isView = function () { return false } } JS end # Return processor JS with some extra methods def build_js 'var global = this;' + polyfills + read_js + process_proxy end # Return JS code for process method proxy def process_proxy <<-JS var processor; var process = function() { var result = autoprefixer.process.apply(autoprefixer, arguments); var warns = result.warnings().map(function (i) { delete i.plugin; return i.toString(); }); var map = result.map ? result.map.toString() : null; return { css: result.css, map: map, warnings: warns }; }; JS end end end autoprefixer-rails-8.6.5/lib/autoprefixer-rails/railtie.rb0000644000175000017500000000233013414333620022751 0ustar pravipravirequire 'yaml' begin module AutoprefixedRails class Railtie < ::Rails::Railtie rake_tasks do |app| require 'rake/autoprefixer_tasks' Rake::AutoprefixerTasks.new( config ) if defined? app.assets end if config.respond_to?(:assets) and not config.assets.nil? config.assets.configure do |env| AutoprefixerRails.install(env, config) end else initializer :setup_autoprefixer, group: :all do |app| if defined? app.assets and not app.assets.nil? AutoprefixerRails.install(app.assets, config) end end end # Read browsers requirements from application or engine config def config params = {} roots.each do |root| file = File.join(root, 'config/autoprefixer.yml') if File.exist?(file) parsed = ::YAML.load_file(file) next unless parsed params = parsed break end end params = params.symbolize_keys params[:env] ||= Rails.env.to_s params end def roots [Rails.application.root] + Rails::Engine.subclasses.map(&:root) end end end rescue LoadError end autoprefixer-rails-8.6.5/lib/autoprefixer-rails/sprockets.rb0000644000175000017500000000316713414333620023346 0ustar pravipravirequire 'pathname' module AutoprefixerRails # Register autoprefixer postprocessor in Sprockets and fix common issues class Sprockets def self.register_processor(processor) @processor = processor end # Sprockets 3 and 4 API def self.call(input) filename = input[:filename] source = input[:data] run(filename, source) end # Add prefixes to `css` def self.run(filename, css) output = filename.chomp(File.extname(filename)) + '.css' result = @processor.process(css, from: filename, to: output) result.warnings.each do |warning| $stderr.puts "autoprefixer: #{ warning }" end result.css end # Register postprocessor in Sprockets depend on issues with other gems def self.install(env) if ::Sprockets::VERSION.to_f < 4 env.register_postprocessor('text/css', ::AutoprefixerRails::Sprockets) else env.register_bundle_processor('text/css', ::AutoprefixerRails::Sprockets) end end # Register postprocessor in Sprockets depend on issues with other gems def self.uninstall(env) if ::Sprockets::VERSION.to_f < 4 env.unregister_postprocessor('text/css', ::AutoprefixerRails::Sprockets) else env.unregister_bundle_processor('text/css', ::AutoprefixerRails::Sprockets) end end # Sprockets 2 API new and render def initialize(filename, &block) @filename = filename @source = block.call end # Sprockets 2 API new and render def render(_, _) self.class.run(@filename, @source) end end end autoprefixer-rails-8.6.5/lib/autoprefixer-rails/version.rb0000644000175000017500000000014313414333620023005 0ustar pravipravimodule AutoprefixerRails VERSION = '8.6.5'.freeze unless defined? AutoprefixerRails::VERSION end autoprefixer-rails-8.6.5/lib/autoprefixer-rails.rb0000644000175000017500000000241113414333620021320 0ustar pravipravi# Ruby integration with Autoprefixer JS library, which parse CSS and adds # only actual prefixed module AutoprefixerRails autoload :Sprockets, 'autoprefixer-rails/sprockets' # Add prefixes to `css`. See `Processor#process` for options. def self.process(css, opts = { }) params = { } params[:browsers] = opts.delete(:browsers) if opts.has_key?(:browsers) params[:cascade] = opts.delete(:cascade) if opts.has_key?(:cascade) params[:remove] = opts.delete(:remove) if opts.has_key?(:remove) params[:env] = opts.delete(:env) if opts.has_key?(:env) processor(params).process(css, opts) end # Add Autoprefixer for Sprockets environment in `assets`. # You can specify `browsers` actual in your project. def self.install(assets, params = { }) Sprockets.register_processor(processor(params)) Sprockets.install(assets) end # Disable installed Autoprefixer def self.uninstall(assets) Sprockets.uninstall(assets) end # Cache processor instances def self.processor(params = { }) Processor.new(params) end end require_relative 'autoprefixer-rails/result' require_relative 'autoprefixer-rails/version' require_relative 'autoprefixer-rails/processor' require_relative 'autoprefixer-rails/railtie' if defined?(Rails) autoprefixer-rails-8.6.5/mini_racer.gemfile0000644000175000017500000000057213414333620020050 0ustar pravipravisource 'https://rubygems.org' gemspec gem 'execjs' gem 'rails', '>= 5.0.2' gem 'sprockets', '>= 4.0.0.beta4' # Cannot use shared.gemfile, because therubyracer requires an older version # of libv8 than mini_racer gem 'mini_racer', platforms: [:mri, :rbx] gem 'racc', platforms: :rbx gem 'rubysl', platforms: :rbx gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby] autoprefixer-rails-8.6.5/.travis.yml0000644000175000017500000000104213414333620016510 0ustar pravipravisudo: false language: ruby rvm: - "2.3.5" - "2.4.2" git: depth: 5 cache: bundler gemfile: - sprockets3.gemfile - sprockets4.gemfile - mini_racer.gemfile before_install: - nvm install stable env: - EXECJS_RUNTIME=Node # mini_racer / rubyracer or rubyrhino depending on platform: - matrix: exclude: - rvm: "2.3.5" env: "EXECJS_RUNTIME=Node" - rvm: "2.3.5" gemfile: mini_racer.gemfile - rvm: "2.4.2" gemfile: sprockets3.gemfile - env: "EXECJS_RUNTIME=Node" gemfile: mini_racer.gemfile autoprefixer-rails-8.6.5/.gitignore0000644000175000017500000000004413414333620016370 0ustar pravipravi*.DS_Store *~ pkg/ .bundle *.lock autoprefixer-rails-8.6.5/LICENSE0000644000175000017500000000210713414333620015407 0ustar pravipraviThe MIT License (MIT) Copyright 2013 Andrey Sitnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. autoprefixer-rails-8.6.5/Rakefile0000644000175000017500000000240013414333620016043 0ustar pravipravi# coding: utf-8 require 'rubygems' require 'bundler/setup' Bundler::GemHelper.install_tasks require 'rspec/core/rake_task' RSpec::Core::RakeTask.new task :default => :spec task :clobber_package do rm_r 'pkg' rescue nil end desc 'Delete all generated files' task :clobber => [:clobber_package] desc 'Test all Gemfiles from spec/*.gemfile' task :test_all do require 'pty' require 'shellwords' cmd = 'bundle update && bundle exec rake --trace' statuses = Dir.glob('./sprockets*.gemfile').map do |gemfile| Bundler.with_clean_env do env = { 'BUNDLE_GEMFILE' => gemfile } $stderr.puts "Testing #{ File.basename(gemfile) }:" $stderr.puts " export BUNDLE_GEMFILE=#{ gemfile }" $stderr.puts " #{ cmd }" PTY.spawn(env, cmd) do |r, _w, pid| begin r.each_line { |l| puts l } rescue Errno::EIO # Errno:EIO error means that the process has finished giving output. ensure ::Process.wait pid end end [$? && $?.exitstatus == 0, gemfile] end end failed = statuses.reject(&:first).map(&:last) if failed.empty? $stderr.puts "✓ Tests pass with all #{ statuses.size } gemfiles" else $stderr.puts "❌ FAILING #{ failed * "\n" }" exit 1 end end autoprefixer-rails-8.6.5/Gemfile0000644000175000017500000000007613414333620015700 0ustar pravipravieval_gemfile "#{ File.dirname(__FILE__) }/sprockets4.gemfile" autoprefixer-rails-8.6.5/.rspec0000644000175000017500000000004013414333620015511 0ustar pravipravi--format documentation --colour autoprefixer-rails-8.6.5/spec/0000755000175000017500000000000013414333620015334 5ustar pravipraviautoprefixer-rails-8.6.5/spec/compass/0000755000175000017500000000000013414333620017001 5ustar pravipraviautoprefixer-rails-8.6.5/spec/compass/sass/0000755000175000017500000000000013414333620017752 5ustar pravipraviautoprefixer-rails-8.6.5/spec/compass/sass/screen.scss0000644000175000017500000000003113414333620022120 0ustar pravipravia { display: flex; } autoprefixer-rails-8.6.5/spec/compass/config.rb0000644000175000017500000000150613414333620020575 0ustar pravipravihttp_path = "/" css_dir = "stylesheets" sass_dir = "sass" images_dir = "images" javascripts_dir = "javascripts" sourcemap = true output_style = :compressed sass_options = { cache: false } line_comments = false require 'rubygems' require 'bundler' Bundler.require require '../../lib/autoprefixer-rails' on_stylesheet_saved do |file| css = File.read(file) map = file + '.map' if File.exists? map result = AutoprefixerRails.process(css, browsers: ['chrome 25'], from: file, to: file, map: { prev: File.read(map), inline: false }) File.open(file, 'w') { |io| io << result.css } File.open(map, 'w') { |io| io << result.map } else File.open(file, 'w') do |io| io << AutoprefixerRails.process(css, browsers: ['chrome 25']) end end end autoprefixer-rails-8.6.5/spec/spec_helper.rb0000644000175000017500000000056513414333620020160 0ustar pravipraviENV['RAILS_ENV'] ||= 'test' require_relative 'app/config/environment' require_relative '../lib/autoprefixer-rails' require 'rspec/rails' STDERR.puts "ExecJS runtime is #{ExecJS.runtime.class}" RSpec.configure do |c| c.filter_run_excluding not_jruby: RUBY_PLATFORM == 'java' end def sprockets_4? Gem::Version.new(Sprockets::VERSION) > Gem::Version.new("4.0.x") end autoprefixer-rails-8.6.5/spec/processor_spec.rb0000644000175000017500000000054313414333620020714 0ustar pravipravirequire_relative 'spec_helper' describe AutoprefixerRails::Processor do it 'parses config' do config = "# Comment\n ie 11\n \nie 8 # sorry\n[test ]\nios 8" processor = AutoprefixerRails::Processor.new expect(processor.parse_config(config)).to eql({ 'defaults' => ['ie 11', 'ie 8'], 'test' => ['ios 8'] }) end end autoprefixer-rails-8.6.5/spec/autoprefixer_spec.rb0000644000175000017500000000667213414333620021423 0ustar pravipravirequire_relative 'spec_helper' describe AutoprefixerRails do before :all do @dir = Pathname(__FILE__).dirname @css = @dir.join('app/app/assets/stylesheets/test.css').read end it "process CSS" do expect(AutoprefixerRails.process(@css)).to be_a(AutoprefixerRails::Result) end it "process CSS for selected browsers" do css = "a {\n tab-size: 2\n}" result = AutoprefixerRails.process(css, browsers: ['opera 12']) expect(result.css).to eq "a {\n" + " -o-tab-size: 2;\n" + " tab-size: 2\n" + "}" end it "process @supports" do css = "@supports (display: flex) { }" result = AutoprefixerRails.process(css, browsers: ['chrome 28']) expect(result.css).to eq( '@supports ((display: -webkit-flex) or (display: flex)) { }') end it "generates source map" do result = AutoprefixerRails.process(@css, map: true) expect(result.css).to include('/*# sourceMappingURL=data:') end it "generates separated source map" do result = AutoprefixerRails.process(@css, map: { inline: false }) expect(result.map).to be_a(String) end it "uses file name in syntax errors", not_jruby: true do expect { AutoprefixerRails.process('a {', from: 'a.css') }.to raise_error(/a.css:/) end it "includes sourcesContent by default" do map = AutoprefixerRails.process('a{}', map: { inline: false }).map expect(map).to include('sourcesContent') end it "maps options from Ruby style" do map = AutoprefixerRails.process('a{}', map: { sources_content: false, inline: false }).map expect(map).not_to include('sourcesContent') end it "does not remove old prefixes on request" do css = 'a { -moz-border-radius: 5px; border-radius: 5px }' result = AutoprefixerRails.process(css, remove: false) expect(result.css).to eq(css) end it "shows debug" do info = AutoprefixerRails.processor(browsers: ['chrome 25']).info expect(info).to match(/Browsers:\n Chrome: 25\n\n/) expect(info).to match(/ transition: webkit/) end it "returns warnings" do css = 'a{background:linear-gradient(top,white,black)}' result = AutoprefixerRails.process(css) expect(result.warnings).to eq([':1:3: Gradient has outdated ' + 'direction syntax. New syntax is like `to left` instead of `right`.']) end it "shows correct error on country statistics" do expect { AutoprefixerRails.process('', browsers: '> 1% in US') }.to raise_error(/Use Autoprefixer with webpack/) end context 'Sprockets' do before :each do @assets = Sprockets::Environment.new @assets.append_path(@dir.join('app/app/assets/stylesheets')) AutoprefixerRails.install(@assets, browsers: ['chrome 25']) end it "integrates with Sprockets" do css = @assets['test.css'].to_s expect(css).to eq "a {\n" + " -webkit-mask: none;\n" + " mask: none\n" + "}\n" end it "shows file name from Sprockets", not_jruby: true do expect { @assets['wrong.css'] }.to raise_error(/wrong/) end it "supports disabling", not_jruby: true do AutoprefixerRails.uninstall(@assets) css = @assets['test.css'].to_s expect(css).to eq "a {\n" + " mask: none\n" + "}\n" end end end autoprefixer-rails-8.6.5/spec/compass_spec.rb0000644000175000017500000000132413414333620020340 0ustar pravipravirequire_relative 'spec_helper' COMPASS_DIR = Pathname(__FILE__).dirname.join('compass') STYLESHEETS_DIR = COMPASS_DIR.join('stylesheets') describe 'Compass integration' do after do STYLESHEETS_DIR.rmtree if STYLESHEETS_DIR.exist? end it 'works from config.rb' do `cd #{ COMPASS_DIR }; bundle exec compass compile` expect(STYLESHEETS_DIR.join('screen.css').read) .to eq("a{display:-webkit-flex;display:flex}\n\n" + "/*# sourceMappingURL=screen.css.map */") expect(STYLESHEETS_DIR.join('screen.css.map').read) .to eq('{"version":3,"sources":["../sass/screen.scss"],"names":[],' + '"mappings":"AAAA,EACI,qBAAa,AAAb,YAAa,CAAA","file":"screen.css"}') end end autoprefixer-rails-8.6.5/spec/railtie_spec.rb0000644000175000017500000000140513414333620020324 0ustar pravipravirequire_relative 'spec_helper' describe AutoprefixedRails::Railtie do before do @railtie = AutoprefixedRails::Railtie.instance end context 'with config/autoprefixer.yml' do it 'works' do expect(@railtie.config).to eq(cascade: false, supports: false, env: 'test') end end context 'with empty config/autoprefixer.yml' do before do file_path = File.join(Rails.application.root, 'config/autoprefixer.yml') allow(File).to receive(:exists?).with(file_path) { true } allow(::YAML).to receive(:load_file).with(file_path) { false } # empty yaml end it 'skips empty YAML' do expect { @railtie.config }.not_to raise_error end it 'works' do expect(@railtie.config).to eq(env: 'test') end end end autoprefixer-rails-8.6.5/spec/app/0000755000175000017500000000000013414333620016114 5ustar pravipraviautoprefixer-rails-8.6.5/spec/app/config/0000755000175000017500000000000013414333620017361 5ustar pravipraviautoprefixer-rails-8.6.5/spec/app/config/environments/0000755000175000017500000000000013414333620022110 5ustar pravipraviautoprefixer-rails-8.6.5/spec/app/config/environments/test.rb0000644000175000017500000000052613414333620023417 0ustar pravipraviApp::Application.configure do config.cache_classes = true config.eager_load = false config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_dispatch.show_exceptions = false config.action_controller.allow_forgery_protection = false config.active_support.deprecation = :stderr end autoprefixer-rails-8.6.5/spec/app/config/autoprefixer.yml0000644000175000017500000000004013414333620022613 0ustar pravipravisupports: false cascade: false autoprefixer-rails-8.6.5/spec/app/config/boot.rb0000644000175000017500000000021313414333620020645 0ustar pravipraviENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) autoprefixer-rails-8.6.5/spec/app/config/application.rb0000644000175000017500000000045013414333620022210 0ustar pravipravirequire File.expand_path('../boot', __FILE__) require 'action_controller/railtie' require 'sprockets/railtie' if defined?(Bundler) Bundler.require(*Rails.groups(assets: %w(development test))) end module App class Application < Rails::Application config.assets.enabled = true end end autoprefixer-rails-8.6.5/spec/app/config/environment.rb0000644000175000017500000000014313414333620022250 0ustar pravipravirequire 'tzinfo' require File.expand_path('../application', __FILE__) App::Application.initialize! autoprefixer-rails-8.6.5/spec/app/config/routes.rb0000644000175000017500000000007213414333620021226 0ustar pravipraviApp::Application.routes.draw do root to: 'css#test' end autoprefixer-rails-8.6.5/spec/app/config/initializers/0000755000175000017500000000000013414333620022067 5ustar pravipraviautoprefixer-rails-8.6.5/spec/app/config/initializers/secret_token.rb0000644000175000017500000000006113414333620025076 0ustar pravipraviApp::Application.config.secret_key_base = 'test' autoprefixer-rails-8.6.5/spec/app/config/initializers/compress.rb0000644000175000017500000000006513414333620024250 0ustar pravipraviRails.application.config.assets.css_compressor = nil autoprefixer-rails-8.6.5/spec/app/.browserslistrc0000644000175000017500000000003013414333620021175 0ustar pravipraviie 11 [test] chrome 25 autoprefixer-rails-8.6.5/spec/app/.gitignore0000644000175000017500000000001213414333620020075 0ustar pravipravi/log /tmp autoprefixer-rails-8.6.5/spec/app/config.ru0000644000175000017500000000012413414333620017726 0ustar pravipravirequire ::File.expand_path('../config/environment', __FILE__) run App::Application autoprefixer-rails-8.6.5/spec/app/Rakefile0000644000175000017500000000013013414333620017553 0ustar pravipravirequire File.expand_path('../config/application', __FILE__) App::Application.load_tasks autoprefixer-rails-8.6.5/spec/app/app/0000755000175000017500000000000013414333620016674 5ustar pravipraviautoprefixer-rails-8.6.5/spec/app/app/assets/0000755000175000017500000000000013414333620020176 5ustar pravipraviautoprefixer-rails-8.6.5/spec/app/app/assets/config/0000755000175000017500000000000013414333620021443 5ustar pravipraviautoprefixer-rails-8.6.5/spec/app/app/assets/config/manifest.js0000644000175000017500000000000013414333620023575 0ustar pravipraviautoprefixer-rails-8.6.5/spec/app/app/assets/stylesheets/0000755000175000017500000000000013414333620022552 5ustar pravipraviautoprefixer-rails-8.6.5/spec/app/app/assets/stylesheets/loaded.sass0000644000175000017500000000001713414333620024673 0ustar pravipravia mask: none autoprefixer-rails-8.6.5/spec/app/app/assets/stylesheets/sass.sass0000644000175000017500000000002113414333620024407 0ustar pravipravi@import "loaded" autoprefixer-rails-8.6.5/spec/app/app/assets/stylesheets/evaluate.css.erb0000644000175000017500000000003313414333620025635 0ustar pravipravi<%= evaluate 'test.css' %> autoprefixer-rails-8.6.5/spec/app/app/assets/stylesheets/wrong.css0000644000175000017500000000006713414333620024423 0ustar pravipravia { background: linear-gradient(top, white, black) autoprefixer-rails-8.6.5/spec/app/app/assets/stylesheets/test.css0000644000175000017500000000002513414333620024240 0ustar pravipravia { mask: none } autoprefixer-rails-8.6.5/spec/app/app/controllers/0000755000175000017500000000000013414333620021242 5ustar pravipraviautoprefixer-rails-8.6.5/spec/app/app/controllers/application_controller.rb0000644000175000017500000000007113414333620026333 0ustar pravipraviclass ApplicationController < ActionController::Base end autoprefixer-rails-8.6.5/spec/app/app/controllers/css_controller.rb0000644000175000017500000000030513414333620024620 0ustar pravipraviclass CssController < ApplicationController def test file = params[:exact_file] || params[:file] + '.css' render plain: Rails.application.assets[file].to_s.gsub(/;(\s})/, '\1') end end autoprefixer-rails-8.6.5/spec/rails_spec.rb0000644000175000017500000000262413414333620020011 0ustar pravipravirequire_relative 'spec_helper' describe CssController, type: :controller do before :all do cache = Rails.root.join('tmp/cache') cache.rmtree if cache.exist? end def test_file(file) if Rails.version.split('.').first.to_i >= 5 get :test, params: { file: file } else get :test, file: file end end it "integrates with Rails and Sass" do test_file 'sass' expect(response).to be_successful clear_css = response.body.gsub("\n", " ").squeeze(" ").strip expect(clear_css).to eq "a { -webkit-mask: none; mask: none }" end if Sprockets::Context.instance_methods.include?(:evaluate) it 'supports evaluate' do test_file 'evaluate' expect(response).to be_successful clear_css = response.body.gsub("\n", ' ').squeeze(' ').strip expect(clear_css).to eq 'a { -webkit-mask: none; mask: none }' end end if sprockets_4? it "works with sprockets 4 source maps" do get :test, params: { exact_file: 'sass.css.map' } expect(response).to be_successful source_map = JSON.parse(response.body)['sections'].first['map'] expect(source_map['sources'].first).to match(/loaded.*.sass/) end end end describe 'Rake task' do it "shows debug" do info = `cd spec/app; bundle exec rake autoprefixer:info` expect(info).to match(/Browsers:\n Chrome: 25\n\n/) expect(info).to match(/ transition: webkit/) end end autoprefixer-rails-8.6.5/shared.gemfile0000644000175000017500000000031513414333620017201 0ustar pravipravigem 'therubyrhino', platforms: 'jruby' gem 'therubyracer', platforms: ['mri', 'rbx'] gem 'racc', platforms: 'rbx' gem 'rubysl', platforms: 'rbx' gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]