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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@familyboat/familyboat-ui

v1.0.1

Published

css, ui, assets fro familyboat

Readme

familyboat-ui由独立的两部分组成:

  • 布局(Layouts)
  • 组件(Components)

布局

组件

变量

familyboat采用双层主题模式,即全局变量指导组件变量。它们各自遵循一定的规范。

全局变量

全局变量是为了维护一致性,需遵守的规则如下:

  • 采用 global 作为前缀,遵循下列公式: --fb-global--concept--PropertyCamelCase--modifier--state
    • concept是指一些概念性的东西,比如spacer获取main-title
    • PropertyCamelCase是指大驼峰形式的CSS属性值,比如BackgroundColor或者FontSize
    • modifier是指一些修饰作用的词汇,比如sm或者lg
    • state是指组件的某种状态,比如hover或者expanded
  • 上述词汇均是概念性的东西,因此永远不要和某个元素或者组件绑定在一起。所以第一个是错误的范例: --fb-global--h1--FontSize,第二个是正确的范例: --fb-global--FontSize--3xl.

设置全局变量的范例:

  // --fb-global--concept--size
  --fb-global--spacer--lg: .5rem;
  --fb-global--spacer--xl: 1rem;
  --fb-global--spacer--2xl: 2rem;

  // --fb-global--PropertyCamelCase--modifier
  --fb-global--FontSize--3xl: 2rem;
  --fb-global--FontSize--2xl: 1.8rem;
  --fb-global--FontSize--lg: 1rem;

  // --fb-global--concept--PropertyCamelCase--state
  --fb-global--link--TextDecoration--hover: #ccc;

  // --fb-global--PropertyCamelCase--modifier
  --fb-global--Color--100: #000;

  // --fb-global--concept--modifier
  --fb-global--primary-color--100: #00f;

组件变量

The second layer is scoped to themeable component custom properties. This setup allows for consistency across components, generates a common language between designers and developers, and gives granular control to authors. The rules are as follows:

  • They follow this general formula --fb-c-block[__element][--modifier][--state][--breakpoint][--pseudo-element]--PropertyCamelCase.
    • --fb-c-block refers to the block, usually the component or layout name (i.e., --fb-c-alert).
    • __element refers to the element inside of the block (i.e., __title).
    • --modifier refers to a modifier class such as .pf-m-danger, and is prefixed with m- in the component variable (i.e., --m-danger).
    • --state is something like hover or active.
    • --breakpoint is a media query breakpoint such as sm for $pf-global--breakpoint--xs.
    • --pseudo-element is one of either before or after.
  • The value of a component variable is always defined by a global variable.
  • It's possible to include multiple elements, modifiers, states, and breakpoints in a single component variable.
  • The order of elements, modifiers, states, and breakpoints in the variable name should match the selector order.

For example:

// Component scoped variables are always defined by global variables
--fb-c-alert--Padding: var(--fb-global--spacer--xl);
--fb-c-alert--hover--BackgroundColor: var(--fb-global--BackgroundColor--200);
--fb-c-alert__title--FontSize: var(--fb-global--FontSize--2xl);

// --block--PropertyCamelCase
.pf-c-alert {
  padding: var(--fb-c-alert--Padding);
}

// --block--state--PropertyCamelCase
.pf-c-alert {
  &:hover {
    background-color: var(--fb-c-alert--hover--BackgroundColor);
  }
}

// --block__element--PropertyCamelCase
.pf-c-alert__title {
  font-size: var(--fb-c-alert__title--FontSize);
}

// A more complex example
.pf-c-switch {
  @media (max-width: $pf-global--breakpoint--sm) {
    .pf-c-switch__input {
      &:disabled {
        ~ .pf-c-switch__toggle {
          &::before {
            background-color: var(--fb-c-switch--sm__input--disabled__toggle--before--BackgroundColor);
          }
        }
      }
    }
  }
}

类名