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

@carano-uiux/css-fx-layout

v3.0.6

Published

Fork of original Library. A lightweight SCSS flexbox library inspired by Angular Flex-Layout.

Downloads

14

Readme

Fork from https://github.com/philmtd/css-fx-layout for UIUXTEAM purposes

css-fx-layout

This is a lightweight and modular SCSS flexbox library. It is inspired by Angular's Flex-Layout and can replace the most popular functions of the (by now deprecated) Angular library.

Features

This library gives you the option between using CSS classes or data-attributes. Both options give you the same features but the CSS classes can be more verbose when you want a more complex layout.

Please refer to the documentation on https://philmtd.github.io/css-fx-layout for a full list of all available selectors and features.

HTML data-attribute selectors

Using the data attributes is the easiest way to use this library and easier to migrate to from Angular Flex-Layout:

For example css-fx-layout provides attributes like the following, which can be configured through the values passed to them:

  • data-layout and data-layout-align
  • data-layout-gap
  • data-hide-... and data-show-...
  • data-flex

CSS class selectors

Using the CSS classes is more verbose and the more "CSS-y" way of styling your HTML:

For example css-fx-layout provides classes with naming patterns like:

  • fx-layout-... and fx-align-...
  • fx-gap-...
  • show-... and hide-...
  • fx-flex-...

Responsive API

The library provides a responsive API which allows to create different layouts for different screen sizes using known breakpoints like xs, sm, md, lg, xl and including lt- and gt- variations of them. Please check out the documentation for details on how to use it.

Getting started

Add the library to your project's package.json:

npm i -s css-fx-layout

Then follow the Getting Started guide in the documentation.

Examples

These are just two simple examples how to use css-fx-layout. Visit the examples page for more and live-rendered examples.

Layout

Example 1

This is the simplest example. It will make the div a flex container and align the three spans in a row:

<div class="fx-layout-row">
    <span>One</span>
    <span>Two</span>
    <span>Three</span>
</div>
<div data-layout="row">
    <span>One</span>
    <span>Two</span>
    <span>Three</span>
</div>

The resulting layout:

Example 2

An advanced example that aligns the items in reverse order with a gap of four pixels and vertically centered:

<div class="fx-layout-row 
            fx-layout-reverse 
            fx-align--start-x 
            fx-align--x-center 
            fx-gap--4px">
    <span>One</span>
    <span>Two</span>
    <span>Three</span>
</div>
<div data-layout="row reverse" 
     data-layout-align="start center" 
     data-layout-gap="4px">
    <span>One</span>
    <span>Two</span>
    <span>Three</span>
</div>

The resulting layout:

What problem does this library solve?

Initially I created this library because I liked the convenient syntax of Angular Flex-Layout and wanted to use it in non-Angular projects and without JavaScript.

By now Angular Flex-Layout has been deprecated and this library can be a replacement for most of the popular parts.