1.0.4 • Published 3 months ago

chaos-sass v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Chaos-Sass šŸŽ­

A simple and lightweight SCSS utility library.

šŸ“¦ Installation

To install Chaos-Sass, run:

npm install chaos-sass

šŸ› ļø Usage

Once installed, include it in your main SCSS file.

šŸ”¹ Example: Using Chaos-Sass in Laravel 11

If you're using Laravel 11, update your resources/css/app.scss file:

@use "chaos-sass";

šŸ“Œ Note: Laravel's default CSS folder is resources/css/. Make sure your file is renamed to app.scss instead of app.css to support SCSS syntax.

Then, ensure that Laravel Vite compiles SCSS correctly by adding app.scss to vite.config.js:

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
    plugins: [
        laravel({
            input: ['resources/css/app.scss', 'resources/js/app.js'],
            refresh: true,
        }),
    ],
});

Finally, import the SCSS in your JavaScript entry file (resources/js/app.js):

import "../css/app.scss";

Run Vite to compile everything:

npm run dev

šŸ“Œ Features

Chaos-Sass provides a set of utility classes to simplify styling, including:

  • šŸŽØ Flexbox utilities (.row, .column, .align-center, .justify-between, etc.)
  • šŸ— Spacing utilities (.gap-sm, .gap-md, .gap-lg, .gap-xl)
  • šŸŽ› Button styles (.btn)
  • šŸƒ Card components (.card)
  • šŸŽÆ Typography utilities (.clickable)

Example usage in HTML:

<div class="row justify-center align-center">
    <button class="btn">Click Me</button>
</div>

šŸ“Œ Available Classes

Here is a short list of the available classes you can use. The names attempt to be self-explanatory but feel free to experiment:

.column .row .align-start .align-center .align-end .align-stretch .justify-start .justify-center .justify-end .justify-between .justify-around .justify-evenly .gap-sm .gap-md .gap-lg .gap-xl .wrap .nowrap .flex-1 .flex-auto .flex-none .btn .clickable .card

More to come!


šŸŽÆ Advanced SCSS Usage

You can also use SCSS mixins and variables from Chaos-Sass:

Using Variables (Not yet implemented)

@use "chaos-sass" as cs;

body {
    background-color: cs.$borderColor;
}

Using Mixins

@use "chaos-sass" as cs;

.card {
    @include cs.reset;
}

šŸ“Œ Updating Chaos-Sass

If you need the latest version, simply update it with:

npm update chaos-sass

šŸ“œ License

This project is licensed under the MIT License.


šŸš€ Get Started with Chaos-Sass Today!

If you have any questions, feel free to reach out or contribute to the project. šŸŽ‰

1.0.4

3 months ago

1.0.3

3 months ago

1.0.2

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago