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

finnehcss

v0.0.1-alpha

Published

Lightweight & Modular CSS Framework built on CSS Layers

Downloads

4

Readme

FinnehCSS: A Layered Approach to Responsive Web Design

Understanding CSS Layers

FinnehCSS employs a layered approach to organising your CSS, breaking down the length of your stylesheet into more manageable sections. This structure enhances code readability, maintainability, and reusability.

The Layers:

  1. Reset:

    • Provides a consistent baseline for all elements, ensuring cross-browser compatibility and eliminating default styles.
    • Includes rules to normalize margins, paddings, fonts, and other common properties.
    • Examples of reset rules might include:
      body {
        margin: 0;
        padding: 0;
      }
      
      h1, h2, h3, h4, h5, h6, p {
        margin: 0;
      }
  2. Base:

    • Defines the foundation for your website's visual style.
    • Includes global styles like typography, colors, and general layout settings.
    • Examples of base styles include:
      body {
        background-color: var(--clr-neutral-a10);
      }
      
      h1 {
        font-family: "Montserrat", "Arial", sans-serif;
      }
  3. Components:

    • Houses styles for specific reusable UI elements.
    • Examples include buttons, navigation menus, forms, cards, and other common components.
    • Each component has its own CSS file to promote modularity and reusability.
    • For example, buttons.css contain styles for different button types:
      .button-primary {
        background-color: #007bff;
        color: #fff;
        padding: 10px 20px;
        border: none;
        cursor: pointer;
      }
      
      .button-secondary {
        background-color: #f0f0f0;
        color: #333;
        border: 1px solid #ccc;
        padding: 10px 20px;
        cursor: pointer;
      }
  4. Utilities:

    • Offers a collection of low-level utility classes for quick styling adjustments.
    • Includes classes for spacing, sizing, alignment, display properties, and more.
    • Utility classes can be used to rapidly style elements without creating custom CSS rules.
    • For example, spacing.css contains utility classes for different margin and padding values:
      .m-0 {
        margin: 0;
      }
      
      .m-2 {
        margin: 0.5rem;
      }
      
      .p-4 {
        padding: 1rem;
      }
  5. Page:

    • A dedicated space for your custom styles related to a specific page.
    • Allows you to override or extend existing styles to create unique page-specific layouts and designs.
    • For example, a homepage.css file might contain styles specific to the homepage:
      .hero-section {
        background-image: url('hero-image.jpg');
        background-size: cover;
        height: 300px;
      }

Benefits of the Layered Approach:

  • Improved Readability: The organised structure makes your CSS easier to understand and navigate.
  • Enhanced Maintainability: Changes to components or utilities can be made without affecting the entire stylesheet.
  • Increased Reusability: Reusable components and utility classes promote efficient development.
  • Better Scalability: As your project grows, the layered approach helps manage complexity.
  • Improved Organization: By separating styles into different layers, you can more easily manage and maintain your codebase.
  • Easier Collaboration: The layered approach can make it easier for multiple developers to work on the same project without stepping on each other's toes.

By following this layered structure, you can create well-organized, maintainable, and scalable CSS for your projects.

Installation

Using npm:

  1. Create a new project directory.
  2. Initialize npm: npm init -y
  3. Install FinnehCSS: npm install finnehcss

Using yarn:

  1. Create a new project directory.
  2. Initialize yarn: yarn init -y
  3. Install FinnehCSS: yarn add finnehcss

Manual Installation:

  1. Download the latest FinnehCSS release from [GitHub repository link].

  2. Extract the contents to your project's assets/css directory.

  3. Include the finnehcss.css file in your HTML <head>:

    <link rel="stylesheet" href="assets/css/finnehcss.css">

Usage

Basic Usage:

To use FinnehCSS, simply include the finnehcss.css file in your HTML <head> as shown above. You can then use the framework's built-in classes to style your elements.

Example:

<div class="container">
  <h1 class="text-center">Welcome to FinnehCSS</h1>
  <p class="lead">This is a paragraph with the "lead" class.</p>
  <button class="btn btn-primary">Click me</button>
</div>

Customizing FinnehCSS

You can customize FinnehCSS by overriding its default styles or creating your own custom classes.

Overriding Default Styles:

To override a default style, simply create a more specific CSS rule. For example, to change the background color of the .container class:

.container {
  background-color: #f0f0f0;
}

Creating Custom Classes:

You can create your own custom classes to style your elements. For example, to create a custom class for a heading:

.my-heading {
  font-size: 2em;
  color: #333;
}

Contributing

We welcome contributions from the community! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes.
  4. Submit a pull request.

Please make sure your changes adhere to the project's coding style and guidelines.

Security

FinnehCSS is committed to providing a secure and reliable framework. We take security seriously and strive to address any vulnerabilities promptly. If you discover a security issue, please report it to us privately through GitHub.

License

FinnehCSS is licensed under the MIT License. See the LICENSE file for more details.

Additional Notes

  • FinnehCSS is still under development, so please be aware that the API and features may change.
  • For more information and examples, please refer to the FinnehCSS documentation.