
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Bettercss is a css toolkit that provides base libraries for you to include, and extend upon in your css projects.
You can download or install the source from one of the following locations.
npm install bettercss
git clone git+https://github.com/bettercss/bettercss.git
Note: zip will be coming soon.
Create yourself a source file and use the following load order when building your project.
/* Resets & Elements */
@import 'bettercss-base';
/* Components */
@import 'bettercss-components';
@import './my-component.css';
@import './button-modifiers.css';
/* Utilities */
@import 'bettercss-utilities';
It’s recommend that you use this load order as it limits the specificity problems you may encounter. Starting with the less specific and working down to the more specific.
Note: The beauty of the toolkit is you don’t have to follow this order and can change if required.
Only include what's needed for your project. The default behaviour for the toolkit is to include everything, but you can include single libraries and exclude the ones you don’t by doing the following:
/* Base module */
@import 'bettercss-base';
/* Only include the button component */
@import 'bettercss-components/libs/button';
/* Utilities */
@import 'bettercss-utilities/libs/flex';
We recommend you always include the base module as it gives your project the best possible start, but nothing is mandatory you can include your own base.
The toolkit provides it’s own preprocessor built on top of the powerful PostCSS. This allows you to sit closer to the css specifications and use future css features now. Once all browsers implement the specifications we can then remove the plugins usage from the preprocessor reducing the dependency coupling and processing time. This is something we could not do with SCSS or Less.
npm install -g bettercss-preprocessor
bettercss input.css output.css
Note: grunt-plugin
and gulp-plugins
coming soon
The Bettercss preprocessor is a requirement when processing as we use some css that isn’t supported in the browser currently that needs to be transpiled.
You can see more usage and how you can build on top of the preprocessor here.
FAQs
Bettercss
The npm package bettercss receives a total of 1 weekly downloads. As such, bettercss popularity was classified as not popular.
We found that bettercss demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.