npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sanctucompu/basement

v1.2.1

Published

Ground floor CSS utility classes

Downloads

175

Readme

Basement

Ground floor CSS utility classes

How to

Import any settings before the src/index.scss file and any default settings will get overwritten:

@import
  'overrides',
  'src/index';

Usage with Webpack (or Create React App)

First, install the webpack deps for compiling sass. If you are using Create React App < v2.0.0 you will be using react-app-rewired if you haven't ejected and will require the following packages:

yarn add sass-loader node-sass --dev

Add the following loader to your webpack config:

{
  test: /\.scss$/,
  loaders: [
    require.resolve('style-loader'),
    require.resolve('css-loader'),
    require.resolve('sass-loader'),
  ]
},

If you are using Create React App v2.0.0+ then SCSS modules is natively supported and you will only need to install node-sass:

yarn add node-sass --dev

Then rename your index.css file to index.scss (and be sure to change any javascript imports to import 'index.scss';). Sass should be working nicely, now!


Now you can install basement:

yarn add '@sanctucompu/basement'

And require it in index.scss like so:

@import '~@sanctucompu/basement/src/index';

Usage with Ember JS

Be sure that Basement, as well as Ember CLI Sass, Sass, and Broccoli Funnel are included in your devDependencies.

yarn add -D @sanctucompu/basement
yarn add -D sass ember-cli-sass broccoli-funnel

Update ember-cli-build.js. Using broccoli-funnel enables us to set the destination directory, so that the call to import 'basement/index' works as we'd expect.

const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const Funnel = require('broccoli-funnel');

module.exports = function(defaults) {
  let app = new EmberApp(defaults, {
    sassOptions: {
      includePaths: [
        new Funnel('node_modules/@sanctucompu/basement/src', { destDir: '@sanctucompu/basement' })
      ]
    }
  });

Now you can import basement in your main sass file

@import '@sanctucompu/basement/index';

Settings

Overwriting these settings is encouraged! To do so, define them in a .scss file and import them before Basement.

| variable | description | default | | --- | --- | --- | | $grid-columns | Amount of columns in the grid. | 12 | | $colors | Color map use for color-<color>, bg-color-<color>, and border-color-<color> classes. | ('black': #000, 'white': #FFF, 'blue': #0A3862); | | $breakpoints | Media query breakpoints. | ('sm': 640px, 'md': 832px, 'lg': 1024px, 'xl': 1152px) | | $spacing-units | Spacing units defined here will be available in spacing and padding utility classes at each breakpoint. For example, .p_25 will set padding: .25rem; on the selected element. If you update the list of $spacing_units to include 3.125rem, then .sm:mt3_125 will affect the top margin of your element only at small screen sizes. Negative margin classes are automatically generated and prefixed with n, so .mn1 will set margin: -1rem. | 0rem, .25rem, .5rem, .75rem, 1rem, 2rem, 3rem, 4rem, 6rem, 8rem; | | $aspect-ratios | Ratios for .aspect-<ratio> utility class. | ('square': (1, 1), 'landscape': (16, 9), 'portrait': (2, 3));| | $dynamic_spacing | Whether or not each margin and padding class is generated for each breakpoint. | true | | $decimal_deliminator | The deliminator used to replace a . | '_' | | $dynamic-grid | Whether or not each col-<i> class is generated for each breakpoint. | true | | $additional-class-definitions | Add additional classes. | () | | $additional-responsive-classes | Create responsive classes from additional class definitions. | () |

Contributing

We want basement to be effective and effecient so we encourage contribution. You can contribute by making a pull request and requesting review from previous contributors or a member of the Sanctuary Computer team.

Running locally

# clone the repo
git clone https://github.com/sanctuarycomputer/basement.git

cd basement

# Install dependancies (currently only node-sass)
yarn install
# or
npm install

# Run the watcher
yarn watch
# or the minified watch if you are pointing towards the minified build (dist/basement.min.css)
yarn watch:min

# Build before commiting
yarn build