All Projects → madeleineostoja → laggard

madeleineostoja / laggard

Licence: other
Automatically generate CSS fallbacks for legacy browsers, built on PostCSS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to laggard

Postcss Start To End
PostCSS plugin that lets you control your layout (LTR or RTL) through logical rather than physical rules
Stars: ✭ 18 (-21.74%)
Mutual labels:  postcss, postcss-plugins
Postcss Font Family System Ui
PostCSS plugin to transform W3C CSS font-family: system-ui to a practical font-family list
Stars: ✭ 91 (+295.65%)
Mutual labels:  postcss, postcss-plugins
Stencil Postcss
Autoprefixer plugin for Stencil
Stars: ✭ 19 (-17.39%)
Mutual labels:  postcss, postcss-plugins
react-cli
基于 create-react-app 搭建的前端脚手架
Stars: ✭ 18 (-21.74%)
Mutual labels:  postcss, postcss-plugins
Postcss Aspect Ratio Mini
A PostCSS plugin to fix an element's dimensions to an aspect ratio
Stars: ✭ 123 (+434.78%)
Mutual labels:  postcss, postcss-plugins
Postcss Cssnext
`postcss-cssnext` has been deprecated in favor of `postcss-preset-env`.
Stars: ✭ 5,388 (+23326.09%)
Mutual labels:  postcss, postcss-plugins
Postcss At Rules Variables
PostCss plugin to use CSS Custom Properties in at-rule @each, @for, @if, @else and more...
Stars: ✭ 52 (+126.09%)
Mutual labels:  postcss, postcss-plugins
Postcss Utilities
PostCSS plugin to add a collection of mixins, shortcuts, helpers and tools for your CSS
Stars: ✭ 293 (+1173.91%)
Mutual labels:  postcss, postcss-plugins
Postcss Instagram
📷 PostCSS plugin for using Instagram filters in CSS
Stars: ✭ 111 (+382.61%)
Mutual labels:  postcss, postcss-plugins
Postcss High Contrast
Create high contrast version of your project with ease.
Stars: ✭ 108 (+369.57%)
Mutual labels:  postcss, postcss-plugins
postcss-gtk
Processes GTK+ CSS into browser CSS
Stars: ✭ 23 (+0%)
Mutual labels:  postcss, postcss-plugins
Stylefmt
stylefmt is a tool that automatically formats stylesheets.
Stars: ✭ 2,123 (+9130.43%)
Mutual labels:  postcss, postcss-plugins
Postcss Selector Not
PostCSS plugin to transform :not() W3C CSS level 4 pseudo class to more compatible CSS (multiple css3 :not() selectors)
Stars: ✭ 49 (+113.04%)
Mutual labels:  postcss, postcss-plugins
Postcss Plugins
The "officially unofficial" consolidated list of PostCSS plugins in a ready-to-use package
Stars: ✭ 107 (+365.22%)
Mutual labels:  postcss, postcss-plugins
Rucksack
A little bag of CSS superpowers, built on PostCSS
Stars: ✭ 1,861 (+7991.3%)
Mutual labels:  postcss, postcss-plugins
postcss-if-media
A PostCSS plugin to inline or nest media queries within CSS rules & properties.
Stars: ✭ 35 (+52.17%)
Mutual labels:  postcss, postcss-plugins
postcss-center
PostCSS plugin to center elements.
Stars: ✭ 44 (+91.3%)
Mutual labels:  postcss
static-webpack-boilerplate
🚀 Minimal & Modern Webpack Boilerplate for building static sites
Stars: ✭ 40 (+73.91%)
Mutual labels:  postcss
tailwindcss
Add Tailwind CSS to your Svelte project
Stars: ✭ 583 (+2434.78%)
Mutual labels:  postcss
vital
Starter template for Vite with React (TypeScript). Supports Tailwind with CSS-Modules. Jest and @react/testing-library configured and ready to go. Also ESLint, Prettier, Husky, Commit-lint and Atomic Design for components.
Stars: ✭ 151 (+556.52%)
Mutual labels:  postcss

Laggard

NPM version Downloads Build Status

Laggard automatically generates safe CSS fallbacks for legacy (<IE9) browsers. It's built on PostCSS.

Laggard does not transpile future CSS syntax. For that use cssnext. Laggard also doesn't do destructive transforms that would require you to use a separate stylesheet for legacy browsers. If that's what you're after use Oldie.

Use Laggard if you just want to easily improve legacy support with your current CSS code.

Contents

Install

Laggard is available on NPM as laggard, install it with NPM or Yarn

$ yarn add laggard --dev
$ npm i laggard --save-dev

Features

Opacity fallbacks

/* Before */
.foo {
  opacity: .5;
}

/* After */
.foo {
  opacity: .5;
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
}

Rem unit fallbacks

html {
  font-size: 16px;
}

/* Before */
.foo {
  font-size: 2rem;
}

/* After */
.foo {
  font-size: 32px;
  font-size: 2rem;
}

Pseudo element conversions

/* Before */
.foo::before {
  display: block;
}

/* After */
.foo:before {
  display: block;
}

RGBA Hex fallbacks

/* Before */
.foo {
  background: rgba(153, 221, 153, 0.8);
}

/* After */
.foo {
  background: #99DD99;
  background: rgba(153, 221, 153, 0.8);
}

IE vmin to vm fallbacks

/* Before */
.foo {
  width: 50vmin;
}

/* After */
.foo {
  width: 50vm;
  width: 50vmin;
}

3D transform hack for will-change

/* Before */
.foo {
  will-change: transform;
}

/* After */
.foo {
  backface-visibility: hidden;
  will-change: transform;
}

Usage

Build tools

Use Laggard as a PostCSS plugin in your build tool of choice.

const postcss = require('postcss');
const laggard = require('laggard');

postcss([ laggard ])

See PostCSS docs for examples for your particular environment.

CLI

Process CSS directly on the command line

$ laggard src/style.css style.css [options]
Stylus

Laggard can be used directly as a Stylus plugin with PostStylus

stylus(css).use(poststylus('laggard'))

See the PostStylus Docs for more examples for your environment.

Options

All features in Laggard can be toggled on or off by passing options on initialization. By default all features are set to true.

Option Type Default Description
rgba Boolean true Whether to enable RGBA fallbacks
opacity Boolean true Whether to enable opacity fallbacks
pseudo Boolean true Whether to enable pseudo element conversion
vmin Boolean true Whether to enable to enable vmin fallbacks
pixrem Boolean true Whether to enable whether to enable rem fallbacks
willchange Boolean true Whether to enable native will-change fallbacks
reporter Boolean false Whether to log errors from plugins
// Set in build tool, etc.
.laggard({
  // options
})

MIT © Sean King

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].